Android 完全透明的狀態欄? - Android Completely transparent Status Bar?

問題:

I've searched the documentation but only found this:Link .我搜索了文檔,但只找到了這個:Link Which is used to make the bar translucent ?哪個是用來使條半透明的 What I'm trying to do is to make the status bar completely transparent (as shown in the image below) and make it backwards compatible for APK<19:我想要做的是使狀態欄完全透明(如下圖所示)並使其向後兼容 APK<19:在此處輸入圖片說明

My styles.xml:我的styles.xml:

<resources xmlns:tools="http://schemas.android.com/tools">

  <style name="AppTheme" parent="Theme.AppCompat.Light">
  <item name="android:actionBarStyle">@style/ThemeActionBar</item>
  <item name="android:windowActionBarOverlay">true</item>
  <!-- Support library compatibility -->
  <item name="actionBarStyle">@style/ThemeActionBar</item>
  <item name="windowActionBarOverlay">true</item>
  </style>

  <style name="ThemeActionBar" parent="Widget.AppCompat.Light.ActionBar.Solid">
  <item name="android:background"> @null </item>
  <!-- Support library compatibility -->
  <item name="background">@null</item>
  <item name="android:displayOptions"> showHome | useLogo</item>
  <item name="displayOptions">showHome|useLogo</item>

  </style>

</resources>

What I was able to do:我能夠做的:

在此處輸入圖片說明


解決方案:

參考一: https://stackoom.com/question/1yz9K
參考二: Android Completely transparent Status Bar?
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章