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
New Developer
Slosh
Posts: 38
Registered: ‎01-24-2014
My Device: Q5

Problem orientation in Listview

Hello

 

When not in use:

ListView{
...
layout: StackListLayout {
orientation: LayoutOrientation.LeftToRight
                }
...
}

 Show:

 

 

When used data disappear

Like:

 

 

When left to right

Show:

 

and I add:

horizontalAlignment: HorizontalAlignment.Right

same problem

What is the problem and how it is fixed?

I'm using right to left

 

Thanks!
Regards

Please use plain text.
New Developer
Slosh
Posts: 38
Registered: ‎01-24-2014
My Device: Q5

Re: Problem orientation in Listview

Up *;*

Please use plain text.
Developer
nemory
Posts: 217
Registered: ‎05-21-2012
My Device: BlackBerry RED Z10

Re: Problem orientation in Listview

Actually I see no problem.

 

By default listviews lists items from Top to Bottom Vertically.

 

Then you changed it to left to right. the UI generated it fine. just swipe horizontally and you will see the difference.

 

I also don't get what you're really trying to do here.

Please use plain text.
New Developer
Slosh
Posts: 38
Registered: ‎01-24-2014
My Device: Q5

Re: Problem orientation in Listview

 @nemory

 

Hi,

 

When using "orientation: LayoutOrientation.RightToLeft" show only one item.

 

Q 2 : I need show text from right.

Like this:

 

I'm using "horizontalAlignment: HorizontalAlignment.Right" but do not change any thing:

 

 

 

 

Please use plain text.
Developer
SumiGhosh
Posts: 435
Registered: ‎09-20-2011
My Device: Z10 LE, Playbook, DevAlpha C, 9900, 9380

Re: Problem orientation in Listview

if ypu are using label then give the property textStyle.textAlign: TextAlign.Right.

 

And also post your code for more clarification.

Please use plain text.
Developer
pyth
Posts: 506
Registered: ‎01-19-2011
My Device: My Trusty Red Plane

Re: Problem orientation in Listview

Hi Slosh

 

if it doesn't work, I suggest you create your own ListItemComponent. Don't use the default ones

 

https://developer.blackberry.com/native/reference/cascades/bb__cascades__listitemcomponent.html

-----------------------------------------------------------------------
I'm a bird from outer space. But I'm not flappy o.o
Please use plain text.
New Developer
Slosh
Posts: 38
Registered: ‎01-24-2014
My Device: Q5

Re: Problem orientation in Listview

@SumiGhosh

 

Hi

 

The same problem when using:

 

Label {
                                text: ListItemData.last_name
                                textStyle.textAlign: TextAlign.Right
                                    horizontalAlignment: HorizontalAlignment.Right
                                }

 

 

@pyth

 

Hi

 

I have tried nothing changes.

Please use plain text.
Developer
pyth
Posts: 506
Registered: ‎01-19-2011
My Device: My Trusty Red Plane

Re: Problem orientation in Listview

post your code here with an example, maybe we can fix it (if you are using a model, fill it with sample data onCreationCompleted)

-----------------------------------------------------------------------
I'm a bird from outer space. But I'm not flappy o.o
Please use plain text.