Skip to content

Instantly share code, notes, and snippets.

@fercarcedo
Last active March 20, 2020 17:01
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 fercarcedo/9c5e3ccde113ca933c1015396e08205a to your computer and use it in GitHub Desktop.
Save fercarcedo/9c5e3ccde113ca933c1015396e08205a to your computer and use it in GitHub Desktop.
// 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