mirror of
https://github.com/apache/cordova-android.git
synced 2026-05-11 00:00:05 +08:00
CB-8387 Address TODO and have DisallowOverscroll preference set by AndroidWebView instead of CordovaActivity
Now the preference will work even when not using CordovaActivity
This commit is contained in:
@@ -144,6 +144,10 @@ public class AndroidWebView extends WebView implements CordovaWebView {
|
||||
}
|
||||
|
||||
exposeJsInterface();
|
||||
|
||||
if (preferences.getBoolean("DisallowOverscroll", false)) {
|
||||
setOverScrollMode(View.OVER_SCROLL_NEVER);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("SetJavaScriptEnabled")
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user