1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 Copyright 2015 The Android Open Source Project 4 5 Licensed under the Apache License, Version 2.0 (the "License"); 6 you may not use this file except in compliance with the License. 7 You may obtain a copy of the License at 8 9 http://www.apache.org/licenses/LICENSE-2.0 10 11 Unless required by applicable law or agreed to in writing, software 12 distributed under the License is distributed on an "AS IS" BASIS, 13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 See the License for the specific language governing permissions and 15 limitations under the License. 16--> 17<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 18 xmlns:tools="http://schemas.android.com/tools" 19 android:layout_width="match_parent" 20 android:layout_height="match_parent" 21 android:orientation="vertical"> 22 23 <LinearLayout 24 android:layout_width="match_parent" 25 android:layout_height="wrap_content" 26 android:layout_marginEnd="@dimen/dialog_padding" 27 android:layout_marginStart="@dimen/dialog_padding" 28 android:layout_marginTop="@dimen/dialog_padding" 29 android:orientation="horizontal"> 30 31 <TextView 32 android:layout_width="wrap_content" 33 android:layout_height="match_parent" 34 android:gravity="center_vertical" 35 android:text="@string/to" 36 android:textAppearance="@android:style/TextAppearance.Material.Caption" /> 37 38 <TextView 39 android:id="@+id/contact_name" 40 android:layout_width="0dp" 41 android:layout_height="wrap_content" 42 android:layout_marginStart="16dp" 43 android:layout_weight="1" 44 android:drawablePadding="16dp" 45 android:gravity="center_vertical" 46 android:textAppearance="@android:style/TextAppearance.Material.Body1" 47 tools:drawableStart="@mipmap/logo_avatar" 48 tools:text="Taro" /> 49 50 </LinearLayout> 51 52 <TextView 53 android:layout_width="wrap_content" 54 android:layout_height="wrap_content" 55 android:layout_marginEnd="@dimen/dialog_padding" 56 android:layout_marginStart="@dimen/dialog_padding" 57 android:layout_marginTop="16dp" 58 android:gravity="center_vertical" 59 android:text="@string/body" 60 android:textAppearance="@android:style/TextAppearance.Material.Caption" /> 61 62 <TextView 63 android:id="@+id/message_body" 64 android:layout_width="match_parent" 65 android:layout_height="wrap_content" 66 android:layout_marginEnd="@dimen/dialog_padding" 67 android:layout_marginStart="@dimen/dialog_padding" 68 android:gravity="top" 69 android:hint="@string/hint_body" 70 android:padding="8dp" 71 android:textAppearance="@android:style/TextAppearance.Material.Body1" 72 tools:text="Hello, world!" /> 73 74 <Button 75 android:id="@+id/send" 76 style="@android:style/Widget.Material.Button.Borderless.Colored" 77 android:layout_width="wrap_content" 78 android:layout_height="wrap_content" 79 android:layout_gravity="end" 80 android:layout_marginBottom="@dimen/dialog_button_padding" 81 android:layout_marginEnd="@dimen/dialog_button_padding" 82 android:text="@string/send" /> 83 84</LinearLayout> 85