public void onCreatePreferences(Bundle bundle, String s) { Context preferenceContext = getPreferenceManager().getContext(); PreferenceScreen screen = getPreferenceManager().createPreferenceScreen(preferenceContext); screen.setTitle(R.string.settings_dialog_title); this.mRecommendationsPref = new Preference(preferenceContext); this.mRecommendationsPref.setTitle(R.string.recommendation_blacklist_action_title); this.mRecommendationsPref.setFragment(RecommendationsPreferenceFragment.class.getName()); screen.addPreference(this.mRecommendationsPref); Preference appsAndGames = new Preference(preferenceContext); appsAndGames.setTitle(R.string.home_screen_order_action_title); appsAndGames.setFragment(AppsAndGamesPreferenceFragment.class.getName()); screen.addPreference(appsAndGames); setPreferenceScreen(screen); }
public void onCreatePreferences(Bundle bundle, String s) { PreferenceScreen screen = getPreferenceManager().createPreferenceScreen(getPreferenceManager().getContext()); screen.setTitle(R.string.recommendation_blacklist_action_title); screen.setSummary(R.string.recommendation_blacklist_content_description); setPreferenceScreen(screen); this.mBlacklistManager = new BlacklistManager(getActivity()); this.mBlacklistManager.loadRecommendationPackages(this); }
public void onCreatePreferences(Bundle bundle, String s) { Context preferenceContext = getPreferenceManager().getContext(); PreferenceScreen screen = getPreferenceManager().createPreferenceScreen(preferenceContext); screen.setTitle(R.string.home_screen_order_content_title); SortingModeManager.SortingMode sortingMode = SortingModeManager.getSavedSortingMode(preferenceContext); SwitchPreference autoSort = new SwitchPreference(preferenceContext); autoSort.setTitle(R.string.apps_order_pref_label); autoSort.setOnPreferenceChangeListener(this); autoSort.setChecked(sortingMode == SortingModeManager.SortingMode.RECENCY); screen.addPreference(autoSort); this.mReorderAppsPref = new Preference(preferenceContext); this.mReorderAppsPref.setKey("reorderapps"); this.mReorderAppsPref.setTitle(R.string.customize_app_order_action_title); screen.addPreference(this.mReorderAppsPref); this.mReorderGamesPref = new Preference(preferenceContext); this.mReorderGamesPref.setKey("reordergames"); this.mReorderGamesPref.setTitle(R.string.customize_game_order_action_title); screen.addPreference(this.mReorderGamesPref); updateSortingPreferenceVisibility(sortingMode); setPreferenceScreen(screen); }
getPreferenceScreen().setTitle(getActivity().getTitle());