android Q content above navigation bar

后端 未结 3 1719
耶瑟儿~
耶瑟儿~ 2021-01-18 08:51

we are targeting our application at api 28 and draw content under status bar. For this we are using following flag and styles :

window.addFlags(FLAG_LAYOUT_N         


        
3条回答
  •  隐瞒了意图╮
    2021-01-18 09:42

    You should this to you main activity

        view.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
        view.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
    

    and then create a new styles.xml file for v29

    
    
      
      
    
    

    source: https://medium.com/androiddevelopers/gesture-navigation-going-edge-to-edge-812f62e4e83e

提交回复
热议问题