2017-10-02 3 views
0

のAPPCOMPATと同等の作り方、アプリがもともとTheme.Black.NoTitleBar.Fullscreen

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

を使用しているが、エラーのために、私はAPPCOMPAT

を使用することを決めた、私はそれを模倣するためにこれをしましたそれでもコンポーネントは元のテーマと同じように動作しません。

<style name="Theme.AppCompat.Light.NoTitleBar.FullScreen" parent="@style/Theme.AppCompat.Light"> 
    <item name="windowNoTitle">true</item> 
    <item name="android:windowNoTitle">true</item> 
    <item name="android:windowFullscreen">true</item> 
    <item name="android:windowContentOverlay">@null</item> 
</style> 

答えて

0

プログラム:APPCOMPATため

getWindow().setFlags(
         WindowManager.LayoutParams.FLAG_FULLSCREEN, 
         WindowManager.LayoutParams.FLAG_FULLSCREEN); 

フルスクリーンテーマ:

<style name="Theme.AppCompat.Light.NoActionBar.FullScreen" parent="@style/Theme.AppCompat.Light"> 
      <item name="windowNoTitle">true</item> 
      <item name="windowActionBar">false</item> 
      <item name="android:windowFullscreen">true</item> 
      <item name="android:windowContentOverlay">@null</item> 
     </style>