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 wrote:
>
> hi,
>
> consider the simple layout:
>
> xmlns:android="http://schemas.android.com/apk/res/android";
> android:layout_width="fill_parent"
> android:layou
On 17 Mar, 18:19, Romain Guy wrote:
> You can have the same id on different widgets. What is the exception you get?
>
ClassCastException, it's probably the SavedStates are backed by one
linear sparse array (at least i think so)
--~--~-~--~~~---~--~~
You received
Oh yeah, we fixed that in Cupcake.
But the bottom line is: don't use the same id for Views of different types.
On Tue, Mar 17, 2009 at 12:27 PM, skink wrote:
>
>
>
> On 17 Mar, 18:19, Romain Guy wrote:
>> You can have the same id on different widgets. What is the exception you get?
>>
>
> Clas
On 17 Mar, 18:36, Romain Guy wrote:
> Oh yeah, we fixed that in Cupcake.
>
> But the bottom line is: don't use the same id for Views of different types.
ok, thanks for info
but if i used the same ids for the same View types (for example two
ListViews) how its supposed to work? we will not hav
Yes, the ID is used to propagate the saved state to the appropriate view in
the next instance. Use different IDs. Why do you even want to use the same
ID?
On Tue, Mar 17, 2009 at 12:45 PM, skink wrote:
>
>
>
> On 17 Mar, 18:36, Romain Guy wrote:
> > Oh yeah, we fixed that in Cupcake.
> >
> >
On 17 Mar, 21:01, Dianne Hackborn wrote:
> Yes, the ID is used to propagate the saved state to the appropriate view in
> the next instance. Use different IDs. Why do you even want to use the same
> ID?
>
i created come container view (extending ViewGroup) with fixed number
of children so it
Dianne Hackborn napisał(a):
> Yes, the ID is used to propagate the saved state to the appropriate view in
> the next instance. Use different IDs. Why do you even want to use the same
> ID?
>
also i had similar problem some time ago
http://groups.google.com/group/android-developers/browse_thr
That discussion was about using the same ID in different layouts that are
NOT mixed together in the same view hierarchy, in which case yes it is
perfectly okay.
The only restriction here is that the default implementation of the system
for saving your state is to use the view IDs to remember indiv
8 matches
Mail list logo