| <?xml version="1.0" encoding="utf-8"?> |
| <!-- Copyright (C) 2018 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. |
| --> |
| <com.android.phone.EmergencyShortcutButton |
| xmlns:android="http://schemas.android.com/apk/res/android" |
| android:layout_height="@dimen/emergency_shortcut_button_height" |
| android:layout_width="match_parent" |
| android:layout_marginBottom="@dimen/emergency_shortcut_button_margin_bottom"> |
| <!-- Normal emergency call button view --> |
| <FrameLayout |
| android:id="@+id/emergency_call_number_info_view" |
| android:layout_height="match_parent" |
| android:layout_width="match_parent" |
| android:background="@drawable/btn_emergency_shortcuts" |
| android:focusable="true" |
| android:clickable="true"> |
| <LinearLayout |
| android:layout_height="match_parent" |
| android:layout_width="match_parent" |
| android:layout_marginEnd="@dimen/emergency_shortcuts_margin_end" |
| android:layout_gravity="center_vertical|start" |
| android:orientation="horizontal"> |
| <FrameLayout |
| android:layout_height="@dimen/phone_number_type_circle_image_height" |
| android:layout_width="@dimen/phone_number_type_circle_image_width" |
| android:layout_gravity="center_vertical" |
| android:layout_marginStart="@dimen/emergency_dialer_image_margin_start" |
| android:layout_marginEnd="@dimen/emergency_dialer_image_margin_end" |
| android:background="@drawable/phone_type_icon_background"> |
| <ImageView |
| android:id="@+id/phone_type_icon" |
| android:layout_width="@dimen/phone_number_type_image_height" |
| android:layout_height="@dimen/phone_number_type_image_width" |
| android:layout_gravity="center" |
| android:scaleType="centerInside"/> |
| </FrameLayout> |
| <LinearLayout |
| android:layout_height="wrap_content" |
| android:layout_width="match_parent" |
| android:layout_gravity="center_vertical" |
| android:orientation="vertical"> |
| <TextView |
| android:id="@+id/phone_number" |
| android:layout_height="wrap_content" |
| android:layout_width="wrap_content" |
| android:includeFontPadding="false" |
| android:maxLines="1" |
| android:ellipsize="end" |
| android:lineHeight="@dimen/phone_number_line_height" |
| android:textAppearance="@style/PhoneNumberTextAppearance"/> |
| <TextView |
| android:id="@+id/phone_number_description" |
| android:layout_height="wrap_content" |
| android:layout_width="wrap_content" |
| android:alpha="0.7" |
| android:maxLines="1" |
| android:ellipsize="end" |
| android:textAppearance="@style/PhoneNumberTypeAppearance"/> |
| </LinearLayout> |
| </LinearLayout> |
| <FrameLayout |
| android:layout_height="wrap_content" |
| android:layout_width="wrap_content" |
| android:layout_marginEnd="@dimen/emergency_dialer_image_margin_end" |
| android:layout_gravity="center_vertical|end"> |
| <ImageView |
| android:id="@+id/microphone_icon" |
| android:layout_height="@dimen/phone_icon_height" |
| android:layout_width="@dimen/phone_icon_width" |
| android:src="@drawable/ic_emergency_callback_mode" |
| android:tint="@color/emergency_call_icon_color" |
| android:scaleType="centerInside"/> |
| </FrameLayout> |
| </FrameLayout> |
| |
| <!-- "Tap again to call" view --> |
| <FrameLayout |
| android:id="@+id/emergency_call_confirm_view" |
| android:layout_height="match_parent" |
| android:layout_width="match_parent" |
| android:background="@drawable/btn_emergency_confirm_shortcuts" |
| android:focusable="true" |
| android:clickable="true" |
| android:visibility="invisible"> |
| <LinearLayout |
| android:layout_height="match_parent" |
| android:layout_width="match_parent" |
| android:layout_marginEnd="@dimen/emergency_shortcuts_margin_end" |
| android:layout_gravity="center_vertical|start" |
| android:gravity="center_vertical" |
| android:orientation="horizontal"> |
| <FrameLayout |
| android:layout_height="@dimen/phone_number_type_circle_image_height" |
| android:layout_width="@dimen/phone_number_type_circle_image_width" |
| android:layout_marginStart="@dimen/emergency_dialer_image_margin_start" |
| android:layout_marginEnd="@dimen/emergency_dialer_image_margin_end" |
| android:background="@drawable/phone_type_icon_background" |
| android:backgroundTint="@android:color/white"> |
| <ImageView |
| android:id="@+id/confirmed_phone_type_icon" |
| android:layout_width="@dimen/phone_number_type_image_height" |
| android:layout_height="@dimen/phone_number_type_image_width" |
| android:layout_gravity="center" |
| android:scaleType="centerInside" |
| android:tint="@color/emergency_shortcut_confirm_button_background_color"/> |
| </FrameLayout> |
| <FrameLayout |
| android:layout_height="wrap_content" |
| android:layout_width="match_parent" |
| android:gravity="center_vertical"> |
| <TextView |
| android:id="@+id/phone_call_hint" |
| android:layout_height="wrap_content" |
| android:layout_width="wrap_content" |
| android:maxLines="2" |
| android:ellipsize="end" |
| android:lineHeight="@dimen/phone_call_hint_line_height" |
| android:textAppearance="@style/PhoneNumberTapHintAppearance"/> |
| </FrameLayout> |
| </LinearLayout> |
| <FrameLayout |
| android:layout_height="wrap_content" |
| android:layout_width="wrap_content" |
| android:layout_marginStart="@dimen/emergency_dialer_image_margin_start" |
| android:layout_marginEnd="@dimen/emergency_dialer_image_margin_end" |
| android:layout_gravity="center_vertical|end"> |
| <ImageView |
| android:layout_height="@dimen/phone_icon_height" |
| android:layout_width="@dimen/phone_icon_width" |
| android:src="@drawable/ic_emergency_callback_mode" |
| android:tint="@color/emergency_call_icon_color" |
| android:scaleType="centerInside"/> |
| </FrameLayout> |
| </FrameLayout> |
| </com.android.phone.EmergencyShortcutButton> |