Merge "Make SeekBarPreference to be selectable" into qt-dev

This commit is contained in:
TreeHugger Robot
2019-05-21 10:28:28 +00:00
committed by Android (Google) Code Review
4 changed files with 100 additions and 4 deletions

View File

@@ -69,6 +69,13 @@ public class SeekBarPreference extends RestrictedPreference
com.android.internal.R.layout.preference_widget_seekbar);
a.recycle();
a = context.obtainStyledAttributes(
attrs, com.android.internal.R.styleable.Preference, defStyleAttr, defStyleRes);
final boolean isSelectable = a.getBoolean(
com.android.settings.R.styleable.Preference_android_selectable, false);
setSelectable(isSelectable);
a.recycle();
setLayoutResource(layoutResId);
}
@@ -93,7 +100,11 @@ public class SeekBarPreference extends RestrictedPreference
@Override
public boolean isSelectable() {
return isDisabledByAdmin();
if(isDisabledByAdmin()) {
return true;
} else {
return super.isSelectable();
}
}
@Override