1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- 3 Copyright (C) 2014 Google Inc. 4 Licensed to The Android Open Source Project. 5 6 Licensed under the Apache License, Version 2.0 (the "License"); 7 you may not use this file except in compliance with the License. 8 You may obtain a copy of the License at 9 10 http://www.apache.org/licenses/LICENSE-2.0 11 12 Unless required by applicable law or agreed to in writing, software 13 distributed under the License is distributed on an "AS IS" BASIS, 14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 See the License for the specific language governing permissions and 16 limitations under the License. 17 --> 18 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 19 android:layout_width="match_parent" 20 android:layout_height="wrap_content" 21 android:layout_gravity="bottom" 22 android:orientation="vertical"> 23 24 <ImageButton 25 android:id="@+id/compose_button" 26 style="@style/FloatingActionButtonStyle" /> 27 28 <com.android.mail.ui.ActionableToastBar 29 android:id="@+id/toast_bar" 30 android:layout_width="match_parent" 31 android:layout_height="wrap_content" 32 android:layout_gravity="bottom" 33 android:background="@color/snack_bar_background_color" 34 android:clickable="true" 35 android:visibility="gone"> 36 37 <!-- These children are visible when description and action text fit on one line --> 38 <LinearLayout 39 android:layout_width="match_parent" 40 android:layout_height="wrap_content" 41 android:orientation="horizontal"> 42 43 <TextView 44 android:id="@+id/description_text" 45 android:layout_width="0dp" 46 android:layout_height="wrap_content" 47 android:layout_gravity="center_vertical" 48 android:layout_weight="1" 49 android:paddingTop="@dimen/snack_bar_margin_vertical" 50 android:paddingBottom="@dimen/snack_bar_margin_vertical" 51 android:textColor="@android:color/white" 52 style="@style/SnackBarDescriptionTextStyle" /> 53 54 <TextView 55 android:id="@+id/action_text" 56 android:layout_width="wrap_content" 57 android:layout_height="wrap_content" 58 android:layout_gravity="center_vertical" 59 android:paddingTop="@dimen/snack_bar_margin_vertical" 60 android:paddingBottom="@dimen/snack_bar_margin_vertical" 61 android:textAllCaps="true" 62 android:textColor="@color/snack_bar_action_text_color" 63 style="@style/SnackBarActionTextStyle"/> 64 </LinearLayout> 65 66 <!-- These children are visible when description and action text require multiple lines --> 67 <LinearLayout 68 android:layout_width="match_parent" 69 android:layout_height="wrap_content" 70 android:orientation="vertical"> 71 72 <TextView 73 android:id="@+id/multiline_description_text" 74 android:layout_width="match_parent" 75 android:layout_height="wrap_content" 76 android:layout_marginLeft="@dimen/snack_bar_margin_horizontal" 77 android:layout_marginRight="@dimen/snack_bar_margin_horizontal" 78 android:paddingTop="@dimen/snack_bar_margin_vertical" 79 android:textColor="@android:color/white" /> 80 81 <TextView 82 android:id="@+id/multiline_action_text" 83 android:layout_width="wrap_content" 84 android:layout_height="wrap_content" 85 android:background="?attr/selectableItemBackground" 86 android:paddingTop="8dp" 87 android:paddingBottom="@dimen/snack_bar_margin_vertical" 88 android:textAllCaps="true" 89 android:textColor="@color/snack_bar_action_text_color" 90 style="@style/SnackBarActionTextStyle"/> 91 </LinearLayout> 92 93 </com.android.mail.ui.ActionableToastBar> 94 95 </LinearLayout>