Last active
March 20, 2020 17:01
-
-
Save fercarcedo/9c5e3ccde113ca933c1015396e08205a to your computer and use it in GitHub Desktop.
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
// You have to wait for the view to be attached to the | |
// window (otherwise, windowInsetController will be null) | |
view.doOnLayout { | |
view.windowInsetsController?.show(WindowInsets.Type.ime()) | |
// You can also access it from Window | |
window.insetsController?.show(WindowInsets.Type.ime()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment