Commit b26d578f by insun Committed by kim-vde

Fix bug that clicking didn't show up controls at the beginning

StyledLayoutManager#isFullyVisibility() was wrong and
so hiding/showing logic didn't work properly.

PiperOrigin-RevId: 324996446
parent 5342576e
...@@ -53,7 +53,7 @@ import java.util.ArrayList; ...@@ -53,7 +53,7 @@ import java.util.ArrayList;
private final Runnable hideControllerRunnable; private final Runnable hideControllerRunnable;
private final OnLayoutChangeListener onLayoutChangeListener; private final OnLayoutChangeListener onLayoutChangeListener;
private int uxState = UX_STATE_ALL_VISIBLE; private int uxState;
private boolean initiallyHidden; private boolean initiallyHidden;
private boolean isMinimalMode; private boolean isMinimalMode;
private boolean needToShowBars; private boolean needToShowBars;
...@@ -88,6 +88,7 @@ import java.util.ArrayList; ...@@ -88,6 +88,7 @@ import java.util.ArrayList;
hideControllerRunnable = this::hideController; hideControllerRunnable = this::hideController;
onLayoutChangeListener = this::onLayoutChange; onLayoutChangeListener = this::onLayoutChange;
animationEnabled = true; animationEnabled = true;
uxState = UX_STATE_ALL_VISIBLE;
} }
public void show() { public void show() {
...@@ -432,7 +433,7 @@ import java.util.ArrayList; ...@@ -432,7 +433,7 @@ import java.util.ArrayList;
if (styledPlayerControlView == null) { if (styledPlayerControlView == null) {
return false; return false;
} }
return uxState == UX_STATE_ALL_VISIBLE; return uxState == UX_STATE_ALL_VISIBLE && styledPlayerControlView.isVisible();
} }
private void setUxState(int uxState) { private void setUxState(int uxState) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment