Skip to content

nieldeokar/android-imageview-with-bottom-editext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Android-imageview-with-bottom-editext

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

Related stackoverflow questions :

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
Normal phone Resizable ImageView Normal phone non Resizable ImageView

It works with phones having 18:9 ratio

  • 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
Samsung S8 Resizable ImageView Samsung S8 non Resizable ImageView

Libraries used

About

How to resize only parts of view with soft keyboard on screen.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published