Android Question listview - driving me nuts...

Zeev Goldstein

Active Member
Licensed User
hello,
i'm trying to use listview with 2 lines and image
i get to have all data in place however - while the image is justified to the left (as should be) the text is justified to the right and part of it is hidden

my device is in hebew (RTL)
the text i use in lines is all numeric - a few numeric with space between

how do i solve this ?

thanks
 

Attachments

  • Screenshot_20171207-121453.png
    Screenshot_20171207-121453.png
    265.6 KB · Views: 175

LucaMs

Expert
Licensed User
Try:
B4X:
ListView1.TwoLinesAndBitmap.Label.Gravity = Bit.Or(Gravity.LEFT, Gravity.CENTER_VERTICAL)
ListView1.TwoLinesAndBitmap.SecondLabel.Gravity = Bit.Or(Gravity.LEFT, Gravity.CENTER_VERTICAL)

And check the width of your ListView (to know if it out of screen on the right).

Anyway, @DonManfred's suggestion about CustomListView is to take in account, CustomListView is better.
 
Upvote 0

Zeev Goldstein

Active Member
Licensed User
thanks.
tried that - got an empty or it was all hidden - no content
the listview is a bit smaller then the screen so on that side i'm good
 
Upvote 0

Zeev Goldstein

Active Member
Licensed User
Dearest Luca - you're a life saver !!!
thank you very much for your help - this did the job.

if i may 2 quick questions -
1 - why don't i see in my lv the separating line ?
2 how do i set the line & line2 text color ?
 
Upvote 0

LucaMs

Expert
Licensed User
1 - why don't i see in my lv the separating line ?
I don't know but...
2 how do i set the line & line2 text color ?
you can change all the properties of both labels, as you can see as I did for the gravity (alignment) of text.

[The changes will affect ALL items; this is one of the good reasons to use CustomListView]
 
Upvote 0

Zeev Goldstein

Active Member
Licensed User
yes - got it - thank you!!

now all i need is to learn why don't i see the lines betwwen the elements - the separators

i will have to keep on breaking my head on this :)

once again - thanks...
 
Upvote 0

Zeev Goldstein

Active Member
Licensed User
thanks again - this is not how it is done in your sample
in your sample there is nothing you did to handle the divider - in your sample the dividers are visible
i just want it to be the same in my listview
 
Upvote 0

Zeev Goldstein

Active Member
Licensed User
thanks for ALL!
all now is perfect.

another silly question: can i make a verical label?
where text is from up to down and of course in 90 degrees ?
 
Upvote 0
Top