简体   繁体   English

Android透明状态栏的实现?

[英]Android transparent status bar implementation?

I noticed Play Store application detail pages show a transparent status bar since version 5.4 , but how is it implemented? 我注意到Play商店应用程序详细信息页面从5.4版开始显示透明的状态栏 ,但是如何实现呢?

I tried to add WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS flag to my window, but the result is both the status bar and the navigation bar are transparent. 我试图将WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS标志添加到我的窗口,但是结果是状态栏和导航栏都是透明的。 How can I just make the status bar transparent but the navigation bar keeps normal? 如何使状态栏透明但导航栏保持正常?

I see your link and see that: +If you want collapse toolbar like this . 我看到你的链接,看到:+如果你想崩溃工具栏像这样 Try [CoordinatorLayout][2] . 尝试[CoordinatorLayout][2] +If you just want transparent toolbar try: android:background="@android:color/transparnt" on toolbar. +如果您只想使用透明工具栏,请尝试:工具栏上的android:background="@android:color/transparnt" Sorry if I misunderstood your question 对不起,如果我误解了你的问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM