Skip to content

Commit 5e1a198

Browse files
author
Yevhen Babiichuk (DustDFG)
committed
VideoDetailFragment: Forcefully catch click events uncaught by children
Because otherwise they will be caught by underlying view and "click through" will happen. Workaround for #5600
1 parent 56a0436 commit 5e1a198

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,12 @@ protected void initViews(final View rootView, final Bundle savedInstanceState) {
646646
protected void initListeners() {
647647
super.initListeners();
648648

649+
// Workaround for #5600
650+
// Forcefully catch click events uncaught by children because otherwise
651+
// they will be caught by underlying view and "click through" will happen
652+
binding.getRoot().setOnClickListener(v -> { });
653+
binding.getRoot().setOnLongClickListener(v -> true);
654+
649655
setOnClickListeners();
650656
setOnLongClickListeners();
651657

0 commit comments

Comments
 (0)