B4A Library [Code Module] HotSpots

stevel05

Expert
Licensed User
Longtime User
OK, I think that due to putting the touch subroutine in front of the click handler on the scroll view the timings may be messed up and the scroll view may not register the double click, you may have to handle the double click within the touch sub.

Try catching the required info (the selected item from the scroll view) on the first click and set a timer in the touch sub, then if a double click is found (within say 500ms) call the contact from the touch sub, of no double click proceed as normal.

Let me know how you get on, I may have some time to look at it tomorrow or Friday if it's still a problem.

Steve
 

laviniut

Active Member
Licensed User
Longtime User
Is a good idea. but in sub
B4X:
Sub Listcont_ItemClick (Position As Int, Value As Object)
    Log("value="&Value)
End Sub
i cannot get anything from list view.
maybe with some sort of reflection?
 

stevel05

Expert
Licensed User
Longtime User
@laviniut, you're going to kick yourself, you have initialized Listcont as:

B4X:
Listcont.Initialize("listcontview")

The ItemClick sub should be:

B4X:
Sub listcontview_ItemClick (Position As Int, Value As Object)

Then you get the value returned.

Steve
 

laviniut

Active Member
Licensed User
Longtime User
Thank you. I didn't noticed that. Now i will try to make use of timers.
 

laviniut

Active Member
Licensed User
Longtime User
stevel05, can you help me? now i can get item from listcontview but i failed with timers.
i cannot get correct doubleclick item from listview.
 

Attachments

  • contacts for blind final hotspot list work.zip
    43.4 KB · Views: 281

stevel05

Expert
Licensed User
Longtime User
@laviniut

I've had a quick look at your app, if you check the ResultsList you are getting two results, which is causing problems with the double click check. You need to initialize SLHotSpotLib regardless of whether it is already initialized, as you are getting results from hotspots from the previous activity.

Then you'll have a chance to get the double click to work.

Steve
 

laviniut

Active Member
Licensed User
Longtime User
I've initialized again SLHotSpotLib and is working now. And i finished application. Was a minor problem because
B4X:
Sub listcontview_ItemClick (Position As Int, Value As Object)
is slow than
B4X:
Sub DoubleClickedalege(Tag As String)
so i needed a delay, but i solved it.
Thank you very much Steve.
 

stevel05

Expert
Licensed User
Longtime User
You're welcome, I'm glad you've got it working it's a good concept.
 

Beja

Expert
Licensed User
Longtime User
Very old thread but...
Thanks for sharing..

When the top value is 0 then the variable is float.. in all other cases it is integer.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…