Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!-- Copyright (C) 2016 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 <!-- There seems to be a bug in layout inflation where it can't use a resource to inflate a view
     17      group that sets layout_marginTop with a dimension. Work around by putting in a shell layout.
     18 -->
     19 <FrameLayout
     20     xmlns:android="http://schemas.android.com/apk/res/android"
     21     android:layout_width="match_parent"
     22     android:layout_height="match_parent"
     23     android:paddingTop="@dimen/lens_header_height">
     24 
     25     <!-- This LinearLayout is clickable so that clicks do not fall through to the fragment that
     26          is underneath the dialer_fragment. -->
     27     <LinearLayout
     28         android:background="@color/car_card"
     29         android:clickable="true"
     30         android:layout_width="match_parent"
     31         android:layout_height="match_parent"
     32         android:paddingTop="@dimen/dial_container_vertical_margin"
     33         android:orientation="horizontal" >
     34 
     35         <FrameLayout
     36             android:layout_marginTop="@dimen/dialer_dialpad_top_margin"
     37             android:layout_width="0dp"
     38             android:layout_height="match_parent"
     39             android:layout_weight="1" >
     40 
     41             <!-- This FrameLayout ensures that the back button is centered within the
     42              exit_dialer_button despite the button's touch target
     43              being smaller. -->
     44             <FrameLayout
     45                 android:layout_marginTop="@dimen/dialer_back_button_top_margin"
     46                 android:layout_gravity="start|top"
     47                 android:layout_width="@dimen/stream_content_keyline_1"
     48                 android:layout_height="@dimen/stream_content_keyline_1">
     49 
     50                 <ImageView
     51                     android:id="@+id/exit_dialer_button"
     52                     android:background="@drawable/dialpad_button_background"
     53                     android:layout_gravity="center"
     54                     android:layout_width="@dimen/stream_button_size"
     55                     android:layout_height="@dimen/stream_button_size"
     56                     android:scaleType="center"
     57                     android:tint="@color/car_tint"
     58                     android:src="@drawable/ic_down_outlined" />
     59             </FrameLayout>
     60 
     61             <include
     62                 android:layout_gravity="center_horizontal"
     63                 android:layout_height="wrap_content"
     64                 android:layout_width="wrap_content"
     65                 layout="@layout/dialpad" />
     66         </FrameLayout>
     67 
     68         <RelativeLayout
     69             android:layout_width="@dimen/dialer_dialed_number_container"
     70             android:layout_height="match_parent"
     71             android:paddingStart="@dimen/stream_content_keyline_1"
     72             android:paddingEnd="@dimen/stream_content_keyline_1"
     73             android:paddingBottom="@dimen/dialer_dialed_number_bottom_padding">
     74 
     75             <TextView
     76                 android:id="@+id/number"
     77                 android:layout_width="match_parent"
     78                 android:layout_height="@dimen/dialer_number_view_height"
     79                 android:layout_alignParentTop="true"
     80                 android:layout_alignParentStart="true"
     81                 android:paddingTop="@dimen/dialer_number_view_padding"
     82                 android:paddingBottom="@dimen/dialer_number_view_padding"
     83                 android:gravity="center"
     84                 android:focusable="true"
     85                 android:text="@string/dial_a_number"
     86                 style="@style/CarBody1" />
     87 
     88             <ImageButton
     89                 android:id="@+id/call"
     90                 android:scaleType="center"
     91                 android:src="@drawable/ic_phone"
     92                 android:layout_alignParentBottom="true"
     93                 android:layout_centerHorizontal="true"
     94                 android:elevation="@dimen/call_fab_elevation"
     95                 style="@style/DialpadCall" />
     96 
     97             <ImageButton
     98                 android:id="@+id/delete"
     99                 android:layout_alignParentBottom="true"
    100                 android:layout_width="@dimen/bksp_button_width"
    101                 android:layout_height="@dimen/bksp_button_width"
    102                 android:layout_toEndOf="@id/call"
    103                 android:layout_marginStart="16dp"
    104                 android:scaleType="centerInside"
    105                 android:src="@drawable/ic_backspace"
    106                 android:tint="@color/car_tint"
    107                 android:background="@drawable/dialpad_delete_button_background" />
    108         </RelativeLayout>
    109     </LinearLayout>
    110 
    111     <View
    112         android:background="@color/car_list_divider"
    113         android:layout_gravity="end|top"
    114         android:layout_height="match_parent"
    115         android:layout_width="@dimen/line_divider_height"
    116         android:layout_marginEnd="@dimen/dialer_dialed_number_container" />
    117 </FrameLayout>
    118