Merge "Update PIN colors" into sc-v2-dev am: c0d03ace54
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15934642 Change-Id: I6740c240eb962e011856d1a30a433585014ea52d
This commit is contained in:
@@ -20,6 +20,6 @@
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="?android:attr/colorBackground"
|
||||
android:fillColor="?android:attr/textColorPrimaryInverse"
|
||||
android:pathData="M9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59L17.59,17L14,13.41L10.41,17L9,15.59zM21,6H8l-4.5,6L8,18h13V6M21,4c1.1,0 2,0.9 2,2v12c0,1.1 -0.9,2 -2,2H8c-0.63,0 -1.22,-0.3 -1.6,-0.8L1,12l5.4,-7.2C6.78,4.3 7.37,4 8,4H21L21,4z"/>
|
||||
</vector>
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
android:viewportHeight="36"
|
||||
android:viewportWidth="36"
|
||||
android:width="36sp">
|
||||
<path android:fillColor="?android:attr/colorBackground"
|
||||
|
||||
<path android:fillColor="?android:attr/textColorPrimaryInverse"
|
||||
android:pathData="M17.59,13.41L21.17,17H7v2h14.17l-3.59,3.59L19,24l6,-6l-6,-6L17.59,
|
||||
13.41zM26,12v12h2V12H26z"/>
|
||||
</vector>
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
*/
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<resources
|
||||
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
|
||||
<!-- Keyguard PIN pad styles -->
|
||||
<style name="Keyguard.TextView" parent="@android:style/Widget.DeviceDefault.TextView">
|
||||
<item name="android:textSize">@dimen/kg_status_line_font_size</item>
|
||||
@@ -58,11 +59,11 @@
|
||||
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
||||
</style>
|
||||
<style name="NumPadKey.Delete">
|
||||
<item name="android:colorControlNormal">?android:attr/textColorSecondary</item>
|
||||
<item name="android:colorControlNormal">?androidprv:attr/colorAccentSecondaryVariant</item>
|
||||
<item name="android:src">@drawable/ic_backspace_24dp</item>
|
||||
</style>
|
||||
<style name="NumPadKey.Enter">
|
||||
<item name="android:colorControlNormal">?android:attr/textColorSecondary</item>
|
||||
<item name="android:colorControlNormal">?androidprv:attr/colorAccentSecondaryVariant</item>
|
||||
<item name="android:src">@drawable/ic_keyboard_tab_36dp</item>
|
||||
</style>
|
||||
<style name="Widget.TextView.NumPadKey.Klondike"
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
<color name="keyguard_shadow_color">#B2000000</color>
|
||||
|
||||
<!-- Color for the images in keyguard number pad buttons -->
|
||||
<color name="keyguard_keypad_image_color">@android:color/background_light</color>
|
||||
<color name="keyguard_keypad_image_color">?android:attr/textColorPrimaryInverse</color>
|
||||
|
||||
<!-- Color for rounded background for activated user in keyguard user switcher -->
|
||||
<color name="kg_user_switcher_activated_background_color">#26000000</color>
|
||||
|
||||
@@ -18,6 +18,7 @@ package com.android.keyguard;
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.graphics.drawable.RippleDrawable;
|
||||
import android.graphics.drawable.VectorDrawable;
|
||||
@@ -26,8 +27,6 @@ import android.view.MotionEvent;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.systemui.R;
|
||||
|
||||
/**
|
||||
* Similar to the {@link NumPadKey}, but displays an image.
|
||||
*/
|
||||
@@ -92,7 +91,10 @@ public class NumPadButton extends AlphaOptimizedImageButton {
|
||||
public void reloadColors() {
|
||||
if (mAnimator != null) mAnimator.reloadColors(getContext());
|
||||
|
||||
int imageColor = getContext().getColor(R.color.keyguard_keypad_image_color);
|
||||
int[] customAttrs = {android.R.attr.textColorPrimaryInverse};
|
||||
TypedArray a = getContext().obtainStyledAttributes(customAttrs);
|
||||
int imageColor = a.getColor(0, 0);
|
||||
a.recycle();
|
||||
((VectorDrawable) getDrawable()).setTintList(ColorStateList.valueOf(imageColor));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user