Skip to content

Instantly share code, notes, and snippets.

@nontravis
Last active June 2, 2018 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nontravis/88e509cbd0ca7e89d56f011ff2593db7 to your computer and use it in GitHub Desktop.
Save nontravis/88e509cbd0ca7e89d56f011ff2593db7 to your computer and use it in GitHub Desktop.
setOnApplyWindowInsetsListener.kt
ViewCompat.setOnApplyWindowInsetsListener(rootView) { view, windowInsets ->
// do something with insets
return windowInsets.consumeSystemWindowInsets() //consume inset: not pass insets down
//or
return windowInsets //pass insets down to child view
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment