SHARE
TWEET

Untitled

a guest Jun 19th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. override fun onCreate(savedInstanceState: Bundle?) {
  2.         super.onCreate(savedInstanceState)
  3.  
  4.         setTheme(R.style.AppTheme)
  5.         val systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_STABLE or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
  6.         window.decorView.systemUiVisibility = systemUiVisibility
  7.  
  8.         setContentView(R.layout.activity_main)
  9.  
  10.         someBottomView.doOnApplyWindowInsets { view, windowInsets, initialPadding ->
  11.             view.setPadding(
  12.                 initialPadding.left,
  13.                 initialPadding.top,
  14.                 initialPadding.right,
  15.                 initialPadding.bottom + windowInsets.systemWindowInsetBottom
  16.             )
  17.         }
  18.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top