Skipping interception of some gestures

This commit is contained in:
Avently 2020-08-16 22:20:37 +03:00
parent b7f50c3e12
commit 24c24d6c72
2 changed files with 17 additions and 1 deletions

View file

@ -68,6 +68,14 @@ public final class FlingBehavior extends AppBarLayout.Behavior {
return false;
}
}
final View seekBar = child.findViewById(R.id.playbackSeekBar);
if (seekBar != null) {
final boolean visible = seekBar.getGlobalVisibleRect(globalRect);
if (visible && globalRect.contains((int) ev.getRawX(), (int) ev.getRawY())) {
allowScroll = false;
return false;
}
}
allowScroll = true;
switch (ev.getActionMasked()) {
case MotionEvent.ACTION_DOWN: