Merge "Add a property for Numpad Button text color" into sc-v2-dev am: 72c0ffd964
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15520838 Change-Id: I2144cb7fd247f9daa8f8c38b9c325bb631fc120a
This commit is contained in:
@@ -62,8 +62,8 @@
|
|||||||
<item name="android:src">@drawable/ic_backspace_24dp</item>
|
<item name="android:src">@drawable/ic_backspace_24dp</item>
|
||||||
</style>
|
</style>
|
||||||
<style name="NumPadKey.Enter">
|
<style name="NumPadKey.Enter">
|
||||||
<item name="android:colorControlNormal">?android:attr/textColorSecondary</item>
|
<item name="android:colorControlNormal">?android:attr/textColorSecondary</item>
|
||||||
<item name="android:src">@drawable/ic_keyboard_tab_36dp</item>
|
<item name="android:src">@drawable/ic_keyboard_tab_36dp</item>
|
||||||
</style>
|
</style>
|
||||||
<style name="Widget.TextView.NumPadKey.Klondike"
|
<style name="Widget.TextView.NumPadKey.Klondike"
|
||||||
parent="@android:style/Widget.DeviceDefault.TextView">
|
parent="@android:style/Widget.DeviceDefault.TextView">
|
||||||
|
|||||||
@@ -69,6 +69,9 @@
|
|||||||
<!-- Shadows under the clock, date and other keyguard text fields -->
|
<!-- Shadows under the clock, date and other keyguard text fields -->
|
||||||
<color name="keyguard_shadow_color">#B2000000</color>
|
<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 for rounded background for activated user in keyguard user switcher -->
|
<!-- Color for rounded background for activated user in keyguard user switcher -->
|
||||||
<color name="kg_user_switcher_activated_background_color">#26000000</color>
|
<color name="kg_user_switcher_activated_background_color">#26000000</color>
|
||||||
<!-- Icon color for user avatars in keyguard user switcher -->
|
<!-- Icon color for user avatars in keyguard user switcher -->
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import android.view.MotionEvent;
|
|||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import com.android.settingslib.Utils;
|
import com.android.systemui.R;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Similar to the {@link NumPadKey}, but displays an image.
|
* Similar to the {@link NumPadKey}, but displays an image.
|
||||||
@@ -92,8 +92,7 @@ public class NumPadButton extends AlphaOptimizedImageButton {
|
|||||||
public void reloadColors() {
|
public void reloadColors() {
|
||||||
if (mAnimator != null) mAnimator.reloadColors(getContext());
|
if (mAnimator != null) mAnimator.reloadColors(getContext());
|
||||||
|
|
||||||
int textColor = Utils.getColorAttrDefaultColor(getContext(),
|
int imageColor = getContext().getColor(R.color.keyguard_keypad_image_color);
|
||||||
android.R.attr.colorBackground);
|
((VectorDrawable) getDrawable()).setTintList(ColorStateList.valueOf(imageColor));
|
||||||
((VectorDrawable) getDrawable()).setTintList(ColorStateList.valueOf(textColor));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user