Skip to content

Commit 2933600

Browse files
cketchamhunterstich
authored andcommitted
[BottomSheet] Prevent adding half expanded accessibility action if fitToContents is true
PiperOrigin-RevId: 356805609
1 parent 799a78c commit 2933600

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/java/com/google/android/material/bottomsheet/BottomSheetBehavior.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1792,7 +1792,7 @@ private void updateAccessibilityActions() {
17921792
if (expandHalfwayActionId != View.NO_ID) {
17931793
ViewCompat.removeAccessibilityAction(child, expandHalfwayActionId);
17941794
}
1795-
if (state != STATE_HALF_EXPANDED) {
1795+
if (!fitToContents && state != STATE_HALF_EXPANDED) {
17961796
expandHalfwayActionId =
17971797
addAccessibilityActionForState(
17981798
child, R.string.bottomsheet_action_expand_halfway, STATE_HALF_EXPANDED);

0 commit comments

Comments
 (0)