Redrawing layout when virtual keyboard pops up

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Redrawing layout when virtual keyboard pops up

Postby sandis84 » Thu Nov 19, 2009 10:32 am

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.
sandis84
Experienced Developer
Experienced Developer
 
Posts: 78
Joined: Fri Aug 07, 2009 3:54 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 7 guests