Always reserve space for preference icons.
This aligns text on preferences on the same screen when some of them don't have icons. - Use a custom layout for preference EditPreference switch preference VolumeSeekPreference DialogPreferencei Restricted*Preference DropdownPreference - Moved related style defs into a new file styles_preference.xml, because current styles file is too large to read. - Switch <PreferenceScreen ...> to <Preference ...> for a bunch of regular preferences. - Also removed some dead style. Bug: 33430928 Test: runtest --path packages/apps/Settings/tests/app/src/com/android/settings/dashboard/PreferenceThemeTest.java Change-Id: Ic9b75d3f133f2a83cd999297b8596253d4b10161
This commit is contained in:
@@ -16,23 +16,23 @@
|
||||
|
||||
package com.android.settings.display;
|
||||
|
||||
import com.android.settingslib.display.DisplayDensityUtils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.v4.content.res.TypedArrayUtils;
|
||||
import android.support.v7.preference.PreferenceGroup;
|
||||
import android.support.v7.preference.Preference;
|
||||
import android.text.TextUtils;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
import com.android.settingslib.display.DisplayDensityUtils;
|
||||
|
||||
/**
|
||||
* Preference for changing the density of the display on which the preference
|
||||
* is visible.
|
||||
*/
|
||||
public class ScreenZoomPreference extends PreferenceGroup {
|
||||
public class ScreenZoomPreference extends Preference {
|
||||
public ScreenZoomPreference(Context context, AttributeSet attrs) {
|
||||
super(context, attrs, TypedArrayUtils.getAttr(context,
|
||||
android.support.v7.preference.R.attr.preferenceScreenStyle,
|
||||
android.R.attr.preferenceScreenStyle));
|
||||
android.support.v7.preference.R.attr.preferenceStyle,
|
||||
android.R.attr.preferenceStyle));
|
||||
|
||||
if (TextUtils.isEmpty(getFragment())) {
|
||||
setFragment("com.android.settings.display.ScreenZoomSettings");
|
||||
@@ -49,9 +49,4 @@ public class ScreenZoomPreference extends PreferenceGroup {
|
||||
setSummary(entries[currentIndex]);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isOnSameScreenAsChildren() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user