Skip to content

Commit b5d3e6f

Browse files
authored
Merge pull request #7093 from Bnyro/master
fix: limit bottom sheet titles to two lines
2 parents 8f856ca + d7fdbe6 commit b5d3e6f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

app/src/main/res/layout/bottom_sheet.xml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:app="http://schemas.android.com/apk/res-auto"
44
android:layout_width="match_parent"
5-
android:layout_height="match_parent">
5+
android:layout_height="match_parent"
6+
xmlns:tools="http://schemas.android.com/tools">
67

78
<FrameLayout
89
android:id="@+id/standard_bottom_sheet"
@@ -29,15 +30,19 @@
2930
android:layout_height="wrap_content"
3031
android:orientation="vertical"
3132
android:paddingBottom="12dp"
32-
android:visibility="gone">
33+
android:visibility="gone"
34+
tools:visibility="visible">
3335

3436
<TextView
3537
android:id="@+id/bottom_sheet_title"
3638
android:layout_width="wrap_content"
3739
android:layout_height="wrap_content"
3840
android:layout_marginHorizontal="10dp"
3941
android:layout_marginBottom="5dp"
40-
android:textSize="27sp" />
42+
android:maxLines="2"
43+
android:ellipsize="end"
44+
android:textSize="27sp"
45+
tools:text="Very long text that is going across more than two lines in total"/>
4146

4247
<com.google.android.material.divider.MaterialDivider
4348
android:layout_width="match_parent"

0 commit comments

Comments
 (0)