Remove gear icon from InputMethodPreference.
Per comment from UX, we do not show gear icons on InputMethodPreference because there is no difference between tapping the item itself and tapping the gear icon. Bug: 27543291 Change-Id: Ieea9a13a4b7af9c90c3a2a8f365bd318663998b1
This commit is contained in:
@@ -55,7 +55,7 @@ class InputMethodPreference extends RestrictedSwitchPreference implements OnPref
|
||||
OnPreferenceChangeListener {
|
||||
private static final String TAG = InputMethodPreference.class.getSimpleName();
|
||||
private static final String EMPTY_TEXT = "";
|
||||
private static final int SETTINGS_ICON_LAYOUT = R.layout.preference_settings_icon_widget;
|
||||
private static final int NO_WIDGET = 0;
|
||||
|
||||
interface OnSavePreferenceListener {
|
||||
/**
|
||||
@@ -99,8 +99,8 @@ class InputMethodPreference extends RestrictedSwitchPreference implements OnPref
|
||||
mIsAllowedByOrganization = isAllowedByOrganization;
|
||||
mOnSaveListener = onSaveListener;
|
||||
if (!isImeEnabler) {
|
||||
// Replace switch widget with settings icon.
|
||||
setWidgetLayoutResource(SETTINGS_ICON_LAYOUT);
|
||||
// Remove switch widget.
|
||||
setWidgetLayoutResource(NO_WIDGET);
|
||||
}
|
||||
// Disable on/off switch texts.
|
||||
setSwitchTextOn(EMPTY_TEXT);
|
||||
@@ -130,7 +130,7 @@ class InputMethodPreference extends RestrictedSwitchPreference implements OnPref
|
||||
private boolean isImeEnabler() {
|
||||
// If this {@link SwitchPreference} doesn't have a widget layout, we explicitly hide the
|
||||
// switch widget at constructor.
|
||||
return getWidgetLayoutResource() != SETTINGS_ICON_LAYOUT;
|
||||
return getWidgetLayoutResource() != NO_WIDGET;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user