Skip to content

Commit

Permalink
make PlayerView notify listeners of click events (#5433 @ 0a7745b)
Browse files Browse the repository at this point in the history
references:
  google/ExoPlayer#5433
  google/ExoPlayer@0a7745b
  https:/google/ExoPlayer/blob/0a7745bc03c93709e178c578a4649eb534e8a9e0/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java#L1031

summary:
* issue #5433: "Request: allow PlayerView to be clickable"
* fix came in commit: 0a7745b
* since the ExoPlayer library is now based on a PR from an older fork,
  this fix is missing
* applying only a minimal patch
  • Loading branch information
warren-bank committed May 29, 2019
1 parent 3906421 commit 102e488
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void onBindViewHolder(RecyclerViewHolder holder, int position) {
}

@Override
public void onViewDetachedFromWindow (RecyclerViewHolder holder) {
public void onViewDetachedFromWindow(RecyclerViewHolder holder) {
holder.stop();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,12 @@ public boolean onTouchEvent(MotionEvent ev) {
if (ev.getActionMasked() != MotionEvent.ACTION_DOWN) {
return false;
}
return performClick();
}

@Override
public boolean performClick() {
super.performClick();
return toggleControllerVisibility();
}

Expand Down

0 comments on commit 102e488

Please sign in to comment.