简体   繁体   English

使 Android 通知栏透明而不是底部导航栏

[英]Make Android Notification Bar Transparent Not Bottom Navigation Bar

How To Make Android Notification Bar Transparent Not Bottom Navigation Bar如何让 Android 通知栏透明而不是底部导航栏

What I Want To Do我想做的事

Set Notification Bar - Transparent

Set Bottom Navigation Bar - Black

Add below code in <style> tag of your app theme or activity theme under theme.xml filetheme.xml文件下的应用主题或活动主题的<style>标签中添加以下代码

<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">@android:color/black</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">false</item>

Add android:fitsSystemWindows="true" to your parent view of layoutandroid:fitsSystemWindows="true"到布局的父视图

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

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