You can have the same id on different widgets. What is the exception you get?

On Tue, Mar 17, 2009 at 12:00 PM, skink <psk...@gmail.com> wrote:
>
> hi,
>
> consider the simple layout:
> <?xml version="1.0" encoding="utf-8"?>
> <LinearLayout
>        xmlns:android="http://schemas.android.com/apk/res/android";
>    android:layout_width="fill_parent"
>    android:layout_height="fill_parent"
>    android:orientation="vertical"
>>
>        <LinearLayout
>            android:layout_width="fill_parent"
>            android:layout_height="wrap_content"
>            android:orientation="horizontal"
>                android:id="@+id/layout0"
>        >
>                <Button
>                    android:layout_width="fill_parent"
>                    android:layout_height="wrap_content"
>                    android:id="@+id/child0"
>                />
>        </LinearLayout>
>
>        <LinearLayout
>            android:layout_width="fill_parent"
>            android:layout_height="wrap_content"
>            android:orientation="horizontal"
>                android:id="@+id/layout1"
>        >
>                <ListView
>                    android:layout_width="fill_parent"
>                    android:layout_height="wrap_content"
>                    android:id="@+id/child0"
>                />
>        </LinearLayout>
> </LinearLayout>
>
> i heard its perfectly OK to have the same IDs in different sub-trees
> (here layout0/child0 and layout1/child0).
>
> not really: press ctrl-F12
>
> if i change one child to be child1 it works without exception
>
> is it a droid's bug?
> >
>



-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~---------~--~----~------------~-------~--~----~
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