On Sun, Mar 28, 2010 at 11:41 AM, Kritzli <pfister.ta...@googlemail.com>wrote:

> In the receiving Activity the Log says, it has some elements, but if i read
> specific values (like height and text of the button), it always says null or
> 0.
>

The base Button class you are extending does not implement Parcelable - so
when you create your custom class from a Parcel, the only properties that
will be initialized are the ones that you defined (in this case, the one's
in your Map) - all other properties (like the height and name) will have
default / uninitialized values.

In general you do not want to make Views paracelable - it doesn't really
make sense. Make a custom class that is NOT a button that stores the
information you need and pass THAT around as necessary.

Also, why would a button have a map of strings to strings? Conceptually, a
button is just a component that is used to perform a single action when it's
clicked. Why would you need to store this information on each button
instance?

If you clarify what you're trying to do, we can probably help you find a
better way to do it.

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.

Reply via email to