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: 180
Registered: ‎12-09-2011
My Device: 9360, BB10
My Carrier: Aircel

List View Problem

HI All,

 

I am facing the problems in List View Scrolling.

 

I am using one list view whose layout is Left to Right. In this List View i am adding one container in ListItemComponent.

And this container contains the ScrollView.

Means the final view of my screen is that it is both side scrollable horozintal and vertical.

 But the problem is this when I scroll the list top down (vertically) it is scrolling left to right (horizontally) also. And thats why it is showing the next index data in the screen.

 

ListView {

dataModel: GroupDataModel {
grouping: ItemGrouping.None
}
layout: StackListLayout {
orientation: LayoutOrientation.LeftToRight
}
flickMode: FlickMode.SingleItem
snapMode: SnapMode.LeadingEdge
scrollIndicatorMode: ScrollIndicatorMode.None
listItemComponents: [
ListItemComponent {
type: "item"
DetailsListItem {

}

}

 

----------------------------------------------------

DetailsListItem.qml

Container {

ScrollView {

}

}

 

 

Please suggest the solution for this.

 

Thanks in Advance.

Contributor
Posts: 12
Registered: ‎12-15-2012
My Device: Z10
My Carrier: Omnitel

Re: List View Problem

I can't give complete solution as I have never done like that in cascades (only in plain QML). But some ideas/notes:

 

I believe ScrollView should wrap Container (not otherwise as in your sample). I would play around with width/height parameters as well as I believe it might be necessary in this situation. Lastly it might be impossible in cascades if something is not done properly in lower levels you can't access.