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: 146
Registered: ‎07-03-2013
My Device: BB 9360
My Carrier: WIND

multiple lines in a list item

Hi, 

Is it possible to have multiple lines in a list. currently, it seems like it has only 2 lines (1 for description and 1 for title). 

I need to put maybe atleast 3-4 lines with some text in it. 

Can i do something like:

change the width of list item and use "\n" in the description property.

 

Thanks!

Highlighted
Developer
Posts: 713
Registered: ‎05-31-2010
My Device: 8520
My Carrier: Movistar

Re: multiple lines in a list item

You can create your own "template"

Please check http://developer.blackberry.com/cascades/documentation/ui/lists/list_view.html (Customizing the appearance of list items)

Developer
Posts: 146
Registered: ‎07-03-2013
My Device: BB 9360
My Carrier: WIND

Re: multiple lines in a list item

well, what happens, if i still want it as a list. the reason being, i want to use context actions (long press to bring up options). is it possible?

 

Thanks!

Developer
Posts: 713
Registered: ‎05-31-2010
My Device: 8520
My Carrier: Movistar

Re: multiple lines in a list item

Sure!!!

You are only changing how the list item looks..

Developer
Posts: 146
Registered: ‎07-03-2013
My Device: BB 9360
My Carrier: WIND

Re: multiple lines in a list item

That make sense! 

btw, can i call javascript functions outside of the listItemComponent. there are some tickets opened and closed, but those solutions are not working for me. 

Currently, If i use "id" of the listView, it says"

"Reference error: can't find "listViewId".

 

Thanks!

Developer
Posts: 74
Registered: ‎12-17-2009
My Device: Z30
My Carrier: O2

Re: multiple lines in a list item

Hi, I am trying to learn how to develop apps and I am running into this problem. I've tried using the methods from the link given but the extra information (e.g. the status, the extra lines etc.) does not seem to show up in the preview!! 

 

Are there any additional steps that we must do or something? I am quite confused by the tutorials.

 

Thanks!

Developer
Posts: 146
Registered: ‎07-03-2013
My Device: BB 9360
My Carrier: WIND

Re: multiple lines in a list item

Dude, I am still looking into that. I'll update this post once I find a solution.
Do you have any idea? We can't use absolute layout as it will just overwrite other list items. It got to be with margins/padding and layout.
Developer
Posts: 366
Registered: ‎07-15-2013
My Device: blackberry Z10
My Carrier: Personal

Re: multiple lines in a list item

Surely it is doing a StandarListItem, you can customize using containers without problems

If you find this information useful please click like --->
@mezeitune on twitter
Developer
Posts: 146
Registered: ‎07-03-2013
My Device: BB 9360
My Carrier: WIND

Re: multiple lines in a list item

Hmm, not sure exactly what you are saying. Do u wanna share a snippet of the code?
Our problem is want multiple labels in multiple lines without default margin/padding. Want no or little margin between two lines.
Developer
Posts: 366
Registered: ‎07-15-2013
My Device: blackberry Z10
My Carrier: Personal

Re: multiple lines in a list item

ListView {
			  
			                                id: listview
			                                dataModel: groupDataModel
			                                
			                                    
			                                    

			                                listItemComponents: [
			                                    ListItemComponent {

			                                        type: "item"


Container{

ImageView{
imageSource: "image"
}

Label{
text:"label1"
}

Label{
text:"label2"
}

Label{
text:"label3"
}

}

}]
			                                
                                            

			                                
                                            
			                            
 } // ListView

 

To which I am referring to is something like the above
You have a listview, and inside the containers normally edit with

I hope you serve

If you find this information useful please click like --->
@mezeitune on twitter