Hi,
I'm having difficulties creating list view click and long click events.
I want to create simple application with list of items and when you click on item you get new activity StartActivity(Activity2)...but...when I try click and long click, nothing happens. Could it be possible that it is not working cause I placed it on tab host?
Thanks:sign0085:
Klaus, thanks for your advice, I'm new to all this but let's try again.
I've created a list and placed it on a tab host:
ListView1.Initialize("Activity_Create")
ListView1.RemoveView()
TabHost1.AddTab2("List of Articles", ListView1)
I also added some items...
Then I created click event:
Sub ListView_ItemClick (Position As Int, Value As Object)
Activity.Title=value
End Sub
You should remove this line.
ListView1.RemoveView()
in ListView1.Initialize("Activity_Create")
Activity_Create is the EventName for the ListView1 object.
So the Click event routine must look like this:
Sub Activity_Create_Click
Or you could use ListView1.Initialize("ListView1") and
Sub ListView1_Click
It would be easier if you post your project as a zip file (IDE menu Files/Export As Zip), that way we see exactly what you have done and how, test and reproduce your problem in the same conditions as you.
Is your ListView added in the Designer or by code ?
The answer to this question we would have known it directly if we had your whole project.