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    <LinearLayout
25            android:layout_width="match_parent"
26            android:layout_height="match_parent"
27            android:orientation="vertical"
28            android:padding="16dp">
29
30        <TextView
31                android:layout_width="match_parent"
32                android:layout_height="wrap_content"
33                android:text="@string/bottomsheet_hideable"
34                style="@style/TextAppearance.AppCompat.Headline"/>
35
36        <Button
37                android:id="@+id/toggle"
38                android:layout_width="wrap_content"
39                android:layout_height="wrap_content"
40                android:layout_marginTop="16dp"
41                android:freezesText="true"
42                android:text="@string/bottomsheet_hide"/>
43
44    </LinearLayout>
45
46    <!--
47        This is the bottom sheet. You can use any View as a bottom sheet by marking it with
48        app:layout_behavior as BottomSheetBehavior.
49    -->
50    <LinearLayout
51            android:id="@+id/bottom_sheet"
52            android:layout_width="match_parent"
53            android:layout_height="match_parent"
54            android:layout_marginLeft="@dimen/bottom_sheet_horizontal_margin"
55            android:layout_marginRight="@dimen/bottom_sheet_horizontal_margin"
56            android:background="?android:attr/windowBackground"
57            android:elevation="@dimen/bottom_sheet_elevation"
58            android:minHeight="@dimen/bottom_sheet_peek_height"
59            android:orientation="vertical"
60            app:layout_behavior="@string/bottom_sheet_behavior"
61            app:behavior_peekHeight="@dimen/bottom_sheet_peek_height"
62            app:behavior_hideable="true">
63
64        <include layout="@layout/include_bottom_sheet"/>
65
66    </LinearLayout>
67
68    <TextView
69            android:id="@+id/slide_offset"
70            android:layout_width="128dp"
71            android:layout_height="wrap_content"
72            android:layout_gravity="top|right"
73            android:padding="8dp"
74            android:elevation="24dp"
75            android:clickable="false"
76            style="@style/TextAppearance.AppCompat.Body1"/>
77
78</android.support.design.widget.CoordinatorLayout>
79