|
@@ -0,0 +1,74 @@
|
|
|
+<?xml version="1.0" encoding="utf-8"?>
|
|
|
+<LinearLayout
|
|
|
+ xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
+ android:orientation="vertical"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="match_parent"
|
|
|
+ android:background="@color/whiteBg">
|
|
|
+
|
|
|
+ <androidx.appcompat.widget.Toolbar
|
|
|
+ xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
+ xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
|
+ android:id="@+id/toolbar"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="50dp"
|
|
|
+ android:background="@color/colorTheme"
|
|
|
+ android:theme="@style/AppTheme.ActionBar"
|
|
|
+ app:contentInsetStart="0.0dp"
|
|
|
+ app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
|
|
|
+ android:visibility="visible">
|
|
|
+ <TextView
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:gravity="center"
|
|
|
+ android:text="播放视频的原生案例"
|
|
|
+ android:textSize="18sp"
|
|
|
+ android:textColor="@color/blackText"/>
|
|
|
+ </androidx.appcompat.widget.Toolbar>
|
|
|
+
|
|
|
+
|
|
|
+ <ScrollView
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="match_parent">
|
|
|
+ <LinearLayout
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:orientation="vertical"
|
|
|
+ android:padding="10dp">
|
|
|
+ <TextView
|
|
|
+ android:id="@+id/tv_1"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:layout_marginTop="10dp"
|
|
|
+ android:padding="10dp"
|
|
|
+ android:background="@color/colorAccent"
|
|
|
+ android:text="1.最原生的播放器,使用VideoView"/>
|
|
|
+ <TextView
|
|
|
+ android:id="@+id/tv_1_2"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:layout_marginTop="10dp"
|
|
|
+ android:padding="10dp"
|
|
|
+ android:background="@color/colorAccent"
|
|
|
+ android:text="1.2 最原生的播放器,使用SurfaceView+MediaPlayer"/>
|
|
|
+ <TextView
|
|
|
+ android:id="@+id/tv_2"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:layout_marginTop="10dp"
|
|
|
+ android:padding="10dp"
|
|
|
+ android:background="@color/colorAccent"
|
|
|
+ android:text="2.ijk原生播放器"/>
|
|
|
+ <TextView
|
|
|
+ android:id="@+id/tv_3"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:layout_marginTop="10dp"
|
|
|
+ android:padding="10dp"
|
|
|
+ android:background="@color/colorAccent"
|
|
|
+ android:text="3.exo原生播放器"/>
|
|
|
+ </LinearLayout>
|
|
|
+ </ScrollView>
|
|
|
+
|
|
|
+
|
|
|
+</LinearLayout>
|