N Nataly Member Oct 20, 2021 #1 Any suggestion on how can I implement a similar button to "Slide to Answer" button in iPhone.
Solution Erel Oct 20, 2021 15 minutes work - draft version (I'm pretty sure that Apple engineers worked on it longer). Only tested in B4A.
15 minutes work - draft version (I'm pretty sure that Apple engineers worked on it longer). Only tested in B4A.
Erel B4X founder Staff member Licensed User Longtime User Oct 20, 2021 #2 15 minutes work - draft version (I'm pretty sure that Apple engineers worked on it longer). Only tested in B4A. Attachments SlideToAnswer.zip SlideToAnswer.zip 15.3 KB · Views: 523 Upvote 0 Solution
15 minutes work - draft version (I'm pretty sure that Apple engineers worked on it longer). Only tested in B4A.
josejad Expert Licensed User Longtime User Oct 20, 2021 #3 Erel said: Only tested in B4A Click to expand... It works in B4J too¡¡ Upvote 0
N Nataly Member Oct 24, 2021 #5 Hello @Erel, I tried to use a msg box after the slide to answer button reached the end. But the message box appear 3 times, how can i resolve this issue? Upvote 0
Hello @Erel, I tried to use a msg box after the slide to answer button reached the end. But the message box appear 3 times, how can i resolve this issue?
Erel B4X founder Staff member Licensed User Longtime User Oct 24, 2021 #6 Add: Code: GestureStarted = False After (line 78 in SlideToAnswer): Code: CallSub(mCallBack, mEventName & "_ReachedEnd") Upvote 0
Add: Code: GestureStarted = False After (line 78 in SlideToAnswer): Code: CallSub(mCallBack, mEventName & "_ReachedEnd")
N Nataly Member Oct 27, 2021 #7 Hello @Erel, How can I return the button to initial state? I tried to save the initial position and assign it after reaching the end but didn't work. Upvote 0
Hello @Erel, How can I return the button to initial state? I tried to save the initial position and assign it after reaching the end but didn't work.
Erel B4X founder Staff member Licensed User Longtime User Oct 27, 2021 #8 It should return automatically once you lift the finger. Upvote 0
N Nataly Member Oct 27, 2021 #9 Erel said: It should return automatically once you lift the finger. Click to expand... You're right but it doesn't after I added this line: Erel said: GestureStarted = False Click to expand... Upvote 0
Erel said: It should return automatically once you lift the finger. Click to expand... You're right but it doesn't after I added this line: Erel said: GestureStarted = False Click to expand...
Erel B4X founder Staff member Licensed User Longtime User Oct 27, 2021 #10 New version uploaded to post #2. The thumb returns back automatically after the ReachedEnd event. The code is quite simple. You can further customize it as needed. Upvote 0
New version uploaded to post #2. The thumb returns back automatically after the ReachedEnd event. The code is quite simple. You can further customize it as needed.
N Nataly Member Oct 28, 2021 #11 Erel said: New version uploaded to post #2. The thumb returns back automatically after the ReachedEnd event. The code is quite simple. You can further customize it as needed. Click to expand... Hello Erel Thank you for your help, I used the code in post 2 same problem, but I removed sleep(16) and it worked. Maybe because I want it to return on Activity_resume not only on Activity_create. Thank you again for your help. Upvote 0
Erel said: New version uploaded to post #2. The thumb returns back automatically after the ReachedEnd event. The code is quite simple. You can further customize it as needed. Click to expand... Hello Erel Thank you for your help, I used the code in post 2 same problem, but I removed sleep(16) and it worked. Maybe because I want it to return on Activity_resume not only on Activity_create. Thank you again for your help.
Erel B4X founder Staff member Licensed User Longtime User Oct 29, 2021 #12 Nataly said: Maybe because I want it to return on Activity_resume not only on Activity_create Click to expand... Don't waste your time with activities. Switch to B4XPages. Upvote 0
Nataly said: Maybe because I want it to return on Activity_resume not only on Activity_create Click to expand... Don't waste your time with activities. Switch to B4XPages.