<?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:accessibilityPaneTitle="@string/emergencyDialerIconLabel"
        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|center"
            android:layout_marginBottom="@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"
                android:scaleType="centerInside"
                android:backgroundTint="@color/emergency_dialpad_fab_tint_color"/>
        </FrameLayout>
    </FrameLayout>

    <!--Emergency Dialer Layout-->
    <FrameLayout
        android:id="@+id/emergency_dialer"
        android:accessibilityPaneTitle="@string/pane_title_emergency_dialpad"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        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">

            <include layout="@layout/emergency_information"/>
            <Space
                android:id="@+id/emergency_info_dialpad_spacer"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:layout_weight="1"/>
            <include layout="@layout/dialpad_view_unthemed"
                     android:layout_height="wrap_content"
                     android:layout_width="match_parent"
                     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>
