@Retention(value=CLASS) @Target(value=TYPE) public @interface PreferenceScreen
Should be used on EActivity or EFragment
classes which are subclass of PreferenceActivity or PreferenceFragment or
android.support.v7.preference.PreferenceFragmentCompat or
android.support.v14.PreferenceFragment, to inject the preference
screen from resource.
The annotation value should be one of R.xml.* fields.
Example :
@PreferenceScreen(R.xml.settings)
@EActivity
public class SettingsActivity extends PreferenceActivity {
@PreferenceByKey(R.string.myPref1)
Preference myPreference1;
@PreferenceByKey(R.string.checkBoxPref)
CheckBoxPreference checkBoxPref;
@AfterPreferences
void initPrefs() {
checkBoxPref.setChecked(false);
}
}
PreferenceHeaderspublic abstract int value
public abstract String resName
Copyright © 2010–2020 simpligility technologies inc.. All rights reserved.