Finally, I found the answer to my question, I need to add a meta tag along with my HTML content before adding it to Webview. Code below
String s="<head><meta name='viewport' content='target-densityDpi=device-dpi'/></head>"; webview.loadDataWithBaseURL(null,s+htmlContent,"text/html" , "utf-8",null);
The Viewport property inside the meta tag did the trick. See the following link for more information.
Using Viewport in an Android Web Browser
Regards, Rajapandi
Rajapandian
source share