Chihhang Chuang | f46381d | 2018-06-07 16:25:27 +0800 | [diff] [blame] | 1 | <?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 Chuang | eeaf888 | 2018-07-04 13:18:34 +0800 | [diff] [blame] | 18 | android:layout_height="@dimen/emergency_shortcut_button_height" |
Leo Hsu | 5f79f18 | 2019-05-13 14:26:52 +0800 | [diff] [blame] | 19 | android:layout_width="match_parent" |
| 20 | android:layout_marginBottom="@dimen/emergency_shortcut_button_margin_bottom"> |
Chihhang Chuang | f46381d | 2018-06-07 16:25:27 +0800 | [diff] [blame] | 21 | <!-- 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 Wang | 5e78539 | 2018-08-09 20:11:34 +0800 | [diff] [blame] | 26 | android:background="@drawable/btn_emergency_shortcuts" |
Chihhang Chuang | f46381d | 2018-06-07 16:25:27 +0800 | [diff] [blame] | 27 | android:focusable="true" |
| 28 | android:clickable="true"> |
| 29 | <LinearLayout |
Chihhang Chuang | eeaf888 | 2018-07-04 13:18:34 +0800 | [diff] [blame] | 30 | android:layout_height="match_parent" |
Wesley.CW Wang | 5e78539 | 2018-08-09 20:11:34 +0800 | [diff] [blame] | 31 | android:layout_width="match_parent" |
| 32 | android:layout_marginEnd="@dimen/emergency_shortcuts_margin_end" |
Chihhang Chuang | f46381d | 2018-06-07 16:25:27 +0800 | [diff] [blame] | 33 | android:layout_gravity="center_vertical|start" |
Chihhang Chuang | f46381d | 2018-06-07 16:25:27 +0800 | [diff] [blame] | 34 | android:orientation="horizontal"> |
| 35 | <FrameLayout |
Chihhang Chuang | eeaf888 | 2018-07-04 13:18:34 +0800 | [diff] [blame] | 36 | 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 Wang | 5e78539 | 2018-08-09 20:11:34 +0800 | [diff] [blame] | 39 | android:layout_marginStart="@dimen/emergency_dialer_image_margin_start" |
| 40 | android:layout_marginEnd="@dimen/emergency_dialer_image_margin_end" |
Chihhang Chuang | f46381d | 2018-06-07 16:25:27 +0800 | [diff] [blame] | 41 | android:background="@drawable/phone_type_icon_background"> |
| 42 | <ImageView |
| 43 | android:id="@+id/phone_type_icon" |
Chihhang Chuang | eeaf888 | 2018-07-04 13:18:34 +0800 | [diff] [blame] | 44 | android:layout_width="@dimen/phone_number_type_image_height" |
| 45 | android:layout_height="@dimen/phone_number_type_image_width" |
Leo Hsu | 5f79f18 | 2019-05-13 14:26:52 +0800 | [diff] [blame] | 46 | android:layout_gravity="center" |
| 47 | android:scaleType="centerInside"/> |
Chihhang Chuang | f46381d | 2018-06-07 16:25:27 +0800 | [diff] [blame] | 48 | </FrameLayout> |
| 49 | <LinearLayout |
| 50 | android:layout_height="wrap_content" |
Wesley.CW Wang | 7fce0e8 | 2018-07-17 18:05:09 +0800 | [diff] [blame] | 51 | android:layout_width="match_parent" |
Chihhang Chuang | eeaf888 | 2018-07-04 13:18:34 +0800 | [diff] [blame] | 52 | android:layout_gravity="center_vertical" |
Chihhang Chuang | f46381d | 2018-06-07 16:25:27 +0800 | [diff] [blame] | 53 | android:orientation="vertical"> |
| 54 | <TextView |
| 55 | android:id="@+id/phone_number" |
| 56 | android:layout_height="wrap_content" |
| 57 | android:layout_width="wrap_content" |
Chihhang Chuang | eeaf888 | 2018-07-04 13:18:34 +0800 | [diff] [blame] | 58 | android:includeFontPadding="false" |
Wesley.CW Wang | 7fce0e8 | 2018-07-17 18:05:09 +0800 | [diff] [blame] | 59 | android:maxLines="1" |
| 60 | android:ellipsize="end" |
Wesley.CW Wang | 5e78539 | 2018-08-09 20:11:34 +0800 | [diff] [blame] | 61 | android:lineHeight="@dimen/phone_number_line_height" |
Wesley.CW Wang | 5e78539 | 2018-08-09 20:11:34 +0800 | [diff] [blame] | 62 | android:textAppearance="@style/PhoneNumberTextAppearance"/> |
Chihhang Chuang | f46381d | 2018-06-07 16:25:27 +0800 | [diff] [blame] | 63 | <TextView |
| 64 | android:id="@+id/phone_number_description" |
| 65 | android:layout_height="wrap_content" |
| 66 | android:layout_width="wrap_content" |
Wesley.CW Wang | 5e78539 | 2018-08-09 20:11:34 +0800 | [diff] [blame] | 67 | android:alpha="0.7" |
Wesley.CW Wang | 7fce0e8 | 2018-07-17 18:05:09 +0800 | [diff] [blame] | 68 | android:maxLines="1" |
| 69 | android:ellipsize="end" |
Leo Hsu | 5f79f18 | 2019-05-13 14:26:52 +0800 | [diff] [blame] | 70 | android:textAppearance="@style/PhoneNumberTypeAppearance"/> |
Chihhang Chuang | f46381d | 2018-06-07 16:25:27 +0800 | [diff] [blame] | 71 | </LinearLayout> |
| 72 | </LinearLayout> |
Chihhang Chuang | eeaf888 | 2018-07-04 13:18:34 +0800 | [diff] [blame] | 73 | <FrameLayout |
Chihhang Chuang | f46381d | 2018-06-07 16:25:27 +0800 | [diff] [blame] | 74 | android:layout_height="wrap_content" |
| 75 | android:layout_width="wrap_content" |
Wesley.CW Wang | 5e78539 | 2018-08-09 20:11:34 +0800 | [diff] [blame] | 76 | android:layout_marginEnd="@dimen/emergency_dialer_image_margin_end" |
Chihhang Chuang | eeaf888 | 2018-07-04 13:18:34 +0800 | [diff] [blame] | 77 | 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 Hsu | 5f79f18 | 2019-05-13 14:26:52 +0800 | [diff] [blame] | 82 | android:src="@drawable/ic_emergency_callback_mode" |
Leo Hsu | 37c6c36 | 2019-05-13 21:47:50 +0800 | [diff] [blame] | 83 | android:tint="@color/emergency_call_icon_color" |
Leo Hsu | 5f79f18 | 2019-05-13 14:26:52 +0800 | [diff] [blame] | 84 | android:scaleType="centerInside"/> |
Chihhang Chuang | eeaf888 | 2018-07-04 13:18:34 +0800 | [diff] [blame] | 85 | </FrameLayout> |
Chihhang Chuang | f46381d | 2018-06-07 16:25:27 +0800 | [diff] [blame] | 86 | </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 Wang | 5e78539 | 2018-08-09 20:11:34 +0800 | [diff] [blame] | 93 | android:background="@drawable/btn_emergency_confirm_shortcuts" |
Chihhang Chuang | f46381d | 2018-06-07 16:25:27 +0800 | [diff] [blame] | 94 | android:focusable="true" |
| 95 | android:clickable="true" |
| 96 | android:visibility="invisible"> |
| 97 | <LinearLayout |
Chihhang Chuang | eeaf888 | 2018-07-04 13:18:34 +0800 | [diff] [blame] | 98 | android:layout_height="match_parent" |
Wesley.CW Wang | 5e78539 | 2018-08-09 20:11:34 +0800 | [diff] [blame] | 99 | android:layout_width="match_parent" |
| 100 | android:layout_marginEnd="@dimen/emergency_shortcuts_margin_end" |
Chihhang Chuang | f46381d | 2018-06-07 16:25:27 +0800 | [diff] [blame] | 101 | android:layout_gravity="center_vertical|start" |
| 102 | android:gravity="center_vertical" |
| 103 | android:orientation="horizontal"> |
| 104 | <FrameLayout |
Chihhang Chuang | eeaf888 | 2018-07-04 13:18:34 +0800 | [diff] [blame] | 105 | android:layout_height="@dimen/phone_number_type_circle_image_height" |
| 106 | android:layout_width="@dimen/phone_number_type_circle_image_width" |
Wesley.CW Wang | 5e78539 | 2018-08-09 20:11:34 +0800 | [diff] [blame] | 107 | android:layout_marginStart="@dimen/emergency_dialer_image_margin_start" |
| 108 | android:layout_marginEnd="@dimen/emergency_dialer_image_margin_end" |
Chihhang Chuang | eeaf888 | 2018-07-04 13:18:34 +0800 | [diff] [blame] | 109 | android:background="@drawable/phone_type_icon_background" |
| 110 | android:backgroundTint="@android:color/white"> |
Chihhang Chuang | f46381d | 2018-06-07 16:25:27 +0800 | [diff] [blame] | 111 | <ImageView |
| 112 | android:id="@+id/confirmed_phone_type_icon" |
Chihhang Chuang | eeaf888 | 2018-07-04 13:18:34 +0800 | [diff] [blame] | 113 | 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 Hsu | 5f79f18 | 2019-05-13 14:26:52 +0800 | [diff] [blame] | 116 | android:scaleType="centerInside" |
Chihhang Chuang | eeaf888 | 2018-07-04 13:18:34 +0800 | [diff] [blame] | 117 | android:tint="@color/emergency_shortcut_confirm_button_background_color"/> |
Chihhang Chuang | f46381d | 2018-06-07 16:25:27 +0800 | [diff] [blame] | 118 | </FrameLayout> |
| 119 | <FrameLayout |
| 120 | android:layout_height="wrap_content" |
Wesley.CW Wang | 7fce0e8 | 2018-07-17 18:05:09 +0800 | [diff] [blame] | 121 | android:layout_width="match_parent" |
Chihhang Chuang | eeaf888 | 2018-07-04 13:18:34 +0800 | [diff] [blame] | 122 | android:gravity="center_vertical"> |
Chihhang Chuang | f46381d | 2018-06-07 16:25:27 +0800 | [diff] [blame] | 123 | <TextView |
| 124 | android:id="@+id/phone_call_hint" |
| 125 | android:layout_height="wrap_content" |
| 126 | android:layout_width="wrap_content" |
Wesley.CW Wang | 7fce0e8 | 2018-07-17 18:05:09 +0800 | [diff] [blame] | 127 | android:maxLines="2" |
| 128 | android:ellipsize="end" |
| 129 | android:lineHeight="@dimen/phone_call_hint_line_height" |
Leo Hsu | 5f79f18 | 2019-05-13 14:26:52 +0800 | [diff] [blame] | 130 | android:textAppearance="@style/PhoneNumberTapHintAppearance"/> |
Chihhang Chuang | f46381d | 2018-06-07 16:25:27 +0800 | [diff] [blame] | 131 | </FrameLayout> |
| 132 | </LinearLayout> |
Chihhang Chuang | eeaf888 | 2018-07-04 13:18:34 +0800 | [diff] [blame] | 133 | <FrameLayout |
Chihhang Chuang | f46381d | 2018-06-07 16:25:27 +0800 | [diff] [blame] | 134 | android:layout_height="wrap_content" |
| 135 | android:layout_width="wrap_content" |
Wesley.CW Wang | 5e78539 | 2018-08-09 20:11:34 +0800 | [diff] [blame] | 136 | android:layout_marginStart="@dimen/emergency_dialer_image_margin_start" |
| 137 | android:layout_marginEnd="@dimen/emergency_dialer_image_margin_end" |
Chihhang Chuang | eeaf888 | 2018-07-04 13:18:34 +0800 | [diff] [blame] | 138 | 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 Hsu | 5f79f18 | 2019-05-13 14:26:52 +0800 | [diff] [blame] | 142 | android:src="@drawable/ic_emergency_callback_mode" |
Leo Hsu | 37c6c36 | 2019-05-13 21:47:50 +0800 | [diff] [blame] | 143 | android:tint="@color/emergency_call_icon_color" |
Leo Hsu | 5f79f18 | 2019-05-13 14:26:52 +0800 | [diff] [blame] | 144 | android:scaleType="centerInside"/> |
Chihhang Chuang | eeaf888 | 2018-07-04 13:18:34 +0800 | [diff] [blame] | 145 | </FrameLayout> |
Chihhang Chuang | f46381d | 2018-06-07 16:25:27 +0800 | [diff] [blame] | 146 | </FrameLayout> |
CY Cheng | 62afa1c | 2018-08-24 18:33:10 +0800 | [diff] [blame] | 147 | </com.android.phone.EmergencyShortcutButton> |