1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 Copyright (C) 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<android.support.design.widget.CoordinatorLayout 18 android:id="@+id/coordinator" 19 xmlns:android="http://schemas.android.com/apk/res/android" 20 xmlns:app="http://schemas.android.com/apk/res/com.example.android.support.design" 21 android:layout_width="match_parent" 22 android:layout_height="match_parent"> 23 24 <TextView 25 android:layout_width="match_parent" 26 android:layout_height="wrap_content" 27 android:text="@string/bottomsheet_persistent" 28 android:padding="16dp" 29 style="@style/TextAppearance.AppCompat.Headline"/> 30 31 <!-- 32 This is the bottom sheet. You can use any View as a bottom sheet by marking it with 33 app:layout_behavior as BottomSheetBehavior. 34 --> 35 <LinearLayout 36 android:id="@+id/bottom_sheet" 37 android:layout_width="match_parent" 38 android:layout_height="match_parent" 39 android:layout_marginLeft="@dimen/bottom_sheet_horizontal_margin" 40 android:layout_marginRight="@dimen/bottom_sheet_horizontal_margin" 41 android:background="?android:attr/windowBackground" 42 android:elevation="@dimen/bottom_sheet_elevation" 43 android:minHeight="@dimen/bottom_sheet_peek_height" 44 android:orientation="vertical" 45 app:layout_behavior="@string/bottom_sheet_behavior" 46 app:behavior_peekHeight="@dimen/bottom_sheet_peek_height"> 47 48 <include layout="@layout/include_bottom_sheet"/> 49 50 </LinearLayout> 51 52</android.support.design.widget.CoordinatorLayout> 53