Skip to content

DefaultTimeBar depends on onLayout to update playhead position #2871

@colinrtwhite

Description

@colinrtwhite

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions