Yep, but not quite: :=)

    <button></button>

is the same as

    <button/>


But <button/> is not the same as

   <button>
   </button>

because here the button-element has child text-node containing
whitespace.

But then again, in your layout-xml it should not matter. This
whitespace should just be ignored.

On Mar 4, 10:46 pm, iDeveloper <ideveloper...@gmail.com> wrote:
> Thanks.
>
> But AFAIK having a close button tag and closing the tag using /> is  
> one and the same!
>
> On 04-Mar-09, at 10:10 PM, Stoyan Damov wrote:
>
>
>
>
>
> > Not quite sure (haven't looked at the schema) but perhaps Button is an
> > empty element, so in your layout it should look like this:
>
> >>   <Button android:id="@+id/installRing"
> >>        android:layout_width="wrap_content"
> >>        android:layout_height="52px"
> >>        android:background="@drawable/installBtn" />
>
> > That is, close the element " />" and remove the "</Button>" element  
> > end.
>
> > HTH,
> > Stoyan
>
> > On Wed, Mar 4, 2009 at 8:27 AM, idev <ideveloper...@gmail.com> wrote:
>
> >> <?xml version="1.0" encoding="utf-8"?>
> >> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/
> >> android"
> >>    android:orientation="vertical"
> >>    android:layout_width="fill_parent"
> >>    android:layout_height="fill_parent"
> >>    android:background="@drawable/bkg"
>
> >>    <TextView
> >>    android:layout_width="fill_parent"
> >>    android:layout_height="200px"
> >>    android:text="@string/hello" >
> >>    </TextView>
> >>    <LinearLayout
> >>    android:orientation="horizontal"
> >>    android:layout_width="fill_parent"
> >>    android:layout_height="55px"
> >>    android:gravity="center">
> >>    <Button android:id="@+id/installRing"
> >>         android:layout_width="wrap_content"
> >>         android:layout_height="52px"
> >>         android:background="@drawable/installBtn">
> >>        </Button>
> >>    </LinearLayout>
>
> >> </LinearLayout>
>
> >> I cannot understand what is wrong with this layout. I keep getting
> >> this error in the xml saying Element type "Button" must be either
> >> followed by attributes or > or />
> >> I don't understand why the editor can't recognize android:id as an
> >> attribute! I tried writing the whole XML again but keep getting this
> >> error!
>
> >> Thanks for any help.- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to