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@7619 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
		@@ -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>
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										8
									
								
								talk/examples/android/res/values-v21/styles.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								talk/examples/android/res/values-v21/styles.xml
									
									
									
									
									
										Normal file
									
								
							@@ -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>
 | 
			
		||||
							
								
								
									
										8
									
								
								talk/examples/android/res/values/styles.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								talk/examples/android/res/values/styles.xml
									
									
									
									
									
										Normal file
									
								
							@@ -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>
 | 
			
		||||
		Reference in New Issue
	
	Block a user