视频组件自定义
This commit is contained in:
@@ -2,9 +2,10 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/main"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#F9F9F9"
|
||||
android:background="#000000"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 视频播放区域和悬浮按钮 -->
|
||||
@@ -18,11 +19,10 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="280dp"
|
||||
android:background="@android:color/transparent"
|
||||
app:use_controller="true" />
|
||||
app:use_controller="false"/>
|
||||
|
||||
<!-- 自定义顶部栏 - 返回、下载、删除在同一行 -->
|
||||
<LinearLayout
|
||||
android:layout_marginTop="20dp"
|
||||
android:id="@+id/functionBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
@@ -60,22 +60,90 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 右下角按钮区域 - 静音按钮 -->
|
||||
<!-- 右下角按钮区域 - 静音、全屏按钮 -->
|
||||
<LinearLayout
|
||||
android:layout_marginBottom="40dp"
|
||||
android:id="@+id/muteBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:visibility="gone">
|
||||
android:orientation="vertical"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivMute"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/mute"/>
|
||||
android:src="@drawable/un_mute"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivFullScreen"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:padding="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:src="@drawable/full_size"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 左下角播放按钮 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/playBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|start">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPlay"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/zt"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 底部进度条和时间区域 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@android:color/transparent"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="70dp"
|
||||
android:paddingRight="70dp">
|
||||
|
||||
<!-- 当前时间 -->
|
||||
<TextView
|
||||
android:id="@+id/tvCurrentTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="00:00"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp"/>
|
||||
|
||||
<!-- 进度条 -->
|
||||
<SeekBar
|
||||
android:id="@+id/seekBar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:max="100"
|
||||
android:progress="0"
|
||||
android:progressDrawable="@drawable/custom_seekbar"
|
||||
android:thumb="@drawable/custom_thumb"/>
|
||||
|
||||
<!-- 总时长 -->
|
||||
<TextView
|
||||
android:id="@+id/tvTotalTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="00:00"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -121,5 +189,21 @@
|
||||
android:layout_weight="1"
|
||||
android:background="#FFFFFF" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/emptyLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:background="#FFFFFF"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/no_message" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -49,7 +49,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="250dp"
|
||||
android:background="@android:color/transparent"
|
||||
app:use_controller="true"/>
|
||||
app:use_controller="false"/>
|
||||
|
||||
<!-- 功能按钮区域 -->
|
||||
<LinearLayout
|
||||
|
||||
Reference in New Issue
Block a user