You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by jc...@apache.org on 2016/12/01 22:27:53 UTC

cordova-plugin-inappbrowser git commit: add option useWidthViewPort

Repository: cordova-plugin-inappbrowser
Updated Branches:
  refs/heads/master 8ab07277c -> d73ec0b79


add option useWidthViewPort

 This closes #66


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/commit/d73ec0b7
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/d73ec0b7
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/d73ec0b7

Branch: refs/heads/master
Commit: d73ec0b7966ae7db423bb92af70149fbc1c6a3c9
Parents: 8ab0727
Author: Sebastien Blanc <sc...@gmail.com>
Authored: Mon Sep 22 14:42:04 2014 +0200
Committer: Julio C�sar <jc...@gmail.com>
Committed: Thu Dec 1 23:27:29 2016 +0100

----------------------------------------------------------------------
 src/android/InAppBrowser.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/d73ec0b7/src/android/InAppBrowser.java
----------------------------------------------------------------------
diff --git a/src/android/InAppBrowser.java b/src/android/InAppBrowser.java
index ef37fed..24a8efa 100644
--- a/src/android/InAppBrowser.java
+++ b/src/android/InAppBrowser.java
@@ -88,6 +88,7 @@ public class InAppBrowser extends CordovaPlugin {
     private static final String MEDIA_PLAYBACK_REQUIRES_USER_ACTION = "mediaPlaybackRequiresUserAction";
     private static final String SHOULD_PAUSE = "shouldPauseOnSuspend";
     private static final Boolean DEFAULT_HARDWARE_BACK = true;
+    private static final String USER_WIDE_VIEW_PORT = "useWideViewPort";
 
     private InAppBrowserDialog dialog;
     private WebView inAppWebView;
@@ -101,6 +102,7 @@ public class InAppBrowser extends CordovaPlugin {
     private boolean hadwareBackButton = true;
     private boolean mediaPlaybackRequiresUserGesture = false;
     private boolean shouldPauseInAppBrowser = false;
+    private boolean useWideViewPort = true;
 
     /**
      * Executes the request and returns PluginResult.
@@ -558,6 +560,10 @@ public class InAppBrowser extends CordovaPlugin {
             if (shouldPause != null) {
                 shouldPauseInAppBrowser = shouldPause.booleanValue();
             }
+            Boolean wideViewPort = features.get(USER_WIDE_VIEW_PORT);
+            if (wideViewPort != null ) {
+		            useWideViewPort = wideViewPort.booleanValue();
+            }
         }
 
         final CordovaWebView thatWebView = this.webView;
@@ -758,7 +764,7 @@ public class InAppBrowser extends CordovaPlugin {
                 inAppWebView.loadUrl(url);
                 inAppWebView.setId(Integer.valueOf(6));
                 inAppWebView.getSettings().setLoadWithOverviewMode(true);
-                inAppWebView.getSettings().setUseWideViewPort(true);
+                inAppWebView.getSettings().setUseWideViewPort(useWideViewPort);
                 inAppWebView.requestFocus();
                 inAppWebView.requestFocusFromTouch();
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org