diff --git a/samples/SupportDesignDemos/AndroidManifest.xml b/samples/SupportDesignDemos/AndroidManifest.xml
index 9d724b3c9..026d090b8 100644
--- a/samples/SupportDesignDemos/AndroidManifest.xml
+++ b/samples/SupportDesignDemos/AndroidManifest.xml
@@ -235,5 +235,14 @@
+
+
+
+
+
+
+
diff --git a/samples/SupportDesignDemos/res/layout/design_bottom_sheet_hideable.xml b/samples/SupportDesignDemos/res/layout/design_bottom_sheet_hideable.xml
index 18a543e2d..d139a92eb 100644
--- a/samples/SupportDesignDemos/res/layout/design_bottom_sheet_hideable.xml
+++ b/samples/SupportDesignDemos/res/layout/design_bottom_sheet_hideable.xml
@@ -57,7 +57,7 @@
android:elevation="@dimen/bottom_sheet_elevation"
android:minHeight="@dimen/bottom_sheet_peek_height"
android:orientation="vertical"
- app:layout_behavior="android.support.design.widget.BottomSheetBehavior"
+ app:layout_behavior="@string/bottom_sheet_behavior"
app:behavior_peekHeight="@dimen/bottom_sheet_peek_height"
app:behavior_hideable="true">
diff --git a/samples/SupportDesignDemos/res/layout/design_bottom_sheet_modal.xml b/samples/SupportDesignDemos/res/layout/design_bottom_sheet_modal.xml
new file mode 100644
index 000000000..cbd3b27ec
--- /dev/null
+++ b/samples/SupportDesignDemos/res/layout/design_bottom_sheet_modal.xml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
diff --git a/samples/SupportDesignDemos/res/layout/design_bottom_sheet_persistent.xml b/samples/SupportDesignDemos/res/layout/design_bottom_sheet_persistent.xml
index 5a8139cdc..65ed72883 100644
--- a/samples/SupportDesignDemos/res/layout/design_bottom_sheet_persistent.xml
+++ b/samples/SupportDesignDemos/res/layout/design_bottom_sheet_persistent.xml
@@ -42,7 +42,7 @@
android:elevation="@dimen/bottom_sheet_elevation"
android:minHeight="@dimen/bottom_sheet_peek_height"
android:orientation="vertical"
- app:layout_behavior="android.support.design.widget.BottomSheetBehavior"
+ app:layout_behavior="@string/bottom_sheet_behavior"
app:behavior_peekHeight="@dimen/bottom_sheet_peek_height">
diff --git a/samples/SupportDesignDemos/res/layout/design_bottom_sheet_recyclerview.xml b/samples/SupportDesignDemos/res/layout/design_bottom_sheet_recyclerview.xml
new file mode 100644
index 000000000..7126262ff
--- /dev/null
+++ b/samples/SupportDesignDemos/res/layout/design_bottom_sheet_recyclerview.xml
@@ -0,0 +1,25 @@
+
+
+
diff --git a/samples/SupportDesignDemos/res/values/strings.xml b/samples/SupportDesignDemos/res/values/strings.xml
index 19b8c1e55..3903499e7 100644
--- a/samples/SupportDesignDemos/res/values/strings.xml
+++ b/samples/SupportDesignDemos/res/values/strings.xml
@@ -24,6 +24,7 @@
Text Input
BottomSheet/Persistent
BottomSheet/Hideable
+ BottomSheet/Modal
Normal size
Mini size
@@ -88,6 +89,7 @@
Bottom sheet
Persistent
Hideable
+ Modal
Hide
Show
diff --git a/samples/SupportDesignDemos/res/values/styles.xml b/samples/SupportDesignDemos/res/values/styles.xml
index 456ae58fc..db0440196 100644
--- a/samples/SupportDesignDemos/res/values/styles.xml
+++ b/samples/SupportDesignDemos/res/values/styles.xml
@@ -45,4 +45,18 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/SupportDesignDemos/src/com/example/android/support/design/widget/BottomSheetModal.java b/samples/SupportDesignDemos/src/com/example/android/support/design/widget/BottomSheetModal.java
new file mode 100644
index 000000000..f55c5905c
--- /dev/null
+++ b/samples/SupportDesignDemos/src/com/example/android/support/design/widget/BottomSheetModal.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.android.support.design.widget;
+
+import com.example.android.support.design.Cheeses;
+import com.example.android.support.design.R;
+
+import android.content.Context;
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+import android.support.design.widget.BottomSheetDialogFragment;
+import android.support.v7.app.AppCompatActivity;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+/**
+ * This demonstrates basic usage of {@link BottomSheetDialogFragment}.
+ */
+public class BottomSheetModal extends AppCompatActivity {
+
+ private static final String FRAGMENT_MODAL = "modal";
+
+ @Override
+ protected void onCreate(@Nullable Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.design_bottom_sheet_modal);
+ findViewById(R.id.show).setOnClickListener(mOnClickListener);
+ }
+
+ private View.OnClickListener mOnClickListener = new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ switch (v.getId()) {
+ case R.id.show:
+ new ModalFragment().show(getSupportFragmentManager(), FRAGMENT_MODAL);
+ break;
+ }
+ }
+ };
+
+ /**
+ * This is the bottom sheet.
+ */
+ public static class ModalFragment extends BottomSheetDialogFragment {
+
+ @Nullable
+ @Override
+ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
+ @Nullable Bundle savedInstanceState) {
+ return inflater.inflate(R.layout.design_bottom_sheet_recyclerview, container, false);
+ }
+
+ @Override
+ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
+ // For the scrolling content, you can use RecyclerView, NestedScrollView or any other
+ // View that inherits NestedScrollingChild
+ RecyclerView recyclerView =
+ (RecyclerView) view.findViewById(R.id.bottom_sheet_recyclerview);
+ Context context = recyclerView.getContext();
+ recyclerView.setLayoutManager(new LinearLayoutManager(context));
+ recyclerView.setAdapter(new SimpleStringRecyclerViewAdapter(context,
+ Cheeses.sCheeseStrings));
+ }
+
+ }
+
+}
diff --git a/samples/SupportDesignDemos/src/com/example/android/support/design/widget/BottomSheetUsageBase.java b/samples/SupportDesignDemos/src/com/example/android/support/design/widget/BottomSheetUsageBase.java
index f13e78b7c..3d1e35201 100644
--- a/samples/SupportDesignDemos/src/com/example/android/support/design/widget/BottomSheetUsageBase.java
+++ b/samples/SupportDesignDemos/src/com/example/android/support/design/widget/BottomSheetUsageBase.java
@@ -20,7 +20,6 @@ import com.example.android.support.design.R;
import com.example.android.support.design.Shakespeare;
import android.os.Bundle;
-import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.support.design.widget.BottomSheetBehavior;
import android.support.v7.app.AppCompatActivity;