add more samples: multiple video, gallery with preloading, shared cache

This commit is contained in:
Alexey Danilov
2015-09-03 19:26:09 +03:00
parent 492706ce69
commit 983ae8d7b7
17 changed files with 689 additions and 84 deletions

View File

@@ -0,0 +1,23 @@
<LinearLayout
android:id="@+id/containerView"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="@android:drawable/divider_horizontal_dark"
android:orientation="vertical"
android:showDividers="middle"
tools:context=".MenuActivity">
<Button
android:id="@+id/cleanCacheButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Clean cache" />
<ListView
android:id="@+id/listView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>

View File

@@ -0,0 +1,58 @@
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#CCC"
android:orientation="vertical"
android:padding="8dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="horizontal">
<FrameLayout
android:id="@+id/videoContainer0"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_margin="8dp"
android:layout_weight="1"
android:background="#FFF" />
<FrameLayout
android:id="@+id/videoContainer1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_margin="8dp"
android:layout_weight="1"
android:background="#FFF" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="horizontal">
<FrameLayout
android:id="@+id/videoContainer2"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_margin="8dp"
android:layout_weight="1"
android:background="#FFF" />
<FrameLayout
android:id="@+id/videoContainer3"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_margin="8dp"
android:layout_weight="1"
android:background="#FFF" />
</LinearLayout>
</LinearLayout>

View File

@@ -0,0 +1,25 @@
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#CCC"
android:orientation="vertical"
android:padding="8dp">
<FrameLayout
android:id="@+id/videoContainer0"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_margin="8dp"
android:layout_weight="1"
android:background="#FFF" />
<FrameLayout
android:id="@+id/videoContainer1"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_margin="8dp"
android:layout_weight="1"
android:background="#FFF" />
</LinearLayout>

View File

@@ -0,0 +1,7 @@
<FrameLayout
android:id="@+id/containerView"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".VideoActivity" />

View File

@@ -0,0 +1,23 @@
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v4.view.ViewPager
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<com.viewpagerindicator.CirclePageIndicator
android:id="@+id/viewPagerIndicator"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
app:fillColor="#800F"
app:radius="10dp"
app:strokeColor="#800F" />
</LinearLayout>

View File

@@ -10,13 +10,14 @@
android:layout_width="match_parent"
android:layout_height="match_parent" />
<ProgressBar
<SeekBar
android:id="@+id/progressBar"
style="@android:style/Widget.Holo.ProgressBar.Horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@android:style/Widget.Holo.ProgressBar.Horizontal"
android:layout_margin="16dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true" />
android:layout_centerHorizontal="true"
android:layout_margin="16dp"
android:max="100" />
</RelativeLayout>