material-components / material-components/material-components-android

[Component name] System forces non-rounded corners for non-modal bottoms sheets (i.e. when using `com.google.android.material.bottomsheet.BottomSheetBehavior`)

Open
#4,644 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Widget: BottomSheet
Dominant language
Java
Stars
17.4k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Description

Description: This was also reported in https://github.com/material-components/material-components-android/issues/3392 but presumably closed due to inactivity and presumably a misunderstanding of the original question. System behavior for forcing bottoms sheets to have non-rounded corners in the expanded state was discussed and fixed via https://github.com/material-components/material-components-android/issues/1278 and https://github.com/material-components/material-components-android/pull/437. However, that fix seems to have only applied to modal bottom sheets, i.e. implemented via BottomSheetDialogFragment.

The alternative way to implement bottom sheets, as per design specifications, is by giving a view the app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior" and ensuring it is a child of a CoordinatorLayout. These bottom sheets are "non-modal". It seems the aforementioned fix, as well as the exposed properties of isShouldRemoveExpandedCorners and the function disableShapeAnimations() have no effect on these types of bottom sheets.

Expected behavior: A bottom sheet with rounded corners should continue to have rounded corners in an expanded state.

Source code: N/A

Minimal sample app repro: Simply implement a bottom sheet as described here and attempt to get rounded corners while in an expanded state.

Android API version: 35

Material Library version: 1.10.0

Device: Pixel 9

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the BottomSheetBehavior implementation and the linked documentation example for non-modal bottom sheets. Reproduce the issue with the minimal CoordinatorLayout sample on the stated Android and Material Library versions, then verify that expanded non-modal sheets retain their rounded corners while the relevant corner-control properties remain effective.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.