Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SimpleExoPlayerView#onTouchEvent() should return false if useController is false #1923

Closed
xuxucode opened this issue Oct 10, 2016 · 1 comment
Labels

Comments

@xuxucode
Copy link

I don't want player controller, hence set app:use_controller="false" in layout, but the touch event is consumed by the view. I think it shouldn't, does it make sense?

before:

  @Override
  public boolean onTouchEvent(MotionEvent ev) {
    if (useController && ev.getActionMasked() == MotionEvent.ACTION_DOWN) {
      if (controller.isVisible()) {
        controller.hide();
      } else {
        controller.show();
      }
    }
    return true;
  }

After:

  @Override
  public boolean onTouchEvent(MotionEvent ev) {
    if (useController && ev.getActionMasked() == MotionEvent.ACTION_DOWN) {
      if (controller.isVisible()) {
        controller.hide();
      } else {
        controller.show();
      }
      return true;
    }
    return false;
  }
@ojw28 ojw28 added the bug label Oct 10, 2016
@ojw28
Copy link
Contributor

ojw28 commented Oct 10, 2016

Yes, I have a pending change that fixes this already, and makes a bunch of other tweaks to the new UI components.

ojw28 added a commit that referenced this issue Oct 11, 2016
- Make sure no events are posted on PlaybackControlView
  if it's not attached to a window. This can cause leaks.
  The target hide time is recorded if necessary and
  processed when the view is re-attached.
- Deduplicated PlaybackControlView.VisibilityListener
  invocations.
- Fixed timeouts to be more intuitive (I think).
- Fixed initial visibility of PlaybackControlView when
  used as part of SimpleExoPlayerView.
- Made some more attributes configurable from layout xml.

Issue: #1908
Issue: #1919
Issue: #1923

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135679988
@ojw28 ojw28 closed this as completed Oct 11, 2016
@google google locked and limited conversation to collaborators Jun 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants