I'm working on an Android app (API 14 - 21), where the layout is like so:
----------------------- | Layout 1 | ----------------------- | X | Layout 2 | ----------------------- | | | | | Layout 3 | | | | | -----------------------
When the "X" is clicked, I need Layout 3 to slide off screen to the bottom, the soft keyboard to pop up, the "X" and Layout 2 to slide down (but maintain size) to be just above the soft keyboard, and Layout 1 to expand downward to fill any extra space. So it looks like this
----------------------- | | | Layout 1 | | | ----------------------- | X | Layout 2 | ----------------------- | | | Soft Keyboard | | | -----------------------
I tried to have a RelativeLayout as the main layout for all the others. I had Layout 1 aligned top/left of parent, the "X" + Layout 2 container aligned left and layout_above to Layout 3, and Layout 3 aligned to bottom/left parent. I figured if I set Layout 3 to VISIBLE/GONE in code, that would do it. Instead, Layout 3 just disappears, everything else stays in place, and I see a white background where Layout 3 was.
Any ideas on how I can achieve this effect?