0

I'm trying to design a layout similar to LinkedIn screen for sharing an update.

When you enter the screen for the first time the layout is split something like this:

half the screen is an edittext half the screen is a gallery of images with a bar above the gallery

First time entering the screen Now when I click the edittext - the keyboard comes up and it's just as high as the gallery, leaving the bar with the camera icon visible.

How did they design this layout so that the keyboard height is kinda the same as the gallery height?

enter image description here

Bended
  • 494
  • 1
  • 7
  • 22
  • refer this http://stackoverflow.com/questions/16411056/how-to-adjust-layout-when-soft-keyboard-appears – sasikumar Jul 15 '15 at 08:56
  • Thanks but in that example the layout just moved to the top - I need my edittext to stay exactly the same size and just the bottom part (The gallery and the bar) to be at the height of the keyboard (The bar should be above the keyboard) – Bended Jul 15 '15 at 09:09

1 Answers1

0

In fact every keyboard can have different height, so to achieve this you should resize your activity to fit current 'height' when keyboard is shown status.

Tricky part is, android doesn't provides you that current status is keyboard shown status or not, so you should manage this status smart(One tip can be comparing curent height or height/width ratio to check it's resized or not by keyboard.

Hitchhiker
  • 99
  • 5