From f7eea406c950e447608c6f62de05158334682365 Mon Sep 17 00:00:00 2001 From: Hugo Benichi Date: Thu, 11 May 2017 09:58:14 +0900 Subject: CaptivePortal: login activity UI improvements Similarly to commit 2e0915f14384901f25a41d698b39ef0add201550 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 2e0915f14384901f25a41d698b39ef0add201550, 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 --- .../com/android/captiveportallogin/CaptivePortalLoginActivity.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java b/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java index 6394c64b74cc..34465e92a1ef 100644 --- a/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java +++ b/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java @@ -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()); -- cgit v1.2.3-59-g8ed1b