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;
On 17 Mar, 18:19, Romain Guy romain...@google.com 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)
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 psk...@gmail.com wrote:
On 17 Mar, 18:19, Romain Guy romain...@google.com wrote:
You can have the same id on different widgets. What is the
On 17 Mar, 18:36, Romain Guy romain...@google.com 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
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 psk...@gmail.com wrote:
On 17 Mar, 18:36, Romain Guy romain...@google.com wrote:
Oh yeah, we
On 17 Mar, 21:01, Dianne Hackborn hack...@android.com 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
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
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
8 matches
Mail list logo