How can I make the status bar white with black icons?

前端 未结 7 819
野性不改
野性不改 2020-12-02 18:03

I want to change the colour of the status bar for my app so that it\'s white with black icons (instead of the default black with white icons). Is there any way of doing this

7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-02 18:37

    You can use it this way in Kotlin

     window.decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
    

    Make sure to call it in onCreate() before setContentView()

提交回复
热议问题