Saturday, 15 June 2013

java - Shared preferences "bypass default value"? -


So I have some different checkboxes in my app and I am changing my texts with the click of a button. What I am trying to do is to save those stars in shared preferences, but I have a problem. When creating shared priorities, I have to enter a default value, but I have already set a default value in the XML file, and I have too many check boxes to set a default value for each one of them . So my question is: is there a way to "bypass" this default value? This is my code so far:

  Private String Milltoum Law (String Key) {shared reference item questionnaire SP = get indexes (). Similar references ("BifrostProfs", Android Dot Contact. MODPPRIVAT); Return Items: Healthy SPGetItamQtip (key,); }   

Thanks!

You can enter your default value ie const.java file in the constant, then the default values ​​in XML files Instead of inserting the activity, share the activity in the initial value using the priority value. Definitely read your shared preference value using default values ​​from const.java.

No comments:

Post a Comment