I have a listview where each row has one textview and webview. With the use of viewholder object, I am re-using the row while scrolling. Initially data is not loaded in the webview and its visibility state is set to Gone. On tap of ListView item, I am loading the webview data using webview.loadDataWithBaseURL() method and setting its visibility state to Visible. Then again if you tap on the same item, its state is set to Gone. Now the problem is that when I am resetting the webview visibility to Visible and loading the data again, webview content is not fitting into the screen. I have set the following meta tag in webview content.
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, target-densityDpi=device-dpi>
Also, I have set the following methods.
webview.getSettings().setUseWideViewPort(true);
webview.getSettings().setLoadWithOverviewMode(true);
webview.setInitialScale(1);
This setting works fine when I initially load the webview data on item tap. But next time when I again toggle the Visibility and load the data again, the above viewport settings are not working.
Can any body please assist on the same.