Kun*_*dka 15 android android-styles
我想在启动画面中隐藏状态栏/通知栏我正在使用样式:<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
这不会隐藏状态栏,我该怎么做?
Kir*_*eph 48
如果要删除状态栏,请在onCreateView方法中的setContentView(layout)之前使用它
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
Run Code Online (Sandbox Code Playgroud)
Baj*_*dda 28
您可以执行以下操作,以便为您的特定活动适当设置主题 -
<style name="SplashTheme" parent="Theme.AppCompat.NoActionBar">
<item name="android:windowBackground">@drawable/launch_theme</item>
<item name="android:windowTranslucentNavigation">false</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowActionBar">true</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
</style>
Run Code Online (Sandbox Code Playgroud)
小智 5
尝试这个:
<style name="SplashTheme" parent="Theme.AppCompat.NoActionBar">
<item name="android:windowFullscreen">true</item>
</style>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
27491 次 |
| 最近记录: |