Need help with ListView

robife

Member
Licensed User
Longtime User
Hi guys I was searching for many hours Now, I cant find or understand how to fix this issue.
I have a ListView of contact persons with 9 different phone numbers.
When I click on a name/Item I want the numer of the person to be called and MsgBox with two options with yes or no.

B4X:
Sub ListView1_ItemClick (Position As Int, Value As Object)
   
   If Msgbox2("Onsker du a ringe ?", "", "Ja", "", "Nei", Null) = DialogResponse.POSITIVE Then
        'make call

   StartActivity(p.Call(1))
   End If

End Sub

B4X:
    ListView1.AddTwoLinesAndBitmap2("Formann", "Fornavn - 9999999", Bitmap1, "1")
      ListView1.AddTwoLinesAndBitmap2("Viseformann.", "Fornavn - 88989898", Bitmap1,"2")
      ListView1.AddTwoLinesAndBitmap2("Kasserer.", "Fornavn - 90990990", Bitmap1,"3")


How can I fix this can somebody help me please. :BangHead:
 
Last edited:

NJDude

Expert
Licensed User
Longtime User
You will have to do something like this:
B4X:
...
ListView1.AddTwoLinesAndBitmap2("Formann", "Janina Huseby - 413 62 565", Bitmap, "413 62 565")
...

and to call:
B4X:
...
StartActivity(p.Call(Value))
...
 
Upvote 0

robife

Member
Licensed User
Longtime User
You will have to do something like this:
B4X:
...
ListView1.AddTwoLinesAndBitmap2("Formann", "Janina Huseby - 413 62 565", Bitmap, "413 62 565")
...

and to call:
B4X:
...
StartActivity(p.Call(Value))
...


Hi NJDUDE thank you for helping me
This worked like a charm
i really appreciate your help
:icon_clap:
 
Upvote 0
Top