search

Home  >  Q&A  >  body text

android - 安卓状态栏全透明是如何做到的?对比网易云音乐和QQ,一个是全透明,一个是半透明?

我尝试在BaseActivity里面加上对版本的判断,然后设置大于4.4的就设置透明状态栏,但是无法做到网易云音乐的那样无缝。

怪我咯怪我咯2811 days ago915

reply all(1)I'll reply

  • ringa_lee

    ringa_lee2017-04-17 16:19:39

    Set <item name="android:windowTranslucentStatus">true</item>
    In the definition file of toolbar in the theme of the app, add android:fitsSystemWindows="true"
    At this time, you need to redefine the height of the toolbar. It is ok to increase the height of statusBar based on the height of toolbar

    reply
    0
  • Cancelreply