Skip to content

Commit f89a91f

Browse files
drchenpaulfthomas
authored andcommitted
[BottomSheet] Add drag handle to scrollable demo
PiperOrigin-RevId: 460788173
1 parent d1895cd commit f89a91f

File tree

1 file changed

+24
-13
lines changed

1 file changed

+24
-13
lines changed

catalog/java/io/material/catalog/bottomsheet/res/layout/cat_bottomsheet_scrollable_content.xml

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,41 +14,51 @@
1414
See the License for the specific language governing permissions and
1515
limitations under the License.
1616
-->
17-
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
18-
xmlns:app="http://schemas.android.com/apk/res-auto"
17+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
18+
xmlns:app="http://schemas.android.com/apk/res-auto"
19+
android:orientation="vertical"
20+
android:layout_width="match_parent"
21+
android:layout_height="match_parent">
22+
23+
<com.google.android.material.bottomsheet.BottomSheetDragHandleView
24+
android:layout_width="match_parent"
25+
android:layout_height="wrap_content"/>
26+
27+
<androidx.core.widget.NestedScrollView
1928
android:layout_width="match_parent"
2029
android:layout_height="wrap_content">
21-
<LinearLayout
30+
31+
<LinearLayout
2232
android:id="@+id/bottom_drawer_2"
2333
android:layout_width="match_parent"
2434
android:layout_height="600dp"
2535
android:orientation="vertical">
2636

27-
<TextView
37+
<TextView
2838
style="@style/selectableTextView"
2939
android:layout_width="match_parent"
3040
android:layout_height="100dp"
3141
app:drawableLeftCompat="@drawable/ic_person_add_24dp"
3242
app:drawableStartCompat="@drawable/ic_person_add_24dp"
3343
android:text="@string/cat_bottomsheet_label_add_people"/>
3444

35-
<TextView
45+
<TextView
3646
style="@style/selectableTextView"
3747
android:layout_width="match_parent"
3848
android:layout_height="100dp"
3949
app:drawableLeftCompat="@drawable/ic_link_24dp"
4050
app:drawableStartCompat="@drawable/ic_link_24dp"
4151
android:text="@string/cat_bottomsheet_label_copy_link"/>
4252

43-
<TextView
53+
<TextView
4454
style="@style/selectableTextView"
4555
android:layout_width="match_parent"
4656
android:layout_height="100dp"
4757
app:drawableLeftCompat="@drawable/ic_open_in_browser_24dp"
4858
app:drawableStartCompat="@drawable/ic_open_in_browser_24dp"
4959
android:text="@string/cat_bottomsheet_label_open_in"/>
5060

51-
<TextView
61+
<TextView
5262
style="@style/selectableTextView"
5363
android:layout_width="match_parent"
5464
android:layout_height="100dp"
@@ -57,37 +67,38 @@
5767
android:gravity="center_vertical"
5868
android:text="@string/cat_bottomsheet_label_move"/>
5969

60-
<TextView
70+
<TextView
6171
style="@style/selectableTextView"
6272
android:layout_width="match_parent"
6373
android:layout_height="100dp"
6474
app:drawableLeftCompat="@drawable/ic_offline_pin_24dp"
6575
app:drawableStartCompat="@drawable/ic_offline_pin_24dp"
6676
android:text="@string/cat_bottomsheet_label_available_offline"/>
6777

68-
<TextView
78+
<TextView
6979
style="@style/selectableTextView"
7080
android:layout_width="match_parent"
7181
android:layout_height="100dp"
7282
app:drawableLeftCompat="@drawable/ic_star_24dp"
7383
app:drawableStartCompat="@drawable/ic_star_24dp"
7484
android:text="@string/cat_bottomsheet_label_star"/>
7585

76-
<TextView
86+
<TextView
7787
style="@style/selectableTextView"
7888
android:layout_width="match_parent"
7989
android:layout_height="100dp"
8090
app:drawableLeftCompat="@drawable/ic_edit_24dp"
8191
app:drawableStartCompat="@drawable/ic_edit_24dp"
8292
android:text="@string/cat_bottomsheet_label_rename"/>
8393

84-
<TextView
94+
<TextView
8595
style="@style/selectableTextView"
8696
android:layout_width="match_parent"
8797
android:layout_height="100dp"
8898
app:drawableLeftCompat="@drawable/ic_delete_24dp"
8999
app:drawableStartCompat="@drawable/ic_delete_24dp"
90100
android:text="@string/cat_bottomsheet_label_remove"/>
91101

92-
</LinearLayout>
93-
</androidx.core.widget.NestedScrollView>
102+
</LinearLayout>
103+
</androidx.core.widget.NestedScrollView>
104+
</LinearLayout>

0 commit comments

Comments
 (0)