File tree 1 file changed +10
-0
lines changed
lib/java/com/google/android/material/bottomnavigation
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 20
20
21
21
import static androidx .annotation .RestrictTo .Scope .LIBRARY_GROUP ;
22
22
23
+ import android .annotation .SuppressLint ;
23
24
import android .content .Context ;
24
25
import androidx .appcompat .widget .TintTypedArray ;
25
26
import android .util .AttributeSet ;
27
+ import android .view .MotionEvent ;
26
28
import android .view .View ;
27
29
import androidx .annotation .NonNull ;
28
30
import androidx .annotation .Nullable ;
@@ -127,6 +129,14 @@ public BottomNavigationView(
127
129
applyWindowInsets ();
128
130
}
129
131
132
+ @ SuppressLint ("ClickableViewAccessibility" )
133
+ @ Override
134
+ public boolean onTouchEvent (@ NonNull MotionEvent event ) {
135
+ super .onTouchEvent (event );
136
+ // Consume all events to avoid views under the BottomNavigationView from receiving touch events.
137
+ return true ;
138
+ }
139
+
130
140
private void applyWindowInsets () {
131
141
ViewUtils .doOnApplyWindowInsets (
132
142
this ,
You can’t perform that action at this time.
0 commit comments