Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 237
Registered: ‎11-24-2012
My Device: Blackberry 10 Dev Alpha
My Carrier: Telkomsel
Accepted Solution

Why sometimes listview is shaking?

[ Edited ]

Hi, I'm using listview on my apps.

 

Why sometimes when I hold to up (gesture slide to top) the listview is shaking (move up & down)?
Here the video:

http://www.youtube.com/watch?v=c6CfbPn7Kzo&feature=youtu.be

 

Anyone face this problem too?

How to solve this?

 

Thanks

Developer
Posts: 237
Registered: ‎11-24-2012
My Device: Blackberry 10 Dev Alpha
My Carrier: Telkomsel

Re: Why sometimes listview is shaking?

Anyone has face this problem too?

 

 

Thanks

Developer
Posts: 103
Registered: ‎12-31-2012
My Device: Blackberry 9810
My Carrier: Verizon

Re: Why sometimes listview is shaking?

[ Edited ]

Are you sure you are not resetting/clearing the datamodel in any event of scroll. I once had a very similar issue when i had accidently given dtMdl->clear(); in one of the events.

 

_Dishooom

Developer
Posts: 237
Registered: ‎11-24-2012
My Device: Blackberry 10 Dev Alpha
My Carrier: Telkomsel

Re: Why sometimes listview is shaking?

I'm clearing the datamodel when user click refresh or loadmore button.

And insert again when get new data.

 

Is this cause the problem?

Developer
Posts: 103
Registered: ‎12-31-2012
My Device: Blackberry 9810
My Carrier: Verizon

Re: Why sometimes listview is shaking?

Clearing the dataModel and resetting it does cause problems with ListView...  Are you sure you are clearing it only with the refresh button...

 

Try temporarily commenting the dataModel->clear() and see if it brings any difference to the scroll..

Developer
Posts: 237
Registered: ‎11-24-2012
My Device: Blackberry 10 Dev Alpha
My Carrier: Telkomsel

Re: Why sometimes listview is shaking?

I try to not clear() on dataModel, but the listView still shaking.

 

Anyone also face this problem?

 

How to solve it?

 

Thanks

Developer
Posts: 237
Registered: ‎11-24-2012
My Device: Blackberry 10 Dev Alpha
My Carrier: Telkomsel

Re: Why sometimes listview is shaking?

I change layout from FlowListLayout {} to 

 

GridListLayout {

columnCount: gridOrientation.orientation == UIOrientation.Landscape ? 3 : 2
headerMode: ListHeaderMode.Standard
cellAspectRatio: 1
verticalCellSpacing: 20
horizontalCellSpacing: 20

}

 

and no shake again