Zeev Goldstein Well-Known Member Licensed User Longtime User Dec 7, 2017 #1 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 265.6 KB · Views: 688
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
DonManfred Expert Licensed User Longtime User Dec 7, 2017 #2 - You can use CustomListview. Here you have all possibilities. - You can use CharsequenceBuilder to define the Text with another Alignment. Upvote 0
- You can use CustomListview. Here you have all possibilities. - You can use CharsequenceBuilder to define the Text with another Alignment.
Zeev Goldstein Well-Known Member Licensed User Longtime User Dec 7, 2017 #3 thanks nothing to do with the standard one ? no way to justify both lines to the left ? Upvote 0
LucaMs Expert Licensed User Longtime User Dec 7, 2017 #4 Try: Code: Copy 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
Try: Code: Copy 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.
Zeev Goldstein Well-Known Member Licensed User Longtime User Dec 7, 2017 #5 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
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
Zeev Goldstein Well-Known Member Licensed User Longtime User Dec 7, 2017 #6 BTW - where should i put these lines ? before or afer i fill the listview ? or in activity load ? Upvote 0
Zeev Goldstein Well-Known Member Licensed User Longtime User Dec 7, 2017 #7 emplt lv - my problem - fixed it but the 2 lines made no change Upvote 0
LucaMs Expert Licensed User Longtime User Dec 7, 2017 #8 Test Attachments lv test.zip lv test.zip 11.5 KB · Views: 451 Upvote 0
Zeev Goldstein Well-Known Member Licensed User Longtime User Dec 7, 2017 #9 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
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 ?
LucaMs Expert Licensed User Longtime User Dec 7, 2017 #10 Zeev Goldstein said: 1 - why don't i see in my lv the separating line ? Click to expand... I don't know but... Zeev Goldstein said: 2 how do i set the line & line2 text color ? Click to expand... 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 said: 1 - why don't i see in my lv the separating line ? Click to expand... I don't know but... Zeev Goldstein said: 2 how do i set the line & line2 text color ? Click to expand... 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]
Zeev Goldstein Well-Known Member Licensed User Longtime User Dec 7, 2017 #11 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
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...
LucaMs Expert Licensed User Longtime User Dec 7, 2017 #12 Zeev Goldstein said: now all i need is to learn why don't i see the lines betwwen the elements - the separators Click to expand... https://www.b4x.com/android/forum/threads/listview-divider-line-color.10833/#post-60469 Upvote 0
Zeev Goldstein said: now all i need is to learn why don't i see the lines betwwen the elements - the separators Click to expand... https://www.b4x.com/android/forum/threads/listview-divider-line-color.10833/#post-60469
Erel B4X founder Staff member Licensed User Longtime User Dec 7, 2017 #13 Unless you are showing more than 1000 items than there is no reason to use ListView. As mentioned above you should use CustomListView. It is simpler and allows you to customize all items as needed. Upvote 0
Unless you are showing more than 1000 items than there is no reason to use ListView. As mentioned above you should use CustomListView. It is simpler and allows you to customize all items as needed.
Zeev Goldstein Well-Known Member Licensed User Longtime User Dec 7, 2017 #14 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
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
Zeev Goldstein Well-Known Member Licensed User Longtime User Dec 7, 2017 #15 thanks Erel - will go learn this Upvote 0
LucaMs Expert Licensed User Longtime User Dec 7, 2017 #16 But... use CustomListView Attachments lv test.zip lv test.zip 11.7 KB · Views: 468 Upvote 0
Zeev Goldstein Well-Known Member Licensed User Longtime User Dec 7, 2017 #17 Thanks once again This did the trick - all is perfect now THANK YOU Upvote 0
Zeev Goldstein Well-Known Member Licensed User Longtime User Dec 8, 2017 #18 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
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 ?
DonManfred Expert Licensed User Longtime User Dec 8, 2017 #19 Please create a new thread for any new question. Upvote 0