I am working on a HTML book reader so in web-view i am loading the webpages .Here i am having zoom in and zoom-out buttons so on clicking of zoom-in i am increasing the web view parameters i.e Width and Height but my problem is that after changing the params the height parameters is not updates that meaning it do not comes to the new given height .Specially in case of zoom out it show the previous height itself but width works OK and content also shrink.It will not update the height until any click event happens if i click on some buttons or moves to the next page it comes properly.
So my main problem is that in case of zoom out the web view height parameter is not set properly ,please suggest me any way. i called invalidate() also after the layout parameter changes but not working so please tell me any workable solution and thanks in advance.
Asked
Active
Viewed 1,690 times
0

Ravi
- 2,277
- 3
- 22
- 37
-
Somehow similar problem but no workable answer-http://stackoverflow.com/questions/13669724/layout-height-doesnt-update-until-another-event-is-triggered/13956165#comment20168642_13956165 – Ravi Jan 24 '13 at 04:18
-
invalidate() causes the view to redraw itself. You want requestLayout() which causes the view to remeasure itself and layout. – user123321 Jan 24 '13 at 04:50
-
@user123321 tried but not working – Ravi Jan 24 '13 at 05:08
-
@user123321 thanks but it is also not working – Ravi Jan 24 '13 at 05:49
-
Maybe you've solved your problem, but if you haven't, you can try to look at this [link](http://stackoverflow.com/questions/4946295/android-expand-collapse-animation). Sorry if that's not what you are looking for and sorry for the late reply. – JrL Feb 10 '13 at 09:30
-
Take a look at this answer: http://stackoverflow.com/a/15687522/1228514 – Alex Kucherenko Mar 28 '13 at 17:00