【发布时间】:2021-07-28 15:54:25
【问题描述】:
我正在使用 playerview,我想显示视频的进度。所以我使用了 PlayerView 并在 playerview 下面使用了 LinearLayout,在 LinearLayout 中我使用了 PlayerView
我的代码如下:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/black"
android:orientation="vertical">
<com.google.android.exoplayer2.ui.PlayerView
android:id="@+id/videoView"
android:layout_width="match_parent"
android:layout_height="300dp"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:background="@android:color/white"
android:visibility="visible">
</com.google.android.exoplayer2.ui.PlayerView>
<com.google.android.exoplayer2.ui.DefaultTimeBar
android:id="@+id/exo_progress1"
style="@style/Base.Widget.AppCompat.SeekBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
这是我的要求
【问题讨论】:
标签: android progress-bar android-progressbar