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 android:contentDescription="@string/compose" 27 style="@style/FloatingActionButtonStyle" /> 28 29 <com.android.mail.ui.ActionableToastBar 30 android:id="@+id/toast_bar" 31 android:layout_width="match_parent" 32 android:layout_height="wrap_content" 33 android:layout_gravity="bottom" 34 android:background="@color/snack_bar_background_color" 35 android:clickable="true" 36 android:visibility="gone"> 37 38 <!-- These children are visible when description and action text fit on one line --> 39 <LinearLayout 40 android:layout_width="match_parent" 41 android:layout_height="wrap_content" 42 android:orientation="horizontal"> 43 44 <TextView 45 android:id="@+id/description_text" 46 android:layout_width="0dp" 47 android:layout_height="wrap_content" 48 android:layout_gravity="center_vertical" 49 android:layout_marginLeft="@dimen/snack_bar_margin_horizontal" 50 android:layout_marginRight="@dimen/snack_bar_margin_horizontal" 51 android:layout_weight="1" 52 android:paddingTop="@dimen/snack_bar_margin_vertical" 53 android:paddingBottom="@dimen/snack_bar_margin_vertical" 54 android:textColor="@android:color/white" /> 55 56 <TextView 57 android:id="@+id/action_text" 58 android:layout_width="wrap_content" 59 android:layout_height="wrap_content" 60 android:layout_gravity="center_vertical" 61 android:paddingTop="@dimen/snack_bar_margin_vertical" 62 android:paddingBottom="@dimen/snack_bar_margin_vertical" 63 android:textAllCaps="true" 64 android:textColor="@color/snack_bar_action_text_color" 65 style="@style/SnackBarActionTextStyle"/> 66 </LinearLayout> 67 68 <!-- These children are visible when description and action text require multiple lines --> 69 <LinearLayout 70 android:layout_width="match_parent" 71 android:layout_height="wrap_content" 72 android:orientation="vertical"> 73 74 <TextView 75 android:id="@+id/multiline_description_text" 76 android:layout_width="match_parent" 77 android:layout_height="wrap_content" 78 android:layout_marginLeft="@dimen/snack_bar_margin_horizontal" 79 android:layout_marginRight="@dimen/snack_bar_margin_horizontal" 80 android:paddingTop="@dimen/snack_bar_margin_vertical" 81 android:paddingBottom="@dimen/snack_bar_margin_vertical" 82 android:textColor="@android:color/white" /> 83 84 <TextView 85 android:id="@+id/multiline_action_text" 86 android:layout_width="wrap_content" 87 android:layout_height="wrap_content" 88 android:layout_marginTop="8dp" 89 android:layout_marginLeft="@dimen/snack_bar_margin_horizontal" 90 android:layout_marginRight="@dimen/snack_bar_margin_horizontal" 91 android:paddingTop="@dimen/snack_bar_margin_vertical" 92 android:paddingBottom="@dimen/snack_bar_margin_vertical" 93 android:textAllCaps="true" 94 android:textColor="@color/snack_bar_action_text_color" 95 style="@style/SnackBarActionTextStyle"/> 96 </LinearLayout> 97 98 </com.android.mail.ui.ActionableToastBar> 99 100 </LinearLayout>