Why can't we use a Translucent system bars with and ActionBar

前端 未结 5 554
迷失自我
迷失自我 2020-12-04 06:07

While updating my apps to Kitkat, I just wanted to give them a gorgeous look on KitKat using the Translucent property:

Translucent system bars

5条回答
  •  时光取名叫无心
    2020-12-04 06:47

    All of the answers extend the ActionBar either programmatically or from layout: what this means is that when the app gets launched or recreated the system will look for the theme (which isn't aware of the fix) and show a VERY UGLY status bar coloured with whatever is the window background...!

    I have created an example of how to do it using the theme only:

    https://github.com/Takhion/android-extendedactionbar

    I hope it will be useful for someone :)

提交回复
热议问题