1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 ~ Copyright (C) 2016 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 18<com.example.android.support.design.widget.CustomSnackbarMainContent 19 xmlns:android="http://schemas.android.com/apk/res/android" 20 android:theme="@style/ThemeOverlay.AppCompat.Dark" 21 android:layout_width="wrap_content" 22 android:layout_height="wrap_content" 23 android:padding="8dp"> 24 25 <ImageView 26 android:id="@+id/custom_snackbar_image_leading" 27 android:layout_width="wrap_content" 28 android:layout_height="wrap_content" 29 android:layout_alignParentLeft="true" 30 android:layout_marginRight="8dp" 31 android:src="@drawable/ic_account_circle_white_48dp" /> 32 33 <ImageView 34 android:id="@+id/custom_snackbar_image_trailing" 35 android:layout_width="wrap_content" 36 android:layout_height="wrap_content" 37 android:layout_alignParentRight="true" 38 android:layout_marginTop="8dp" 39 android:src="@drawable/ic_lightbulb_outline_white_24dp" /> 40 41 <TextView 42 android:id="@+id/custom_snackbar_title" 43 android:layout_width="match_parent" 44 android:layout_height="wrap_content" 45 android:layout_toRightOf="@id/custom_snackbar_image_leading" 46 android:layout_toLeftOf="@id/custom_snackbar_image_trailing" 47 android:layout_marginTop="4dp" 48 android:textAppearance="@style/TextAppearance.Design.Snackbar.Message" 49 android:textStyle="bold" 50 android:singleLine="true" /> 51 52 <TextView 53 android:id="@+id/custom_snackbar_subtitle" 54 android:layout_width="match_parent" 55 android:layout_height="wrap_content" 56 android:layout_toRightOf="@id/custom_snackbar_image_leading" 57 android:layout_toLeftOf="@id/custom_snackbar_image_trailing" 58 android:layout_below="@id/custom_snackbar_title" 59 android:textAppearance="@style/TextAppearance.Design.Snackbar.Message" 60 android:singleLine="true" /> 61 62</com.example.android.support.design.widget.CustomSnackbarMainContent> 63