如果您使用的是SimpleExoPlayerView,则可以自定义播放器的视图,尤其是Control的视图.查看SimpleExoPlayerView的文档:
Attributes
The following attributes can be set on a SimpleExoPlayerView when used in a layout XML file:
…
controller_layout_id – Specifies the id of the layout resource to be inflated by the child PlaybackControlView. See below for more details.
Corresponding method: None
Default: R.id.exo_playback_control_view
…
因此,基本上您可以为控制器提供自己的布局文件(您可以复制文档中提到的exo_playback_control_view布局,这是默认布局文件,并根据需要自定义.请注意,您需要提供相同的视图ID现有的控件(所以最好实际复制它),如PlaybackControlView的文档中所述:
Overriding the layout file
To customize the layout of PlaybackControlView throughout your app,or just for certain configurations,you can define exo_playback_control_view.xml layout files in your application res/layout* directories. These layouts will override the one provided by the ExoPlayer library,and will be inflated fo