需要完全透明的状态栏 [英] Need fully transparent status bar
本文介绍了需要完全透明的状态栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道的朋友我可以更改状态栏颜色或使其完全透明.
Hi Friends I want to know can I change status bar color or make it completely transparent.
我已经尝试了很多事情,但是我无法获得完全透明的状态栏,所以这是我的代码.
I've tried so many things but I can't get the fully transparent status bar, so here is my code..
v21/style.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowNoTitle">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:windowTranslucentNavigation">true</item>
</style>
</resources>
和 style.xml
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
</resources>
之后,我的屏幕显示为...
after it my screen is displayed as...
我想要这样.
任何人都可以帮忙吗?谢谢.
can anyone help?Thanks.
推荐答案
尝试此十六进制代码透明性:
try this hex code transperency:
100% — FF
95% — F2
90% — E6
85% — D9
80% — CC
75% — BF
70% — B3
65% — A6
60% — 99
55% — 8C
50% — 80
45% — 73
40% — 66
35% — 59
30% — 4D
25% — 40
20% — 33
15% — 26
10% — 1A
5% — 0D
0% — 00
这篇关于需要完全透明的状态栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文