Thursday, June 10, 2010

[android-developers] Int to string

It seems like in my code that my app is crashing because it is a int and not a string. This is my code:
I am assuming that tmp has a value.. For debugging what is the best way to check varibles for values?
 
If i remove the line with the red text everything runs fine.

EditText text;

text = (EditText) findViewById(R.id.

EditText01);

SharedPreferences myPrefs =

this.getSharedPreferences("muter", MODE_WORLD_READABLE);

SharedPreferences.Editor prefsEditor = myPrefs.edit();

int tmp = myPrefs.getInt("state", 0);

text.setText(tmp);

 

Thanks in advance!

Jason

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate