android - Should PreferenceCategories have keys? -
i have android app, in use preference
s. 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
Post a Comment