简体   繁体   中英

android browser scrolling issue in phonegp application

In my phonegap application scrolling working fine in some of the devices (android ), but in some of the devices scrolling content does not work.

Simple structure of my page as below :

------------Header-----------

------------content-----------

------------footer-------------

Sample Code :

<div id="header"> </div>

<div id="content"> 
This content does not scroll when overflow
</div>

<div id="footer"></div>


Header and footer is fixed size and position ( top and bottom).

When i try to scroll content area it will not work in some of the android devices.

Thanks in advance for solution.

You can use iScroll or NiceScroll js plugin for smooth scrolling of the content.

http://cubiq.org/iscroll-4

http://areaaperta.com/nicescroll/

hi You can use overflow scroll option in css but Android 3.0 and higher have support for overflow:scroll, < 3.0 it's not support . for that you can use iscroll http://cubiq.org/iscroll-4 or any other plugin.

First of all if you are making the application using html then you have to set a touchable scroller. Their is various plugin available in the market. So you can use any of them.

But there is some scroller which is not supported by android. You have to choose correct one for it. I am giving you a link where you can find a scroller. I have used it. It will work like a charm.

http://areaaperta.com/nicescroll/

you can try using style properties for <div>

overflow and overflow-y ,for me its working fine.

<div style='height: 190px; overflow: auto; overflow-y: scroll !important;'>

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