Last active
June 2, 2018 13:48
-
-
Save nontravis/88e509cbd0ca7e89d56f011ff2593db7 to your computer and use it in GitHub Desktop.
setOnApplyWindowInsetsListener.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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