[android-beginners] Re: How I get values from a ListPreference??

2010-03-04 Thread JGabiMark
I did it!

Thanks a lot!

On Mar 2, 10:41 pm, TreKing treking...@gmail.com wrote:
 On Mon, Mar 1, 2010 at 4:14 PM, JGabiMark jgabim...@gmail.com wrote:
  Now I want to get the value clicked in the ListPreference, in the java
  class.

  How can I do it?

 Use the key you've specified in the XML file (in this case denbora_3g) on
 a SharedPreferences object.

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

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] How I get values from a ListPreference??

2010-03-02 Thread JGabiMark
Hi!
I'm new in this group and developing Android as well.

I'm working in a PreferenceActivity with a ListPreference.

I created the xml and array.xml well.

?xml version=1.0 encoding=utf-8?
PreferenceScreen
  xmlns:android=http://schemas.android.com/apk/res/android;
ListPreference
android:key=denbora_3g
android:title=@string/denbora_label
android:summary=@string/denbora_summary
android:entries=@array/denbora
android:entryValues=@array/denbora_values
android:defaultValue=1
/
/PreferenceScreen

?xml version=1.0 encoding=utf-8?
resources
array name=denbora
item@string/denbora_10/item
item@string/denbora_15/item
item@string/denbora_20/item
item@string/denbora_25/item
/array
array name=denbora_values
item1/item
item15000/item
item2/item
item25000/item
/array
/resources

Now I want to get the value clicked in the ListPreference, in the java
class.

How can I do it?

Thanks a lot!

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en