Butani Vijay
Butani Vijay

Reputation: 4239

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.

Upvotes: 1

Views: 1875

Answers (4)

Adir.el
Adir.el

Reputation: 43

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;'>

Upvotes: 0

Avijit
Avijit

Reputation: 3824

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/

Upvotes: 1

Arjun T Raj
Arjun T Raj

Reputation: 3207

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.

Upvotes: 2

sourav
sourav

Reputation: 676

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

http://cubiq.org/iscroll-4

http://areaaperta.com/nicescroll/

Upvotes: 2

Related Questions