android - Should PreferenceCategories have keys? -


i have android app, in use preferences. grouped preferencecategory's.

my preferencecategory's have keys (android:key="setting"), ones in official tutorial settings (which used myself learn & make mine).

but recommended way of doing preferences, convention, or happen way in tutorial? don't have refer of categories in code, preferences inside, see no real reason have keys of them.

but recommended way of doing preferences, convention, or happen way in tutorial?

no, don't need set keys preferencecategories, if you're not doing them.

you can add preferences preferencecategory accessing findpreference(your_preference_category_key) , calling addpreference(...) on it. since you're not doing don't need set key it.


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -