Here is the my subclass of Application
public class MyApp extends Application {
private HashMapString, Boolean selectedContacts = null;
public HashMapString, Boolean getSelectedContacts() {
return this.selectedContacts;
}
public void setSelectedContacts(HashMapString, Boolean sc) {
Have you stepped through the code? Is the HahMap valid when you put it in
the Intent? When you get it back, is it valid then?
-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
Don't do this anyway. Creating global variable? For me it looks to a bad
and ugly solution.
If you want persistent data your SharedPreferences.
On 9 April 2012 00:28, TreKing treking...@gmail.com wrote:
Have you stepped through the code? Is the HahMap valid when you put it in
the Intent? When
sorry your = use
On 9 April 2012 01:58, Gergely Juhász jg.sv...@gmail.com wrote:
Don't do this anyway. Creating global variable? For me it looks to a bad
and ugly solution.
If you want persistent data your SharedPreferences.
On 9 April 2012 00:28, TreKing treking...@gmail.com wrote:
Have
The HashMap is valid when i put it in the Intent, and when I get it back it
is also valid.
UPDATE:
So I fixed this issue. In my onActivityResult, I was iterating through the
HashMap like so:
IteratorEntryString, Boolean it = sc.entrySet().iterator();
while (it.hasNext()) {
HashMap.Entry
Good to hear, but I agree with Gergely's advice, why are you doing
this in the first place?
kris
On Sun, Apr 8, 2012 at 9:37 PM, Etienne lawloretie...@gmail.com wrote:
The HashMap is valid when i put it in the Intent, and when I get it back it
is also valid.
UPDATE:
So I fixed this issue.
To elaborate, global variables a la application object are usually an
anti-pattern
On Sun, Apr 8, 2012 at 9:54 PM, Kristopher Micinski
krismicin...@gmail.com wrote:
Good to hear, but I agree with Gergely's advice, why are you doing
this in the first place?
kris
On Sun, Apr 8, 2012 at 9:37
I am using the application object to maintain global application state.
What are the disadvantages of sub-classing the Application class? And what
advantages do SharedPreferences have over my solution?
--
You received this message because you are subscribed to the Google
Groups
On Sun, Apr 8, 2012 at 10:45 PM, Etienne lawloretie...@gmail.com wrote:
I am using the application object to maintain global application state.
What are the disadvantages of sub-classing the Application class? And what
advantages do SharedPreferences have over my solution?
I do this as
On Sun, Apr 8, 2012 at 11:45 PM, Etienne lawloretie...@gmail.com wrote:
I am using the application object to maintain global application state.
What are the disadvantages of sub-classing the Application class? And what
advantages do SharedPreferences have over my solution?
I don't think
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
variablehttp://stackoverflow.com/questions/1944656/android-global-variable
This works if the member variable is a
On Sat, Apr 7, 2012 at 9:13 PM, Etienne lawloretie...@gmail.com wrote:
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
12 matches
Mail list logo