Dear All, Greetings, How to make CLV move smoothy as sliders ? say for this example: https://www.b4x.com/android/forum/threads/cards-list-with-customlistview.87720/#content I made a timer and apply this command Sub Timer2_tick CLV1.ScrollToItem(itemNo) . . End Sub CLV jump...
www.b4x.com
I have seen members using sleep() with position change of views to create slow movement of views.
Now Erel has shown using java object (I do not have much knowledge of it)
My query is can we generalize this java object for any other view movement ?
Like making a view move from top to bottom in a slow smooth way, say.
This code looks simpler to me than adding sleep after every step.
It is simpler. A view as B4XView has a SetLayoutAnimated method.
The following moves the button when pressed 300 to the right and 100 down in 3 seconds.
(Button1 is declared as a B4XView)
B4X:
Private Sub Button1_Click
Button1.SetLayoutAnimated(3000, Button1.Left + 300, Button1.top + 100, Button1.Width, Button1.Height)
End Sub
I am moving an image with this code: iv1.Initialize("iv1") iv1.SetImage(im) MainForm.RootPane.AddNode(iv1,X_Pos,0,230,230) iv1.SetLayoutAnimated(Image_Speed,X_Pos,1670.0,230,230) Does anyone know how I can track the X and Y position of the image as it does it's animation? Thanks
After having seen the first post of this tread: My favourite animation trick: exponential smoothing. I decided to make a B4XPages project for the different easing functions and posted it there. The source of the equations comes from this site: Easing Equations Then, I was suggested to post it...
It is simpler. A view as B4XView has a SetLayoutAnimated method.
The following moves the button when pressed 300 to the right and 100 down in 3 seconds.
(Button1 is declared as a B4XView)
B4X:
Private Sub Button1_Click
Button1.SetLayoutAnimated(3000, Button1.Left + 300, Button1.top + 100, Button1.Width, Button1.Height)
End Sub