cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [4/5] android commit: CB-8387 Address TODO and have DisallowOverscroll preference set by AndroidWebView instead of CordovaActivity
Date Fri, 30 Jan 2015 16:43:38 GMT
CB-8387 Address TODO and have DisallowOverscroll preference set by AndroidWebView instead of
CordovaActivity

Now the preference will work even when not using CordovaActivity


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

Branch: refs/heads/master
Commit: e3dd6d8c883a0a9bfbde91f0abfc845d49a74e47
Parents: 137fe12
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Fri Jan 30 11:17:08 2015 -0500
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Fri Jan 30 11:18:41 2015 -0500

----------------------------------------------------------------------
 framework/src/org/apache/cordova/AndroidWebView.java  | 4 ++++
 framework/src/org/apache/cordova/CordovaActivity.java | 5 -----
 2 files changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/e3dd6d8c/framework/src/org/apache/cordova/AndroidWebView.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/AndroidWebView.java b/framework/src/org/apache/cordova/AndroidWebView.java
index 66d1764..d0b6d05 100755
--- a/framework/src/org/apache/cordova/AndroidWebView.java
+++ b/framework/src/org/apache/cordova/AndroidWebView.java
@@ -144,6 +144,10 @@ public class AndroidWebView extends WebView implements CordovaWebView
{
         }
 
         exposeJsInterface();
+
+        if (preferences.getBoolean("DisallowOverscroll", false)) {
+            setOverScrollMode(View.OVER_SCROLL_NEVER);
+        }
     }
 
     @SuppressLint("SetJavaScriptEnabled")

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/e3dd6d8c/framework/src/org/apache/cordova/CordovaActivity.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaActivity.java b/framework/src/org/apache/cordova/CordovaActivity.java
index 18bc43d..e4ec1b5 100755
--- a/framework/src/org/apache/cordova/CordovaActivity.java
+++ b/framework/src/org/apache/cordova/CordovaActivity.java
@@ -154,11 +154,6 @@ public class CordovaActivity extends Activity implements CordovaInterface
{
     
     protected void init() {
         appView = makeWebView();
-
-        // TODO: Have the views set this themselves.
-        if (preferences.getBoolean("DisallowOverscroll", false)) {
-            appView.getView().setOverScrollMode(View.OVER_SCROLL_NEVER);
-        }
         createViews();
 
         // Wire the hardware volume controls to control media if desired.


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


Mime
View raw message