Add ripple and border to emergency call button

Bug: 149109279
Test: visual (on walleye and crosshatch)
Change-Id: Iaa29965f63ae92c26f6924e4934eb7cb6b2754ce
(cherry picked from commit d35002d362)
This commit is contained in:
Lucas Dupin
2020-07-17 15:01:02 -07:00
parent ccb263c9cb
commit e830adfef6
4 changed files with 42 additions and 9 deletions

View File

@@ -2122,7 +2122,7 @@
<!-- On the unlock pattern screen, shown at the top of the unlock screen to tell the user what to do. Below this text is the place for theu ser to draw the pattern. -->
<string name="lockscreen_pattern_instructions">Draw pattern to unlock</string>
<!-- Button at the bottom of the unlock screen to make an emergency call or access other emergency assistance functions. -->
<string name="lockscreen_emergency_call">Emergency</string>
<string name="lockscreen_emergency_call">Emergency call</string>
<!-- Button at the bottom of the unlock screen that lets the user return to a call -->
<string name="lockscreen_return_to_call">Return to call</string>
<!-- Shown to confirm that the user entered their lock pattern correctly. -->

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2020 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?attr/wallpaperTextColorSecondary">
<item android:id="@android:id/background">
<shape
android:color="@android:color/transparent">
<stroke android:width="1dp" android:color="?attr/wallpaperTextColorSecondary"/>
<corners android:radius="24dp"/>
</shape>
</item>
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="?attr/wallpaperTextColorSecondary"/>
<corners android:radius="24dp"/>
</shape>
</item>
</ripple>

View File

@@ -33,6 +33,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/Keyguard.TextView"
android:layout_marginBottom="8dp"
android:singleLine="true"
android:ellipsize="marquee"
android:visibility="gone"
@@ -42,11 +43,9 @@
<com.android.keyguard.EmergencyButton
android:id="@+id/emergency_call_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginTop="@dimen/eca_overlap"
android:layout_height="32dp"
android:layout_marginBottom="12dp"
android:text="@*android:string/lockscreen_emergency_call"
style="@style/Keyguard.TextView.EmergencyButton"
android:textAllCaps="@bool/kg_use_all_caps" />
style="@style/Keyguard.TextView.EmergencyButton" />
</com.android.keyguard.EmergencyCarrierArea>

View File

@@ -23,10 +23,12 @@
<item name="android:textColor">?attr/wallpaperTextColorSecondary</item>
<item name="android:textSize">@dimen/kg_status_line_font_size</item>
</style>
<style name="Keyguard.TextView.EmergencyButton" parent="@android:style/DeviceDefault.ButtonBar">
<style name="Keyguard.TextView.EmergencyButton" parent="Theme.SystemUI">
<item name="android:textColor">?attr/wallpaperTextColorSecondary</item>
<item name="android:textSize">@dimen/kg_status_line_font_size</item>
<item name="android:background">@null</item>
<item name="android:textSize">14dp</item>
<item name="android:background">@drawable/kg_emergency_button_background</item>
<item name="android:paddingLeft">12dp</item>
<item name="android:paddingRight">12dp</item>
</style>
<style name="Widget.TextView.NumPadKey" parent="@android:style/Widget.TextView">
<item name="android:singleLine">true</item>