In fact, I am now setting three member variables in onActivityResult() (a 
boolean, a String, and a HashMap), and i am trying to access these member 
variables in the onClick() method of a button's onClickListener. When i 
access the string and boolean variables their values are set appropriately. 
However when i access the HashMap variable its value is set to '{}', an 
empty HashMap. Is there some kind of Serialization that needs to happen 
with a complex data type?

On Saturday, April 7, 2012 7:13:09 PM UTC-7, Etienne wrote:
>
> So I am trying extend the base android.app.Application class and add 
> member variables to create global variables like in this first solution of 
> the link below.
>
> Android global 
> variable<http://stackoverflow.com/questions/1944656/android-global-variable>
>
> This works if the member variable is a simple data type like a String. But 
> how would you do it for a more complex data type? In my case i would like 
> the member variable to be of type HashMap.
>
> I am setting the member variable in onActivityResult(), and i am trying to 
> access this member variable in the onClick() method of a button's 
> onClickListener. When i access the String variable it's value is set 
> appropriately. However when i access the HashMap variable its value is set 
> to '{}', an empty HashMap.
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to