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