1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- Copyright (C) 2018 The Android Open Source Project 3 Licensed under the Apache License, Version 2.0 (the "License"); 4 you may not use this file except in compliance with the License. 5 You may obtain a copy of the License at 6 http://www.apache.org/licenses/LICENSE-2.0 7 Unless required by applicable law or agreed to in writing, software 8 distributed under the License is distributed on an "AS IS" BASIS, 9 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 See the License for the specific language governing permissions and 11 limitations under the License. 12 --> 13 <!-- There seems to be a bug in layout inflation where it can't use a resource to inflate a view 14 group that sets layout_marginTop with a dimension. Work around by putting in a shell layout. 15 --> 16 <FrameLayout 17 xmlns:android="http://schemas.android.com/apk/res/android" 18 xmlns:app="http://schemas.android.com/apk/res-auto" 19 android:layout_width="match_parent" 20 android:layout_height="match_parent" 21 android:paddingTop="@dimen/car_app_bar_height"> 22 <android.support.constraint.ConstraintLayout 23 android:id="@+id/dialer_info_fragment_container" 24 android:paddingLeft="@dimen/car_margin" 25 android:paddingRight="@dimen/car_margin" 26 android:layout_width="match_parent" 27 android:layout_height="match_parent"> 28 29 <FrameLayout 30 android:id="@+id/dialpad_fragment_container" 31 android:layout_height="wrap_content" 32 android:layout_width="wrap_content" 33 app:layout_constraintBottom_toBottomOf="parent" 34 app:layout_constraintStart_toStartOf="parent" 35 app:layout_constraintEnd_toStartOf="parent" 36 app:layout_constraintTop_toTopOf="parent"/> 37 38 <TextView 39 android:id="@+id/title" 40 style="@style/TextAppearance.Car.Headline2" 41 android:layout_width="match_parent" 42 android:layout_height="wrap_content" 43 android:layout_marginTop="@dimen/car_padding_4" 44 android:gravity="center" 45 android:focusable="true" 46 android:maxLines="1" 47 android:text="@string/dial_a_number" 48 app:layout_constraintEnd_toEndOf="parent" 49 app:layout_constraintStart_toStartOf="parent" 50 app:layout_constraintTop_toTopOf="parent"/> 51 52 <TextView 53 android:id="@+id/body" 54 style="@style/TextAppearance.Car.Body1" 55 android:layout_width="match_parent" 56 android:layout_height="wrap_content" 57 android:layout_marginTop="@dimen/car_padding_3" 58 android:gravity="center" 59 android:visibility="gone" 60 android:maxLines="1" 61 app:layout_constraintEnd_toEndOf="parent" 62 app:layout_constraintStart_toStartOf="parent" 63 app:layout_constraintTop_toBottomOf="@+id/title"/> 64 65 <ImageButton 66 android:id="@+id/call_button" 67 style="@style/DialpadPrimaryButton" 68 android:src="@drawable/ic_phone" 69 android:layout_marginBottom="@dimen/car_padding_4" 70 app:layout_constraintBottom_toBottomOf="parent" 71 app:layout_constraintEnd_toStartOf="@+id/delete_button" 72 app:layout_constraintHorizontal_chainStyle="packed" 73 app:layout_constraintStart_toStartOf="parent"/> 74 75 <ImageButton 76 android:id="@+id/delete_button" 77 style="@style/DialpadSecondaryButton" 78 android:layout_marginBottom="@dimen/car_padding_4" 79 android:layout_marginStart="@dimen/car_padding_6" 80 android:src="@drawable/ic_backspace" 81 app:layout_constraintBottom_toBottomOf="parent" 82 app:layout_constraintEnd_toEndOf="parent" 83 app:layout_constraintStart_toEndOf="@+id/call_button"/> 84 85 <ImageButton 86 android:id="@+id/end_call_button" 87 style="@style/DialpadPrimaryButton" 88 android:layout_marginBottom="@dimen/car_padding_4" 89 android:visibility="gone" 90 app:layout_constraintBottom_toBottomOf="parent" 91 app:layout_constraintEnd_toStartOf="@+id/mute_button" 92 app:layout_constraintHorizontal_chainStyle="packed" 93 app:layout_constraintStart_toStartOf="parent"/> 94 95 <ImageButton 96 android:id="@+id/mute_button" 97 style="@style/DialpadSecondaryButton" 98 android:layout_marginBottom="@dimen/car_padding_4" 99 android:layout_marginStart="@dimen/car_padding_6" 100 android:src="@drawable/ic_mute_call_normal" 101 android:visibility="gone" 102 app:layout_constraintBottom_toBottomOf="parent" 103 app:layout_constraintEnd_toEndOf="parent" 104 app:layout_constraintStart_toEndOf="@+id/end_call_button"/> 105 </android.support.constraint.ConstraintLayout> 106 </FrameLayout>