ionic framework - no smooth springy scroll effect

2019-08-13 04:26发布

问题:

My problem is when i deploy my ionic app on android, that smooth springy scroll effect (see .gif below) is missing. This does not occur when i serve my app locally on my development environment.

Why is it missing and how can i enable it?

My development environment:

  • ionic 1.3.20 and 1.0.0-rc.3 as a bower dependency
  • android sdk 22
  • ubuntu 14.10
  • java version 1.8.0_25
  • Ant version 1.9.4

This .gif illustrates what i'm referring as smooth springy scroll effect:

回答1:

You experiencing this because on iOS and Local-Browser the default setting for this effect is to be enabled while on Android the default is to be disabled.

To change that, add has-bouncing="true" attribute to ion-content tag

for example:

<ion-content has-bouncing="true">
  ...


回答2:

Change your ion-content element like this:

<ion-content class="has-header" overflow-scroll="false" has-bouncing="true">