CaptivePortal: login activity UI improvements

Similarly to commit 2e0915f143 for the
carrier portal login, this patch changes the default settings of the
webview used for the system captive portal login activity to allow
better user experience on "wide" login pages designed for desktop.

Differently from commit 2e0915f143, the
zooming buttons are not displayed (i.e zooming is possible only with
gesture).

Test: manually tested with captive portals.
Bug: 31813936, 19228946, 36532213
Change-Id: I2579994da37f3b0f4c08e24e59c81f31835ab832
This commit is contained in:
Hugo Benichi
2017-05-11 09:58:14 +09:00
parent 21a57f263f
commit f7eea406c9

View File

@@ -122,6 +122,11 @@ public class CaptivePortalLoginActivity extends Activity {
WebSettings webSettings = myWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
webSettings.setMixedContentMode(WebSettings.MIXED_CONTENT_COMPATIBILITY_MODE);
webSettings.setUseWideViewPort(true);
webSettings.setLoadWithOverviewMode(true);
webSettings.setSupportZoom(true);
webSettings.setBuiltInZoomControls(true);
webSettings.setDisplayZoomControls(false);
mWebViewClient = new MyWebViewClient();
myWebView.setWebViewClient(mWebViewClient);
myWebView.setWebChromeClient(new MyWebChromeClient());