mirror of
https://github.com/material-components/material-components-android.git
synced 2026-01-19 19:41:35 +08:00
Transformation- Ignore the scrim when updating accessibility importance. The scrim is used to dismiss an expanded FAB, so this helps ensure that the scrim remains clickable with Switch Access and TalkBack after a FAB has been expanded.
PiperOrigin-RevId: 194445155
This commit is contained in:
parent
12b927b12b
commit
e75ec0d6fd
@ -87,7 +87,13 @@ public class FabTransformationSheetBehavior extends FabTransformationBehavior {
|
||||
|
||||
for (int i = 0; i < childCount; i++) {
|
||||
final View child = parent.getChildAt(i);
|
||||
if (child == sheet) {
|
||||
|
||||
// Don't change the accessibility importance of the sheet or the scrim.
|
||||
boolean hasScrimBehavior =
|
||||
(child.getLayoutParams() instanceof CoordinatorLayout.LayoutParams)
|
||||
&& (((CoordinatorLayout.LayoutParams) child.getLayoutParams()).getBehavior()
|
||||
instanceof FabTransformationScrimBehavior);
|
||||
if (child == sheet || hasScrimBehavior) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user