I am working on a chat application for BlackBerry that leverages ListView
to display chat messages. I have different kinds of messages and therefore I use multiple ListItemComponent
s, but what's more important, I use property: stickToEdgePolicy: ListViewStickToEdgePolicy.End
to ensure that the scroll is positioned at the end when new chat messages arrive.
Everything is working fine, but sometimes the content of ListView
starts shaking by few pixels up and down and that lasts infinitely. This is usually happening when a user is scrolling the view by swipe gestures and reaches the bottom. Also, this may happen if a new message has arrived. However, this never happens consistently! Also, worth to mention this happens with equal probability on square screen and rectangle screen devices.
While researching this, I found that the height of the view is affecting this jittering effect by making it less or more likely to happen, but none of the height values made it completely gone.
My question is addresed to the experienced BB10 developers, who practically saw this issue and know how to this fix.
The layout is pretty straightforward:
Container {
ChatTitle {
// this is just another Container with chat title Label
}
ListView {
id: chatEntries
stickToEdgePolicy: ListViewStickToEdgePolicy.End
topMargin: ui.sdu(1)
bottomMargin: ui.sdu(1)
...
listItemComponents: [
...
]
}
...
// few controls below the ListView, e.g. TextArea, Buttons.
}
Appreciate any help, thanks!