2016-11-26 66 views
1

Android應用程序,嚴格限於21級起。 不是使用AppCompat。Android,沒有AppCompat,全屏 - 最正確的風格?

絕對沒有酒吧的全屏應用程序。

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="com.client.client"> 

    <application 
     android:allowBackup="true" 
     android:icon="@mipmap/ic_launcher" 
     android:label="@string/app_name" 
     android:supportsRtl="true" 

     android:theme="@style/AppTheme"> 

     <activity android:name=".Main" 
      android:screenOrientation="portrait" 
      android:theme="@android:style/Theme.Holo.Light.NoActionBar.Fullscreen"> 

      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 
       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 
    </application> 
</manifest> 

很困惑之間:

android:theme="@android:style/Theme.NoTitleBar.Fullscreen" 

與...

android:theme="@android:style/Theme.DeviceDefault.NoActionBar.Fullscreen" 

什麼是最好的,最現代化的選擇呢?

我不明白,在Android的這些和類似值之間的差異的完整歷史:/

再次,使用程序兼容性,如果該事項。

這裏是我要如何應用程序看起來所有設備上的截圖:

enter image description here

回答

1

什麼是最好的,最現代化的選擇呢?

隨着21+一minSdkVersion,您可以使用基於斷Theme.Material主題,如Theme.Material.Light.NoActionBar.Fullscreen

+0

輝煌,謝謝。建議省略'.Light'並使用'Theme.Material.NoActionBar.Fullscreen'去? – Fattie

+0

@JoeBlow:'Light'說「淺色背景,深色文字」。跳過「Light」說「黑暗的背景,明亮的文字」。更好地適應您的需求。 – CommonsWare

+0

宏偉,謝謝。 – Fattie