Rework WidevineSamplePlayer to use fragments

Previously it used TabActivity which has been deprecated
and no longer works.

bug: 29045104

Change-Id: I207f0208b6dba47adfa0ffe7485800d1561af617
This commit is contained in:
Jeff Tinker
2016-06-03 15:53:52 -07:00
parent e33895f5de
commit 9f735d298a
22 changed files with 285 additions and 367 deletions

View File

@@ -3,5 +3,11 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView android:id="@+id/textView1" android:text="@string/no_content" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="24pt" android:background="@drawable/background3" android:gravity="center"></TextView>
<TextView android:id="@+id/textView1"
android:text="@string/no_content"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:textSize="24pt"
android:background="@drawable/background3"
android:gravity="center"></TextView>
</LinearLayout>

View File

@@ -1,21 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:padding="4dip"
android:gravity="center_horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabMaxWidth="0dp"
app:tabGravity="fill"
app:tabMode="fixed">
</android.support.design.widget.TabLayout>
<android.support.v4.view.ViewPager
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</LinearLayout>
</TabHost>
android:layout_weight="1">
</android.support.v4.view.ViewPager>
</LinearLayout>

View File

@@ -73,8 +73,8 @@
android:gravity="center"
>
<Button
android:text="@string/update_button"
android:id="@+id/update_button"
android:text="@string/save_settings"
android:id="@+id/save_settings"
/>
</TableRow>
</TableLayout>

View File

@@ -13,10 +13,13 @@
<string name="show_rights">Show Rights</string>
<string name="streaming">Streaming</string>
<string name="downloads">Downloads</string>
<string name="settings">Settings</string>
<string name="content_page">Content Page</string>
<string name="device_id">Device Id</string>
<string name="drm_server">Drm Server</string>
<string name="portal_id">Portal Name</string>
<string name="update_button">Update Button</string>
<string name="save_settings">Save Settings</string>
<string name="next_page">Next Page &gt;&gt;</string>
<string name="previous_page">&lt;&lt; Previous Page</string>
</resources>