blob: cdb95304cae9de074e9b725bcedc3b75e0bd4d98 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 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.
-->
<!-- Layout for the emergency dialer; see EmergencyDialer.java. -->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- Emergency dialer shortcuts layout-->
<FrameLayout
android:id="@+id/emergency_dialer_shortcuts"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/emergency_information"/>
<include layout="@layout/emergency_shortcut_buttons_group"/>
</LinearLayout>
<FrameLayout
android:id="@+id/dialpad_button_container"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/emergency_dialer_dialpad_button_margin">
<ImageButton
android:id="@+id/floating_action_button_dialpad"
android:layout_width="@dimen/dialpad_button_width"
android:layout_height="@dimen/dialpad_button_height"
android:background="@drawable/floating_action_button_red"
android:contentDescription="@string/description_dialpad_button"
android:src="@drawable/ic_dialpad_white_24"/>
</FrameLayout>
</FrameLayout>
<!--Emergency Dialer Layout-->
<FrameLayout
android:id="@+id/emergency_dialer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="36dp"
android:paddingRight="36dp"
android:paddingBottom="@dimen/dialpad_bottom_padding"
android:visibility="visible">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="bottom"
android:orientation="vertical">
<!--Emergency dialer shortcuts implement EmergencyInfoGroup to replace
EmergencyActionGroup. Using a title to indicate the dialpad is emergency calls only.-->
<FrameLayout
android:id="@+id/emergency_dialpad_title_container"
android:layout_height="64dp"
android:layout_width="match_parent"
android:layout_marginTop="16dp"
android:layout_marginBottom="24dp"
android:visibility="gone">
<TextView
android:id="@+id/emergency_dialpad_title"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="center"
android:textStyle="bold"
android:maxLines="1"
android:text="@string/emergency_dialpad_title"/>
</FrameLayout>
<!-- FrameLayout -->
<com.android.phone.EmergencyActionGroup
android:id="@+id/emergency_action_group"
android:layout_height="64dp"
android:layout_width="match_parent"
android:layout_marginTop="16dp"
android:layout_marginBottom="24dp">
<!-- Button that says: Emergency Information -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@drawable/btn_emergency"
android:id="@+id/action1" />
<Button android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@drawable/btn_emergency"
android:id="@+id/action2" />
<Button android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@drawable/btn_emergency"
android:id="@+id/action3" />
</LinearLayout>
<!-- View that shows up on top of "emergency information" button
and asks you to tap again to confirm the action -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/selected_container"
android:visibility="invisible"
android:focusable="true"
android:clickable="true">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:backgroundTint="#ffe53935"
android:focusable="false"
android:clickable="false"
style="?android:attr/buttonStyle"/>
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/ripple_view"
android:backgroundTint="#22ffffff"
android:visibility="invisible"
android:focusable="false"
android:clickable="false"
style="?android:attr/buttonStyle"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:focusable="false"
android:clickable="false"
android:backgroundTint="#00000000"
style="?android:attr/buttonStyle">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:maxLines="1"
android:id="@+id/selected_label"
android:textColor="@android:color/white"
android:textAppearance="?android:attr/textAppearanceButton" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/launch_hint"
android:maxLines="1"
android:autoSizeTextType="uniform"
android:text="@string/emergency_action_launch_hint"
android:textColor="@android:color/white"
android:textStyle="italic" />
</LinearLayout>
</FrameLayout>
</com.android.phone.EmergencyActionGroup>
<include layout="@layout/dialpad_view_unthemed"
android:theme="?attr/dialpadTheme" />
</LinearLayout>
<Space
android:id="@+id/floating_action_button_margin_bottom"
android:layout_width="match_parent"
android:layout_height="@dimen/floating_action_button_margin_bottom"
android:layout_alignParentBottom="true"/>
<FrameLayout
android:id="@+id/floating_action_button_container"
android:layout_width="@dimen/floating_action_button_width"
android:layout_height="@dimen/floating_action_button_height"
android:layout_gravity="center_horizontal|bottom" >
<ImageButton
android:id="@+id/floating_action_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@drawable/floating_action_button"
android:contentDescription="@string/description_dial_button"
android:src="@drawable/fab_ic_call"/>
</FrameLayout>
</FrameLayout>
</FrameLayout>