So I want to change my layout slightly when the virtual keyboard pops up. What I have done is implement the method onSizeChanged(int w, int h, int oldw, int oldh). It gives me the correct new size of the layout I have, but I am experiencing strange behaviour. It seems as if maybe my layout is done while the screen is in some kind of transmission state, becuase each view that are given a new layout disappears.
So I started up Hierarchy Viewer to see what sizes my views had gotten. Now for the REALLY weird part: When hierarchy viewer is finished loading, my layout starts to work. Everything just appears from nowhere just the way I had intended. Somehow hierarchy viewer affects my program and gets it out from this buggy state it is in. How is this possible? And do you guys have any suggestions on how to solve my problem with new layouts when the virtual keyboard appears?
edit: So I noticed that when I for example add or remove some view in the layout, everything becomes visible again. I guess there is some kind of function that I need to call to force the layout to become visible. I have tried refreshDrawableState(), bringToFront() and forceLayout(), but to no avail.