fix(YouTube): Resolve button flickering when taping seekbar (#4500)
This commit is contained in:
parent
10e2b08eb2
commit
f5dd902915
1 changed files with 7 additions and 1 deletions
|
|
@ -90,7 +90,13 @@ public class PlayerControlButton {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setVisibilityImmediate(boolean visible) {
|
public void setVisibilityImmediate(boolean visible) {
|
||||||
private_setVisibility(visible, false);
|
if (visible) {
|
||||||
|
// Fix button flickering, by pushing this call to the back of
|
||||||
|
// the main thread and letting other layout code run first.
|
||||||
|
Utils.runOnMainThread(() -> private_setVisibility(true, false));
|
||||||
|
} else {
|
||||||
|
private_setVisibility(false, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setVisibility(boolean visible, boolean animated) {
|
public void setVisibility(boolean visible, boolean animated) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue