mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-31 17:32:51 +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:
parent
137fe12c43
commit
e3dd6d8c88
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user