Android Question Listview Text2 alignment problem

Ho Chia Leung

Member
Licensed User
Longtime User
Hi all,

I'm utilizing the Text2 of Listview control. Here is my code
B4X:
For i=0 To cursor1.RowCount -1
        cursor1.Position=i
        food_code= cursor1.GetString("PRODUCT_CODE")
        food_name = cursor1.GetString("PRODUCT_NAME")
        food_price = cursor1.GetDouble("PRODUCT_PRICE")
        lvFood.AddTwoLines2($"${food_code} ${food_name}"$, $"RM $1.2{NumberFormat2(food_price,1,2,2,False)}"$, food_code)
    Next
    cursor1.Close
   
    lvFood.TwoLinesLayout.Label.TextColor = Colors.Black
    lvFood.TwoLinesLayout.SecondLabel.Gravity = Gravity.RIGHT

This is the result I get
Screenshot_2015-04-01-20-43-19_zps5q5tmuhl.png


Half of my last character is missing when I set gravity to right. How to fix this?

Thank you!
 
Top