Skip to content
Snippets Groups Projects
Commit 77308c61 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Add a property for Numpad Button text color" into sc-v2-dev am: 72c0ffd9

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15520838

Change-Id: I2144cb7fd247f9daa8f8c38b9c325bb631fc120a
parents a553714a 72c0ffd9
No related branches found
No related tags found
No related merge requests found
......@@ -62,8 +62,8 @@
<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:src">@drawable/ic_keyboard_tab_36dp</item>
<item name="android:colorControlNormal">?android:attr/textColorSecondary</item>
<item name="android:src">@drawable/ic_keyboard_tab_36dp</item>
</style>
<style name="Widget.TextView.NumPadKey.Klondike"
parent="@android:style/Widget.DeviceDefault.TextView">
......
......@@ -69,6 +69,9 @@
<!-- Shadows under the clock, date and other keyguard text fields -->
<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 name="kg_user_switcher_activated_background_color">#26000000</color>
<!-- Icon color for user avatars in keyguard user switcher -->
......
......@@ -26,7 +26,7 @@ import android.view.MotionEvent;
import androidx.annotation.Nullable;
import com.android.settingslib.Utils;
import com.android.systemui.R;
/**
* Similar to the {@link NumPadKey}, but displays an image.
......@@ -92,8 +92,7 @@ public class NumPadButton extends AlphaOptimizedImageButton {
public void reloadColors() {
if (mAnimator != null) mAnimator.reloadColors(getContext());
int textColor = Utils.getColorAttrDefaultColor(getContext(),
android.R.attr.colorBackground);
((VectorDrawable) getDrawable()).setTintList(ColorStateList.valueOf(textColor));
int imageColor = getContext().getColor(R.color.keyguard_keypad_image_color);
((VectorDrawable) getDrawable()).setTintList(ColorStateList.valueOf(imageColor));
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment