A couple of PreferenceActivity questions

mjtaryan

Active Member
Licensed User
Longtime User
A couple of questions:

1. If the defaults are provided, does the manager keep them so they can be restored by the user? If not, what is the best way to do this? Thanks.

2. In the example you use the names for colors (black, red, etc.). I would prefer that when the user wants to set a color, he/she can do so using the ColorPicker so that, for example, if the PreferenceScreen shows an item "Text Color" and the user taps that, the ColorPicker will open and then the name of the color they choose will be copied to the string value for Text Color. Is this possible and how?

Thanks.
 

mjtaryan

Active Member
Licensed User
Longtime User
1. Not sure that I understand. Once you call manager.Setxxx then this value is saved in the settings.
2. I think that you can do it with AHPreferenceActivity library (which is an extended version of this one).

1. I'd like to be able to keep the defaults in case the user wants to reset or start over wth one or more of the settings. For example, if the default text color is "black" and the user canges it to "navy" and later decides to reset it, I'd like to be able to provide them with the choice of "default" which would reset the text color to "black." I suppos I can do that by coding, I was merely wondering if PreferenceActivity saves the original copy -- such as part of Activity_Create with IsFirst = True and a flag = False (indicating the defaults haven't been saved yet) or something on that order.

2. I'll look at the AH... library.

Thanks.
 
Upvote 0
Top