Sample application showing keyboard animation controls for android 11 in action
- Compile SDK >= 30
- AppCompat version >= 1.3.0-alpha02
- Jetpack version also available (Androidx core version >= 1.5.0-alpha02)
- Check the visibility of the keyboard.
- Control the visibility of different insets including keyboard.
- Listening to window inset animation eg. keyboard hide and show.
- Controlling window inset animations eg. make keyboard part of the scroll.
Can be used in the layout where we have lots of text inputs with frequent keyboard interaction like chat and conversation applications.
- The inset type taken into observation is ime().
- Integrated window inset animation callback provides us with callbacks which include :
- onPrepare(...)
- onStart(...)
- onProgress(...)
- onEnd(...)
- Window inset listener to record start and end snapshot of the inset
- Ran into some issues with animation offset when set to soft input keyboard behavior type adjustpan.
- https://medium.com/androiddevelopers/animating-your-keyboard-fb776a8fb66d
- https://medium.com/androiddevelopers/animating-your-keyboard-reacting-to-inset-animations-839be3d4c31b
- https://www.youtube.com/watch?v=acC7SR1EXsI&t=270s&ab_channel=AndroidDevelopers
- https://github.com/android/user-interface-samples/tree/main/WindowInsetsAnimation