use of android.preference.PreferenceScreen in project Signal-Android by WhisperSystems.
the class AppProtectionPreferenceFragment method initializePlatformSpecificOptions.
private void initializePlatformSpecificOptions() {
PreferenceScreen preferenceScreen = getPreferenceScreen();
Preference screenSecurityPreference = findPreference(TextSecurePreferences.SCREEN_SECURITY_PREF);
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH && screenSecurityPreference != null) {
preferenceScreen.removePreference(screenSecurityPreference);
}
}
use of android.preference.PreferenceScreen in project zxing-lib by kennydude.
the class PreferencesActivity method onCreate.
@Override
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
PreferenceScreen preferences = getPreferenceScreen();
preferences.getSharedPreferences().registerOnSharedPreferenceChangeListener(this);
decode1D = (CheckBoxPreference) preferences.findPreference(KEY_DECODE_1D);
decodeQR = (CheckBoxPreference) preferences.findPreference(KEY_DECODE_QR);
decodeDataMatrix = (CheckBoxPreference) preferences.findPreference(KEY_DECODE_DATA_MATRIX);
disableLastCheckedPref();
}
use of android.preference.PreferenceScreen in project nmid-headline by miao1007.
the class SupportPreferenceFragment method addPreferencesFromIntent.
public void addPreferencesFromIntent(Intent intent) {
requirePreferenceManager();
try {
Method m = PreferenceManager.class.getDeclaredMethod("inflateFromIntent", Intent.class, PreferenceScreen.class);
m.setAccessible(true);
PreferenceScreen screen = (PreferenceScreen) m.invoke(mPreferenceManager, intent, getPreferenceScreen());
setPreferenceScreen(screen);
} catch (Exception ignored) {
}
}
use of android.preference.PreferenceScreen in project nmid-headline by miao1007.
the class SupportPreferenceFragment method addPreferencesFromResource.
public void addPreferencesFromResource(int resId) {
requirePreferenceManager();
try {
Method m = PreferenceManager.class.getDeclaredMethod("inflateFromResource", Context.class, int.class, PreferenceScreen.class);
m.setAccessible(true);
PreferenceScreen screen = (PreferenceScreen) m.invoke(mPreferenceManager, getActivity(), resId, getPreferenceScreen());
setPreferenceScreen(screen);
} catch (Exception ignored) {
}
}
use of android.preference.PreferenceScreen in project nmid-headline by miao1007.
the class SupportPreferenceFragment method onSaveInstanceState.
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
PreferenceScreen preferenceScreen = getPreferenceScreen();
if (preferenceScreen != null) {
Bundle container = new Bundle();
preferenceScreen.saveHierarchyState(container);
outState.putBundle(PREFERENCES_TAG, container);
}
}
Aggregations