I found a solution to my problems that it is very similar to yours.
First of all, I only have LinearLayout with two elements, ImageView and LinearLayout, which have 2 EditText and one button, so I had to keep them separate in full screen mode without a keyboard, and when the keyboard appears, they should look closer.
So, I added a view between them with the height attribute in 0dp and a weight of 1, which allowed me to keep separate views from each other. and when the keyboard appears, since they do not have a correction height, they simply resize and retain the aspect.
Voila! The layout size changes, and the distance between my views is the same when the keyboard is present or absent.
Diego Ramírez Vásquez Dec 10 '14 at 22:05 2014-12-10 22:05
source share