I have an android application that hits the WebView and displays the content. But as per the requirement initially I should hide the WebView and later on I should show it to the user.
So, initially I call setVisibility(View.GONE); and hide the visibility of the WebView. And, then I call setVisibility(View.VISIBLE); to show the WebView to the user.
1)When I am doing in this sequence, the size of the content(font and images) on the WebView are getting reduced.
2)If I don’t call setVisibility(View.GONE); and directly show it to the user then size of the content(font and images) on the WebView is bigger.
I want to achieve 2 scenario by initially hiding the WebView. Means I want to hide the WebView initially, and then show to the user with bigger sized content on WebView.
How do I achieve this?
I have got this working finally!!!
Instead of using setVisibility(View.GONE); to make the webview invisible, I am using setVisibility(View.INVISIBLE);.
This way I was able to achieve the proper size of items on the webview. Dont know the exact reason for this mismatch, but it is working as expected with this change.