android - Adjust height according to keyboard -


i'm trying design layout similar linkedin screen sharing update.

when enter screen first time layout split this:

half screen edittext half screen gallery of images bar above gallery

first time entering screen when click edittext - keyboard comes , it's high gallery, leaving bar camera icon visible.

how did design layout keyboard height kinda same gallery height?

enter image description here

in fact every keyboard can have different height, achieve should resize activity fit current 'height' when keyboard shown status.

tricky part is, android doesn't provides current status keyboard shown status or not, should manage status smart(one tip can comparing curent height or height/width ratio check it's resized or not keyboard.


Comments