tufanv Expert Licensed User Longtime User Mar 30, 2016 #1 Hello I have a basic menu button. When i click it , sidepanel comes from the left with the help of a timer with interval 1. With each tick the panel moves to right with value 1. The sliding panel is not moving too much smoothly, it makes some lags. Is there any possible way to make it smoother ? TY
Hello I have a basic menu button. When i click it , sidepanel comes from the left with the help of a timer with interval 1. With each tick the panel moves to right with value 1. The sliding panel is not moving too much smoothly, it makes some lags. Is there any possible way to make it smoother ? TY
narek adonts Well-Known Member Licensed User Longtime User Mar 30, 2016 #2 Try to use the class attached. it ticks on each screen refresh so it will be smooth. You can use it as a timer. Code: Copy dim tmr as CADisplayLink tmr.initialize("tmr",me) tmr.Enabled=true Sub tmr_refresh ' each screen refresh end Sub You can customize it to tick on your desired interval with tmr.TimeStamp calculations Attachments CADisplayLink.bas CADisplayLink.bas 1.6 KB · Views: 358 Upvote 0
Try to use the class attached. it ticks on each screen refresh so it will be smooth. You can use it as a timer. Code: Copy dim tmr as CADisplayLink tmr.initialize("tmr",me) tmr.Enabled=true Sub tmr_refresh ' each screen refresh end Sub You can customize it to tick on your desired interval with tmr.TimeStamp calculations
JanPRO Well-Known Member Licensed User Longtime User Mar 30, 2016 #3 A general question: Do you have tried it in release mode? Jan Upvote 0
tufanv Expert Licensed User Longtime User Mar 30, 2016 #4 yes. it is not too bad but slight lags JanPRO said: A general question: Do you have tried it in release mode? Jan Click to expand... Upvote 0
yes. it is not too bad but slight lags JanPRO said: A general question: Do you have tried it in release mode? Jan Click to expand...
narek adonts Well-Known Member Licensed User Longtime User Mar 30, 2016 #5 tufanv said: yes. it is not too bad but slight lags Click to expand... Did you tried with CADisplayLink class ? Upvote 0
tufanv said: yes. it is not too bad but slight lags Click to expand... Did you tried with CADisplayLink class ?
tufanv Expert Licensed User Longtime User Mar 30, 2016 #6 narek adonts said: Did you tried with CADisplayLink class ? Click to expand... i cant find the class with search can you post a link please ? Upvote 0
narek adonts said: Did you tried with CADisplayLink class ? Click to expand... i cant find the class with search can you post a link please ?
narek adonts Well-Known Member Licensed User Longtime User Mar 30, 2016 #7 It is attached to post #2 Upvote 0
tufanv Expert Licensed User Longtime User Mar 30, 2016 #8 narek adonts said: It is attached to post #2 Click to expand... Ah ty. I never saw your post until now thats why i did not reply to you sorry Upvote 0
narek adonts said: It is attached to post #2 Click to expand... Ah ty. I never saw your post until now thats why i did not reply to you sorry
tufanv Expert Licensed User Longtime User Mar 30, 2016 #9 narek adonts said: It is attached to post #2 Click to expand... now i tried it. Yes it is very smooth. What i couldnt manage is to calculate timestamp . When i start the animation, my left menu starts to slide to right but slowly(slower than a timer with interval 1 ). Can i make it faster like a timer with interval 1 ? Upvote 0
narek adonts said: It is attached to post #2 Click to expand... now i tried it. Yes it is very smooth. What i couldnt manage is to calculate timestamp . When i start the animation, my left menu starts to slide to right but slowly(slower than a timer with interval 1 ). Can i make it faster like a timer with interval 1 ?
narek adonts Well-Known Member Licensed User Longtime User Mar 30, 2016 #10 tufanv said: now i tried it. Yes it is very smooth. What i couldnt manage is to calculate timestamp . When i start the animation, my left menu starts to slide to right but slowly(slower than a timer with interval 1 ). Can i make it faster like a timer with interval 1 ? Click to expand... https://www.b4x.com/android/forum/t...mer-that-ticks-on-each-display-refresh.65234/ Upvote 0
tufanv said: now i tried it. Yes it is very smooth. What i couldnt manage is to calculate timestamp . When i start the animation, my left menu starts to slide to right but slowly(slower than a timer with interval 1 ). Can i make it faster like a timer with interval 1 ? Click to expand... https://www.b4x.com/android/forum/t...mer-that-ticks-on-each-display-refresh.65234/
narek adonts Well-Known Member Licensed User Longtime User Mar 30, 2016 #11 But for your issue you could also use LayoutAnimation and it will be better I think Upvote 0