Demo app on how to handle windowSoftInputMode
when you have resizing views in your app. If you are not clear after reading this simply have a look at the gif's below you would understand the problem statement. :P
When you have ImageView and the bottom EditText and you want EditText to appear above keyboard without resizing ImageView
- Specify windowSoftInputMode as
adjustNothing|stateHidden
: This will not resize our view - Handle the EditText positioning on keyboard open to do so add KeyboardHeightProvider
- On keyboard open reposition the bottom EditText to above the Keyboard.
Normal phone Resizable ImageView | Normal phone non resizable ImageView |
---|---|
- In 18:9 phones bottom navigation creates an issue in calculating keyboard height.
- All we need to do is handle the negative value of navigation bar in these phones.
Samsung S8 Resizable ImageView | Samsung S8 non resizable ImageView |
---|---|
- AppCompat
- Glide
- KeyboardHeightProvider