简体   繁体   中英

Phonegap + Android: disable bounce and highlight effect on scrolling

I've started an Adroid project with Phonegap following this guide: http://docs.phonegap.com/en/2.0.0/guide_getting-started_android_index.md.html#Getting%20Started%20with%20Android

There is an unpleasant effect when scrolling longer pages: a highlighting at the end of scrolling (covering header and footer) and a small bounce (which makes fixed position header and footer also bounce).

Is there a way to prevent both - bouncing and highlight - on Android using this implementation of Phonegap? I've seen solutions only for embedded WebView.

Well you can add the following lines:

if(android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.GINGERBREAD) {
    this.appView.setOverScrollMode(appView.OVER_SCROLL_NEVER);
}

to the onCreate method of your Java class that extends from DroidGap it should get rid of the highlight at least and maybe the bounce too.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM