Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!-- Copyright (C) 2014 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 
     17 <!-- Layout for the emergency dialer; see EmergencyDialer.java. -->
     18 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
     19         android:id="@+id/top"
     20         android:layout_width="match_parent"
     21         android:layout_height="match_parent"
     22         android:paddingLeft="36dp"
     23         android:paddingRight="36dp"
     24         android:paddingBottom="@dimen/dialpad_bottom_padding">
     25 
     26     <LinearLayout
     27             android:layout_width="match_parent"
     28             android:layout_height="match_parent"
     29             android:layout_gravity="bottom"
     30             android:orientation="vertical">
     31 
     32         <!-- FrameLayout -->
     33         <com.android.phone.EmergencyActionGroup
     34                 android:id="@+id/emergency_action_group"
     35                 android:layout_height="64dp"
     36                 android:layout_width="match_parent"
     37                 android:layout_marginTop="16dp"
     38                 android:layout_marginBottom="24dp">
     39 
     40             <!-- Button that says: Emergency Information -->
     41             <LinearLayout
     42                     android:layout_width="match_parent"
     43                     android:layout_height="match_parent">
     44                 <Button android:layout_width="0dp"
     45                         android:layout_height="match_parent"
     46                         android:layout_weight="1"
     47                         android:background="@drawable/btn_emergency"
     48                         android:id="@+id/action1" />
     49                 <Button android:layout_width="0dp"
     50                         android:layout_height="match_parent"
     51                         android:layout_weight="1"
     52                         android:background="@drawable/btn_emergency"
     53                         android:id="@+id/action2" />
     54                 <Button android:layout_width="0dp"
     55                         android:layout_height="match_parent"
     56                         android:layout_weight="1"
     57                         android:background="@drawable/btn_emergency"
     58                         android:id="@+id/action3" />
     59             </LinearLayout>
     60 
     61             <!-- View that shows up on top of "emergency information" button
     62             and asks you to tap again to confirm the action -->
     63             <FrameLayout
     64                     android:layout_width="match_parent"
     65                     android:layout_height="match_parent"
     66                     android:id="@+id/selected_container"
     67                     android:visibility="invisible"
     68                     android:focusable="true"
     69                     android:clickable="true">
     70 
     71                 <View
     72                         android:layout_width="match_parent"
     73                         android:layout_height="match_parent"
     74                         android:backgroundTint="#ffe53935"
     75                         android:focusable="false"
     76                         android:clickable="false"
     77                         style="?android:attr/buttonStyle"/>
     78 
     79                 <View
     80                         android:layout_width="match_parent"
     81                         android:layout_height="match_parent"
     82                         android:id="@+id/ripple_view"
     83                         android:backgroundTint="#22ffffff"
     84                         android:visibility="invisible"
     85                         android:focusable="false"
     86                         android:clickable="false"
     87                         style="?android:attr/buttonStyle"/>
     88 
     89                 <LinearLayout
     90                         android:layout_width="match_parent"
     91                         android:layout_height="match_parent"
     92                         android:orientation="vertical"
     93                         android:focusable="false"
     94                         android:clickable="false"
     95                         android:backgroundTint="#00000000"
     96                         style="?android:attr/buttonStyle">
     97                     <TextView
     98                             android:layout_width="match_parent"
     99                             android:layout_height="wrap_content"
    100                             android:gravity="center"
    101                             android:maxLines="1"
    102                             android:id="@+id/selected_label"
    103                             android:textColor="@android:color/white"
    104                             android:textAppearance="?android:attr/textAppearanceButton" />
    105                     <TextView
    106                             android:layout_width="wrap_content"
    107                             android:layout_height="wrap_content"
    108                             android:id="@+id/launch_hint"
    109                             android:maxLines="1"
    110                             android:autoSizeTextType="uniform"
    111                             android:text="@string/emergency_action_launch_hint"
    112                             android:textColor="@android:color/white"
    113                             android:textStyle="italic" />
    114                 </LinearLayout>
    115 
    116             </FrameLayout>
    117 
    118         </com.android.phone.EmergencyActionGroup>
    119 
    120         <include layout="@layout/dialpad_view_unthemed"
    121                 android:theme="?attr/dialpadTheme" />
    122 
    123     </LinearLayout>
    124 
    125     <Space
    126         android:id="@+id/floating_action_button_margin_bottom"
    127         android:layout_width="match_parent"
    128         android:layout_height="@dimen/floating_action_button_margin_bottom"
    129         android:layout_alignParentBottom="true"/>
    130 
    131     <FrameLayout
    132         android:id="@+id/floating_action_button_container"
    133         android:layout_width="@dimen/floating_action_button_width"
    134         android:layout_height="@dimen/floating_action_button_height"
    135         android:layout_gravity="center_horizontal|bottom" >
    136 
    137         <ImageButton
    138             android:id="@+id/floating_action_button"
    139             android:layout_width="wrap_content"
    140             android:layout_height="wrap_content"
    141             android:layout_gravity="center"
    142             android:background="@drawable/floating_action_button"
    143             android:contentDescription="@string/description_dial_button"
    144             android:src="@drawable/fab_ic_call"/>
    145     </FrameLayout>
    146 
    147 </FrameLayout>
    148