Merge "Update activity titles for fragments without preference screen."

This commit is contained in:
TreeHugger Robot
2017-10-26 21:14:01 +00:00
committed by Android (Google) Code Review
24 changed files with 259 additions and 171 deletions

View File

@@ -67,10 +67,7 @@ public abstract class RadioButtonPickerFragment extends InstrumentedPreferenceFr
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
super.onCreatePreferences(savedInstanceState, rootKey);
final int resId = getPreferenceScreenResId();
if (usePreferenceScreenTitle() && resId > 0) {
addPreferencesFromResource(resId);
} else {
if (!usePreferenceScreenTitle()) {
addPreferencesFromResource(R.xml.placeholder_prefs);
}
updateCandidates();
@@ -115,13 +112,6 @@ public abstract class RadioButtonPickerFragment extends InstrumentedPreferenceFr
onSelectionPerformed(success);
}
/**
* Get the res id for static preference xml for this fragment.
*/
protected int getPreferenceScreenResId() {
return -1;
}
/**
* A chance for subclasses to bind additional things to the preference.
*/