Skip to content

Commit 7a3f30b

Browse files
afohrmanhunterstich
authored andcommitted
[Side Sheet] Aligned close affordance and title text along the baseline rather than the top.
The close affordance icon and title text were previously aligned by the top. Since the icon button has extra spacing from insets and padding, the Views appeared to be misaligned. Aligning along the baseline fixes the visual misalignment. This change is in the catalog since the side sheet view is provided by the developer. PiperOrigin-RevId: 538570382
1 parent 7ee0b72 commit 7a3f30b

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

catalog/java/io/material/catalog/sidesheet/res/layout/cat_sidesheet_content.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
app:icon="@drawable/ic_close_vd_theme_24px"
3434
app:iconTint="?attr/colorOnSurfaceVariant"
3535
app:layout_constraintEnd_toEndOf="parent"
36-
app:layout_constraintTop_toTopOf="@id/side_sheet_title_text"
36+
app:layout_constraintBaseline_toBaselineOf="@id/side_sheet_title_text"
3737
tools:ignore="ContentDescription" />
3838

3939
<TextView

catalog/java/io/material/catalog/sidesheet/res/layout/cat_sidesheet_content_coplanar.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
app:icon="@drawable/ic_close_vd_theme_24px"
3232
app:iconTint="?attr/colorOnSurfaceVariant"
3333
app:layout_constraintEnd_toEndOf="parent"
34-
app:layout_constraintTop_toTopOf="parent"
34+
app:layout_constraintBaseline_toBaselineOf="@id/coplanar_side_sheet_title_text"
3535
tools:ignore="ContentDescription" />
3636

3737
<TextView

catalog/java/io/material/catalog/sidesheet/res/layout/cat_sidesheet_content_coplanar_detached.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
app:icon="@drawable/ic_close_vd_theme_24px"
3232
app:iconTint="?attr/colorOnSurfaceVariant"
3333
app:layout_constraintEnd_toEndOf="parent"
34-
app:layout_constraintTop_toTopOf="parent"
34+
app:layout_constraintBaseline_toBaselineOf="@id/coplanar_detached_side_sheet_title_text"
3535
tools:ignore="ContentDescription" />
3636

3737
<TextView

catalog/java/io/material/catalog/sidesheet/res/layout/cat_sidesheet_content_vertically_scrolling.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
app:icon="@drawable/ic_close_vd_theme_24px"
3232
app:iconTint="?attr/colorOnSurfaceVariant"
3333
app:layout_constraintEnd_toEndOf="parent"
34-
app:layout_constraintTop_toTopOf="parent"
34+
app:layout_constraintBaseline_toBaselineOf="@id/vertically_scrolling_side_sheet_title_text"
3535
tools:ignore="ContentDescription" />
3636

3737
<TextView

catalog/java/io/material/catalog/sidesheet/res/layout/cat_sidesheet_detached_content.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
app:icon="@drawable/ic_close_vd_theme_24px"
3434
app:iconTint="?attr/colorOnSurfaceVariant"
3535
app:layout_constraintEnd_toEndOf="parent"
36-
app:layout_constraintTop_toTopOf="@id/detached_side_sheet_title_text"
36+
app:layout_constraintBaseline_toBaselineOf="@id/detached_side_sheet_title_text"
3737
tools:ignore="ContentDescription" />
3838

3939
<TextView

0 commit comments

Comments
 (0)