blob: ce4d60e33b56ea135e9ee098d8aa8a1fcbd4d6b2 [file] [log] [blame]
Chihhang Chuangf46381d2018-06-07 16:25:27 +08001<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2018 The Android Open Source Project
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15-->
16<com.android.phone.EmergencyShortcutButton
17 xmlns:android="http://schemas.android.com/apk/res/android"
Chihhang Chuangeeaf8882018-07-04 13:18:34 +080018 android:layout_height="@dimen/emergency_shortcut_button_height"
Leo Hsu5f79f182019-05-13 14:26:52 +080019 android:layout_width="match_parent"
20 android:layout_marginBottom="@dimen/emergency_shortcut_button_margin_bottom">
Chihhang Chuangf46381d2018-06-07 16:25:27 +080021 <!-- Normal emergency call button view -->
22 <FrameLayout
23 android:id="@+id/emergency_call_number_info_view"
24 android:layout_height="match_parent"
25 android:layout_width="match_parent"
Wesley.CW Wang5e785392018-08-09 20:11:34 +080026 android:background="@drawable/btn_emergency_shortcuts"
Chihhang Chuangf46381d2018-06-07 16:25:27 +080027 android:focusable="true"
28 android:clickable="true">
29 <LinearLayout
Chihhang Chuangeeaf8882018-07-04 13:18:34 +080030 android:layout_height="match_parent"
Wesley.CW Wang5e785392018-08-09 20:11:34 +080031 android:layout_width="match_parent"
32 android:layout_marginEnd="@dimen/emergency_shortcuts_margin_end"
Chihhang Chuangf46381d2018-06-07 16:25:27 +080033 android:layout_gravity="center_vertical|start"
Chihhang Chuangf46381d2018-06-07 16:25:27 +080034 android:orientation="horizontal">
35 <FrameLayout
Chihhang Chuangeeaf8882018-07-04 13:18:34 +080036 android:layout_height="@dimen/phone_number_type_circle_image_height"
37 android:layout_width="@dimen/phone_number_type_circle_image_width"
38 android:layout_gravity="center_vertical"
Wesley.CW Wang5e785392018-08-09 20:11:34 +080039 android:layout_marginStart="@dimen/emergency_dialer_image_margin_start"
40 android:layout_marginEnd="@dimen/emergency_dialer_image_margin_end"
Chihhang Chuangf46381d2018-06-07 16:25:27 +080041 android:background="@drawable/phone_type_icon_background">
42 <ImageView
43 android:id="@+id/phone_type_icon"
Chihhang Chuangeeaf8882018-07-04 13:18:34 +080044 android:layout_width="@dimen/phone_number_type_image_height"
45 android:layout_height="@dimen/phone_number_type_image_width"
Leo Hsu5f79f182019-05-13 14:26:52 +080046 android:layout_gravity="center"
47 android:scaleType="centerInside"/>
Chihhang Chuangf46381d2018-06-07 16:25:27 +080048 </FrameLayout>
49 <LinearLayout
50 android:layout_height="wrap_content"
Wesley.CW Wang7fce0e82018-07-17 18:05:09 +080051 android:layout_width="match_parent"
Chihhang Chuangeeaf8882018-07-04 13:18:34 +080052 android:layout_gravity="center_vertical"
Chihhang Chuangf46381d2018-06-07 16:25:27 +080053 android:orientation="vertical">
54 <TextView
55 android:id="@+id/phone_number"
56 android:layout_height="wrap_content"
57 android:layout_width="wrap_content"
Chihhang Chuangeeaf8882018-07-04 13:18:34 +080058 android:includeFontPadding="false"
Wesley.CW Wang7fce0e82018-07-17 18:05:09 +080059 android:maxLines="1"
60 android:ellipsize="end"
Wesley.CW Wang5e785392018-08-09 20:11:34 +080061 android:lineHeight="@dimen/phone_number_line_height"
Wesley.CW Wang5e785392018-08-09 20:11:34 +080062 android:textAppearance="@style/PhoneNumberTextAppearance"/>
Chihhang Chuangf46381d2018-06-07 16:25:27 +080063 <TextView
64 android:id="@+id/phone_number_description"
65 android:layout_height="wrap_content"
66 android:layout_width="wrap_content"
Wesley.CW Wang5e785392018-08-09 20:11:34 +080067 android:alpha="0.7"
Wesley.CW Wang7fce0e82018-07-17 18:05:09 +080068 android:maxLines="1"
69 android:ellipsize="end"
Leo Hsu5f79f182019-05-13 14:26:52 +080070 android:textAppearance="@style/PhoneNumberTypeAppearance"/>
Chihhang Chuangf46381d2018-06-07 16:25:27 +080071 </LinearLayout>
72 </LinearLayout>
Chihhang Chuangeeaf8882018-07-04 13:18:34 +080073 <FrameLayout
Chihhang Chuangf46381d2018-06-07 16:25:27 +080074 android:layout_height="wrap_content"
75 android:layout_width="wrap_content"
Wesley.CW Wang5e785392018-08-09 20:11:34 +080076 android:layout_marginEnd="@dimen/emergency_dialer_image_margin_end"
Chihhang Chuangeeaf8882018-07-04 13:18:34 +080077 android:layout_gravity="center_vertical|end">
78 <ImageView
79 android:id="@+id/microphone_icon"
80 android:layout_height="@dimen/phone_icon_height"
81 android:layout_width="@dimen/phone_icon_width"
Leo Hsu5f79f182019-05-13 14:26:52 +080082 android:src="@drawable/ic_emergency_callback_mode"
Leo Hsu37c6c362019-05-13 21:47:50 +080083 android:tint="@color/emergency_call_icon_color"
Leo Hsu5f79f182019-05-13 14:26:52 +080084 android:scaleType="centerInside"/>
Chihhang Chuangeeaf8882018-07-04 13:18:34 +080085 </FrameLayout>
Chihhang Chuangf46381d2018-06-07 16:25:27 +080086 </FrameLayout>
87
88 <!-- "Tap again to call" view -->
89 <FrameLayout
90 android:id="@+id/emergency_call_confirm_view"
91 android:layout_height="match_parent"
92 android:layout_width="match_parent"
Wesley.CW Wang5e785392018-08-09 20:11:34 +080093 android:background="@drawable/btn_emergency_confirm_shortcuts"
Chihhang Chuangf46381d2018-06-07 16:25:27 +080094 android:focusable="true"
95 android:clickable="true"
96 android:visibility="invisible">
97 <LinearLayout
Chihhang Chuangeeaf8882018-07-04 13:18:34 +080098 android:layout_height="match_parent"
Wesley.CW Wang5e785392018-08-09 20:11:34 +080099 android:layout_width="match_parent"
100 android:layout_marginEnd="@dimen/emergency_shortcuts_margin_end"
Chihhang Chuangf46381d2018-06-07 16:25:27 +0800101 android:layout_gravity="center_vertical|start"
102 android:gravity="center_vertical"
103 android:orientation="horizontal">
104 <FrameLayout
Chihhang Chuangeeaf8882018-07-04 13:18:34 +0800105 android:layout_height="@dimen/phone_number_type_circle_image_height"
106 android:layout_width="@dimen/phone_number_type_circle_image_width"
Wesley.CW Wang5e785392018-08-09 20:11:34 +0800107 android:layout_marginStart="@dimen/emergency_dialer_image_margin_start"
108 android:layout_marginEnd="@dimen/emergency_dialer_image_margin_end"
Chihhang Chuangeeaf8882018-07-04 13:18:34 +0800109 android:background="@drawable/phone_type_icon_background"
110 android:backgroundTint="@android:color/white">
Chihhang Chuangf46381d2018-06-07 16:25:27 +0800111 <ImageView
112 android:id="@+id/confirmed_phone_type_icon"
Chihhang Chuangeeaf8882018-07-04 13:18:34 +0800113 android:layout_width="@dimen/phone_number_type_image_height"
114 android:layout_height="@dimen/phone_number_type_image_width"
115 android:layout_gravity="center"
Leo Hsu5f79f182019-05-13 14:26:52 +0800116 android:scaleType="centerInside"
Chihhang Chuangeeaf8882018-07-04 13:18:34 +0800117 android:tint="@color/emergency_shortcut_confirm_button_background_color"/>
Chihhang Chuangf46381d2018-06-07 16:25:27 +0800118 </FrameLayout>
119 <FrameLayout
120 android:layout_height="wrap_content"
Wesley.CW Wang7fce0e82018-07-17 18:05:09 +0800121 android:layout_width="match_parent"
Chihhang Chuangeeaf8882018-07-04 13:18:34 +0800122 android:gravity="center_vertical">
Chihhang Chuangf46381d2018-06-07 16:25:27 +0800123 <TextView
124 android:id="@+id/phone_call_hint"
125 android:layout_height="wrap_content"
126 android:layout_width="wrap_content"
Wesley.CW Wang7fce0e82018-07-17 18:05:09 +0800127 android:maxLines="2"
128 android:ellipsize="end"
129 android:lineHeight="@dimen/phone_call_hint_line_height"
Leo Hsu5f79f182019-05-13 14:26:52 +0800130 android:textAppearance="@style/PhoneNumberTapHintAppearance"/>
Chihhang Chuangf46381d2018-06-07 16:25:27 +0800131 </FrameLayout>
132 </LinearLayout>
Chihhang Chuangeeaf8882018-07-04 13:18:34 +0800133 <FrameLayout
Chihhang Chuangf46381d2018-06-07 16:25:27 +0800134 android:layout_height="wrap_content"
135 android:layout_width="wrap_content"
Wesley.CW Wang5e785392018-08-09 20:11:34 +0800136 android:layout_marginStart="@dimen/emergency_dialer_image_margin_start"
137 android:layout_marginEnd="@dimen/emergency_dialer_image_margin_end"
Chihhang Chuangeeaf8882018-07-04 13:18:34 +0800138 android:layout_gravity="center_vertical|end">
139 <ImageView
140 android:layout_height="@dimen/phone_icon_height"
141 android:layout_width="@dimen/phone_icon_width"
Leo Hsu5f79f182019-05-13 14:26:52 +0800142 android:src="@drawable/ic_emergency_callback_mode"
Leo Hsu37c6c362019-05-13 21:47:50 +0800143 android:tint="@color/emergency_call_icon_color"
Leo Hsu5f79f182019-05-13 14:26:52 +0800144 android:scaleType="centerInside"/>
Chihhang Chuangeeaf8882018-07-04 13:18:34 +0800145 </FrameLayout>
Chihhang Chuangf46381d2018-06-07 16:25:27 +0800146 </FrameLayout>
CY Cheng62afa1c2018-08-24 18:33:10 +0800147</com.android.phone.EmergencyShortcutButton>