@Retention(value=CLASS) @Target(value=METHOD) public @interface AfterPreferences
Methods annotated with AfterPreferences
will be called after
addPreferenceFromResource
is called by the generated classs.
This occurs AFTER addPreferencesFromResource
which is called at
the end of super.onCreate(). Any preference depending code should be done in
an AfterPreferences
annotated method.
The method MUST have zero parameters.
There MAY be several methods annotated with AfterPreferences
in the
same class.
Example :@EActivity public class SettingsActivity extends PreferenceActivity { @PreferenceByKey(R.string.checkBoxPref) CheckBoxPreference checkBoxPref; @AfterPreferences void initPrefs() { checkBoxPref.setChecked(false); } }
Copyright © 2010-2015. All Rights Reserved.