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:
Andrew Grieve 2015-01-30 11:17:08 -05:00
parent 137fe12c43
commit e3dd6d8c88
2 changed files with 4 additions and 5 deletions

View File

@ -144,6 +144,10 @@ public class AndroidWebView extends WebView implements CordovaWebView {
}
exposeJsInterface();
if (preferences.getBoolean("DisallowOverscroll", false)) {
setOverScrollMode(View.OVER_SCROLL_NEVER);
}
}
@SuppressLint("SetJavaScriptEnabled")

View File

@ -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.