Merge "Fix sketchy bubble preference button" into rvc-qpr-dev am: 031b9fe646
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12061236 Change-Id: Ia0e5c226bab8a632bc8c499ae64df24fff41d8a1
This commit is contained in:
@@ -45,8 +45,6 @@ public class BubblePreference extends Preference implements View.OnClickListener
|
||||
private int mSelectedPreference;
|
||||
|
||||
private Context mContext;
|
||||
private Drawable mSelectedBackground;
|
||||
private Drawable mUnselectedBackground;
|
||||
|
||||
private ButtonViewHolder mBubbleAllButton;
|
||||
private ButtonViewHolder mBubbleSelectedButton;
|
||||
@@ -72,8 +70,6 @@ public class BubblePreference extends Preference implements View.OnClickListener
|
||||
mHelper = new RestrictedPreferenceHelper(context, this, attrs);
|
||||
mHelper.useAdminDisabledSummary(true);
|
||||
mContext = context;
|
||||
mSelectedBackground = mContext.getDrawable(R.drawable.button_border_selected);
|
||||
mUnselectedBackground = mContext.getDrawable(R.drawable.button_border_unselected);
|
||||
setLayoutResource(R.layout.bubble_preference);
|
||||
}
|
||||
|
||||
@@ -167,7 +163,9 @@ public class BubblePreference extends Preference implements View.OnClickListener
|
||||
}
|
||||
|
||||
void setSelected(Context context, boolean selected) {
|
||||
mView.setBackground(selected ? mSelectedBackground : mUnselectedBackground);
|
||||
mView.setBackground(mContext.getDrawable(selected
|
||||
? R.drawable.button_border_selected
|
||||
: R.drawable.button_border_unselected));
|
||||
mView.setSelected(selected);
|
||||
|
||||
ColorStateList stateList = selected
|
||||
|
Reference in New Issue
Block a user