File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
lib/java/com/google/android/material/slider Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 80
80
import android .view .ViewTreeObserver ;
81
81
import android .view .accessibility .AccessibilityEvent ;
82
82
import android .view .accessibility .AccessibilityManager ;
83
+ import android .view .accessibility .AccessibilityNodeInfo ;
83
84
import android .widget .SeekBar ;
84
85
import androidx .annotation .ColorInt ;
85
86
import androidx .annotation .ColorRes ;
@@ -3484,6 +3485,14 @@ private boolean isThisAndAncestorsVisible() {
3484
3485
return (VERSION .SDK_INT >= VERSION_CODES .N ) ? thisAndAncestorsVisible : isShown ();
3485
3486
}
3486
3487
3488
+ @ Override
3489
+ public void onInitializeAccessibilityNodeInfo (AccessibilityNodeInfo info ) {
3490
+ super .onInitializeAccessibilityNodeInfo (info );
3491
+ // Setting visible to user to false prevents duplicate announcements by making only our virtual
3492
+ // view accessible, not the parent container.
3493
+ info .setVisibleToUser (false );
3494
+ }
3495
+
3487
3496
@ Override
3488
3497
public void onVisibilityAggregated (boolean isVisible ) {
3489
3498
super .onVisibilityAggregated (isVisible );
You can’t perform that action at this time.
0 commit comments