【问题标题】:need to change status bar as transparent with all icons需要将状态栏更改为所有图标透明
【发布时间】:2017-07-31 14:59:32
【问题描述】:

在我的 android 应用程序中,我需要将状态栏更改为对所有图标透明。我不想改变颜色或使其半透明。

我想要如下图所示的状态栏:

<style name="AppTheme.FullScreen" parent="AppTheme.NoActionBar">
    <item name="windowActionBar">false</item>
    <item name="windowNoTitle">true</item>
    <item name="android:windowTranslucentStatus">true</item>
    <item name="android:windowContentTransitions">true</item>
</style>

【问题讨论】:

标签: android android-layout android-fragments material-design


【解决方案1】:

您可以像这样以编程方式使用透明状态栏 在 onCreate 方法中调用它

if (Build.VERSION.SDK_INT >= 21) {
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS,
                WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
    }

【讨论】:

  • 它的状态栏是半透明的。但我需要将状态栏完全透明。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2017-12-24
  • 1970-01-01
  • 1970-01-01
  • 2018-06-28
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多