Shay Well-Known Member Licensed User Longtime User May 15, 2018 #1 Hi How do I move on screen Imageview from location A to location B (and then from B to C, etc) but I wish to do it on absolute location, meaining if ImageView is left 50, top 100, then to move it to left 20, top 200 I tried animation library, but I can't move it to my location
Hi How do I move on screen Imageview from location A to location B (and then from B to C, etc) but I wish to do it on absolute location, meaining if ImageView is left 50, top 100, then to move it to left 20, top 200 I tried animation library, but I can't move it to my location
KZero Active Member Licensed User Longtime User May 15, 2018 #2 Code: Copy ImageView1.Left=0 For i= ImageView1.Left To 400dip Step 2 ' ImageView1.Left=i Sleep(0) Next Upvote 0
Code: Copy ImageView1.Left=0 For i= ImageView1.Left To 400dip Step 2 ' ImageView1.Left=i Sleep(0) Next
Cableguy Expert Licensed User Longtime User May 15, 2018 #3 Shay said: I tried animation library, but I can't move it to my location Click to expand... Can you post your code using animation lib? What works/what doesn't work with the animation lib? Upvote 0
Shay said: I tried animation library, but I can't move it to my location Click to expand... Can you post your code using animation lib? What works/what doesn't work with the animation lib?
Shay Well-Known Member Licensed User Longtime User May 15, 2018 #4 Nice, but if I need also to move the top on the same time? Cableguy, basically I wish to move from point a,b to point c,d and stay there, and then move from c,d to e,f (but by top, left) I will give it another try.. Upvote 0
Nice, but if I need also to move the top on the same time? Cableguy, basically I wish to move from point a,b to point c,d and stay there, and then move from c,d to e,f (but by top, left) I will give it another try..
Star-Dust Expert Licensed User Longtime User May 15, 2018 #5 KZero said: Code: Copy ImageView1.Left=0 For i= ImageView1.Left To 400dip Step 2 ' ImageView1.Left=i Sleep(0) Next Click to expand... It is better to use: ImageView1.SetLayoutAninated(duration,left,top,width,height) Upvote 0
KZero said: Code: Copy ImageView1.Left=0 For i= ImageView1.Left To 400dip Step 2 ' ImageView1.Left=i Sleep(0) Next Click to expand... It is better to use: ImageView1.SetLayoutAninated(duration,left,top,width,height)
Star-Dust Expert Licensed User Longtime User May 15, 2018 #6 Shay said: Nice, but if I need also to move the top on the same time? Cableguy, basically I wish to move from point a,b to point c,d and stay there, and then move from c,d to e,f (but by top, left) I will give it another try.. Click to expand... Use SetLayoutAninated for the 4 movements, between a movement and another read one sleep(Duration) So you will have the movement you want Upvote 0
Shay said: Nice, but if I need also to move the top on the same time? Cableguy, basically I wish to move from point a,b to point c,d and stay there, and then move from c,d to e,f (but by top, left) I will give it another try.. Click to expand... Use SetLayoutAninated for the 4 movements, between a movement and another read one sleep(Duration) So you will have the movement you want
Shay Well-Known Member Licensed User Longtime User May 15, 2018 #7 Thanks everyone, I found the solution, I am doing calculation between the points (starting from 0,0) and then using: Sub Animation_AnimationEnd and putting the "end" location for my imageview this is moving the image and let it stay there.. Upvote 0
Thanks everyone, I found the solution, I am doing calculation between the points (starting from 0,0) and then using: Sub Animation_AnimationEnd and putting the "end" location for my imageview this is moving the image and let it stay there..
Erel B4X founder Staff member Licensed User Longtime User May 16, 2018 #8 There is no reason to use the Animation library. You should use ImageView.SetLayoutAnimated. Upvote 0