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

DefaultTimeBar depends on onLayout to update playhead position #2871

Closed
colinrtwhite opened this issue May 27, 2017 · 1 comment
Closed

DefaultTimeBar depends on onLayout to update playhead position #2871

colinrtwhite opened this issue May 27, 2017 · 1 comment
Assignees
Labels

Comments

@colinrtwhite
Copy link
Contributor

Issue description

DefaultTimeBar doesn't update the playhead position if exo_position and exo_duration have fixed widths.

This is a result of DefaultTimeBar only updating the playhead position when onLayout is called. This works correctly in the demo app, as when the position text is updated it needs to re-measure the view.

Reproduction steps

Set the following attribute on R.id.exo_position and R.id.exo_duration in the demo app:
android:ems="6"

Result: DefaultTimeBar's playhead doesn't move since onLayout is only called once.

Link to test content

Any content in the demo app will do.

Version of ExoPlayer being used

2.4.1

Device(s) and version(s) of Android being used

Tested on Nexus 5X Android 7.1.2, though I'm sure this behaviour is common across all API levels + devices.

A full bug report captured from the device

bugreport-N2G47O-2017-05-26-22-19-07.zip

@colinrtwhite
Copy link
Contributor Author

To fix this I think you could just put requestLayout() in setPosition() and setDuration, though I'm not sure this is the best solution.

@ojw28 ojw28 added the bug label May 29, 2017
ojw28 pushed a commit that referenced this issue May 31, 2017
Issue: #2871

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157562792
@ojw28 ojw28 closed this as completed May 31, 2017
ojw28 pushed a commit that referenced this issue Jun 6, 2017
Issue: #2871

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157562792
@google google locked and limited conversation to collaborators Sep 29, 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

3 participants