summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormcasas@webrtc.org <mcasas@webrtc.org>2014-11-04 17:26:22 +0000
committermcasas@webrtc.org <mcasas@webrtc.org>2014-11-04 17:26:22 +0000
commit562748d2a4b6bda442626b57948ea01ebc358b11 (patch)
treebf4107ca8e83be2069969b205a5c9579763ea356
parent19c8d5c35a3e7a7341124f3865a3a117985e7c08 (diff)
downloadtalk-562748d2a4b6bda442626b57948ea01ebc358b11.tar.gz
AppRTCDemoActivity: use differnet Themes for different API levels
The current AndroidManifest.xml hardcodes a Theme that is only available in Android L or later (Material). To maintain backwards compatibility, and for better App style, create a single Theme/Style and define it for different APIs. I tested this in two Nexus %, one with prerelease L and another with a KK 4.4.2 and the Theme is indeed automagically updated :) Note that this is compatible with https://webrtc-codereview.appspot.com/26979004/ R=glaznev@webrtc.org Review URL: https://webrtc-codereview.appspot.com/26019004 git-svn-id: http://webrtc.googlecode.com/svn/trunk/talk@7619 4adac7df-926f-26a2-2b94-8c16560cd09d
-rw-r--r--examples/android/AndroidManifest.xml4
-rw-r--r--examples/android/res/values-v21/styles.xml8
-rw-r--r--examples/android/res/values/styles.xml8
3 files changed, 18 insertions, 2 deletions
diff --git a/examples/android/AndroidManifest.xml b/examples/android/AndroidManifest.xml
index 30fd46c..e24942a 100644
--- a/examples/android/AndroidManifest.xml
+++ b/examples/android/AndroidManifest.xml
@@ -7,7 +7,7 @@
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
- <uses-sdk android:minSdkVersion="13" android:targetSdkVersion="19" />
+ <uses-sdk android:minSdkVersion="13" android:targetSdkVersion="21" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
@@ -43,7 +43,7 @@
android:label="@string/app_name"
android:screenOrientation="fullUser"
android:configChanges="orientation|screenSize"
- android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen">
+ android:theme="@style/AppRTCDemoActivityTheme">
</activity>
</application>
</manifest>
diff --git a/examples/android/res/values-v21/styles.xml b/examples/android/res/values-v21/styles.xml
new file mode 100644
index 0000000..95f1ac6
--- /dev/null
+++ b/examples/android/res/values-v21/styles.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <style name="AppRTCDemoActivityTheme" parent="android:Theme.Material">
+ <item name="android:windowActionBar">false</item>
+ <item name="android:windowFullscreen">true</item>
+ <item name="android:windowNoTitle">true</item>
+ </style>
+</resources>
diff --git a/examples/android/res/values/styles.xml b/examples/android/res/values/styles.xml
new file mode 100644
index 0000000..7f809a6
--- /dev/null
+++ b/examples/android/res/values/styles.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <style name="AppRTCDemoActivityTheme" parent="android:Theme.Black">
+ <item name="android:windowActionBar">false</item>
+ <item name="android:windowFullscreen">true</item>
+ <item name="android:windowNoTitle">true</item>
+ </style>
+</resources>