Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67441

How to make android WebView adaptive?

$
0
0

I have html5 with JS. It looks pretty good but is too big for (Nexus 5) screen and WebView becomes scrollable. I am looking long time for solution to make this view adaptive.

WebView mWebView;

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.gamelayout);

        mWebView = (WebView) findViewById(R.id.webView);
        mWebView.getSettings().setJavaScriptEnabled(true);
        mWebView.getSettings().setPluginState(WebSettings.PluginState.ON);
        mWebView.setBackgroundColor(Color.parseColor("#001A0F"));
        mWebView.zoomOut();
        mWebView.loadUrl("file:///android_asset/anim1/Untitled-1.html");

    }

Viewing all articles
Browse latest Browse all 67441

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>