Android Tutorial ListView tutorial

yolira

Member
Licensed User
Longtime User
I really need to change the color of Divider of Listview

cause my theme is Grey and the divider seems to be have a very similar color and cant be seen at all

how can i do this

thanks
 

yolira

Member
Licensed User
Longtime User
Can you add more of three labels in listview? I want to show label left in listview but how?
 

Attachments

  • Free_apps.jpg
    69.1 KB · Views: 790

klaus

Expert
Licensed User
Longtime User

DonManfred

Expert
Licensed User
Longtime User
May I know what is the click event rise for the bitmap in the listview ?
1. Always create a NEW thread in the questions forum for any question you have
2. The Bitmap does not have an own Event. If you add them with. lv.TwoLinesandbitmap2 then you get an event if you click on the item row. You get the Value given in the TwoLinesandbitmap2 command...
 

tongpudian

Member
How to change the content in ListView? thanks.
 

Attachments

  • upload_2017-12-5_9-20-46.png
    25.6 KB · Views: 337
  • upload_2017-12-5_9-23-56.png
    25.6 KB · Views: 319

victormedranop

Well-Known Member
Licensed User
Longtime User
hi, all. I have a listview with two lines layout.
but when I try to read the content olnly display de first line and not the second line.

B4X:
 ListView_Jugadas.TwoLinesLayout.ItemHeight = 120dip
 ListView_Jugadas.TwoLinesLayout.Label.TextSize = 30
 ListView_Jugadas.TwoLinesLayout.Label.TextColor = Colors.RGB(63,81,181)
 ListView_Jugadas.TwoLinesLayout.Label.Gravity = Gravity.LEFT
 ListView_Jugadas.TwoLinesLayout.SecondLabel.TextSize = 30
 ListView_Jugadas.TwoLinesLayout.SecondLabel.TextColor = Colors.RGB(63,81,181)
 ListView_Jugadas.TwoLinesLayout.SecondLabel.Gravity = Gravity.LEFT

ListView_Jugadas.AddTwoLines(Label_loterias_seleccion.Text, $"Jugada: P ${jugada_1} Monto: ${monto_de_la_jugada}"$)

 For w = 0 To ListView_Jugadas.Size - 1
  cpinter.pm_print(ListView_Jugadas.GetItem(w))
  LogColor("jugadas impresion : " & ListView_Jugadas.GetItem(w),Colors.red)
  cpinter.pm_feed(1)
 Next

but lines at perfectly fill with the data.

any help will be appreciated.

victor
 

DonManfred

Expert
Licensed User
Longtime User
but when I try to read the content olnly display de first line and not the second line.
You need to hold your own list with ALL values (including secondline).
Create a Global List
On filling the LV you add a Map with the contents of both lines (or more info) to the global list

Use your global list to get the values back.

Next time: ALWAYS CREATE A NEW THREAD in the Questionsforum for any Question you have!
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…