[android-developers] Is it possible to have dynamicly generated keys in a preferance screen?
On my PreferenceActivity onCreate I tried adding a ;
this.findPreference("WaveID_BillBoard_Scaleing").setKey(value
+"_BillBoard_Scaleing");
...
... (other similiar lines)
...
Where "value" was a string passed to the intent.
My intention was to be able to create an arbitary number of different
preferance "sets" each with a different prefix.
However, none of this information seems to be saving.
I'm testing it both with;
Log.i("wavepref", "BillboardScaleing set to
"+this.getPreferences(MODE_WORLD_READABLE).getString(value
+"_BillBoard_Scaleing", "no value set"));
It always says "no value set" however, and no changes are remembered
in the interface.
Do I have to manualy commit? or set the persistance to true? (isn't
that default).
--
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