activity_main.xml

<?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/main_content" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true"> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:paddingTop="24dp"> <Button android:id="@+id/button_1" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Button 1" android:padding="16dp" android:layout_margin="8dp" android:textColor="@android:color/white" android:background="@android:color/holo_green_dark"/> <Button android:id="@+id/button_2" android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="16dp" android:layout_margin="8dp" android:text="Button 2" android:textColor="@android:color/white" android:background="@android:color/holo_blue_light"/> <Button android:id="@+id/button_3" android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="16dp" android:layout_margin="8dp" android:text="Button 3" android:textColor="@android:color/white" android:background="@android:color/holo_red_dark"/> </LinearLayout> </ScrollView> <android.support.v4.widget.NestedScrollView android:id="@+id/bottom_sheet" android:layout_width="match_parent" android:layout_height="350dp" android:clipToPadding="true" android:background="@android:color/holo_orange_light" app:layout_behavior="android.support.design.widget.BottomSheetBehavior" > <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:text="@string/ipsum" android:padding="16dp" android:textSize="16sp"/> </android.support.v4.widget.NestedScrollView> </android.support.design.widget.CoordinatorLayout>

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.