Merge "Fix colors in bubble settings so they're more visible" into udc-dev
This commit is contained in:
@@ -15,9 +15,12 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
|
||||||
android:shape="rectangle">
|
android:shape="rectangle">
|
||||||
|
<solid
|
||||||
|
android:color="?androidprv:attr/materialColorPrimaryContainer" />
|
||||||
<stroke
|
<stroke
|
||||||
android:width="2dp"
|
android:width="1dp"
|
||||||
android:color="?android:attr/colorAccent"/>
|
android:color="?androidprv:attr/materialColorOnPrimaryContainer"/>
|
||||||
<corners android:radius="@dimen/rect_button_radius" />
|
<corners android:radius="@dimen/rect_button_radius" />
|
||||||
</shape>
|
</shape>
|
||||||
|
@@ -15,10 +15,10 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
|
||||||
android:shape="rectangle">
|
android:shape="rectangle">
|
||||||
<stroke
|
<stroke
|
||||||
android:width="1dp"
|
android:width="1dp"
|
||||||
android:color="?android:attr/colorAccent"/>
|
android:color="?androidprv:attr/materialColorOutlineVariant"/>
|
||||||
|
|
||||||
<corners android:radius="@dimen/rect_button_radius" />
|
<corners android:radius="@dimen/rect_button_radius" />
|
||||||
</shape>
|
</shape>
|
||||||
|
@@ -167,9 +167,10 @@ public class BubblePreference extends Preference implements View.OnClickListener
|
|||||||
: R.drawable.button_border_unselected));
|
: R.drawable.button_border_unselected));
|
||||||
mView.setSelected(selected);
|
mView.setSelected(selected);
|
||||||
|
|
||||||
ColorStateList stateList = selected
|
int colorResId = selected
|
||||||
? Utils.getColorAccent(context)
|
? com.android.internal.R.attr.materialColorOnPrimaryContainer
|
||||||
: Utils.getColorAttr(context, android.R.attr.textColorPrimary);
|
: com.android.internal.R.attr.materialColorOnSurfaceVariant;
|
||||||
|
ColorStateList stateList = Utils.getColorAttr(context, colorResId);
|
||||||
mImageView.setImageTintList(stateList);
|
mImageView.setImageTintList(stateList);
|
||||||
mTextView.setTextColor(stateList);
|
mTextView.setTextColor(stateList);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user