Android Question I have problem with animation

khosrwb

Active Member
Licensed User
Longtime User
when I touch any imageview I will start animation on it But animation started on laste imageview.
what can I do for solve this problem?
 

Attachments

  • a.zip
    34.2 KB · Views: 169

derez

Expert
Licensed User
Longtime User
The problem is that you have 4 imageviews with the same eventname.
Change your code like this:
B4X:
Sub imageview_Click
    Dim iv As ImageView = Sender
    anim.InitializeAlpha("animAlpha" , 1 , 0.7 )
    anim.Duration = 600
    anim.RepeatCount = -1
    anim.Start(iv)
End Sub
 
Upvote 0

khosrwb

Active Member
Licensed User
Longtime User
thanks derez :)
a new question : I need run an animation , how can I run only one animation?(when I touch all imageview , I see animation run at all objects ( imageview )
I will only an animation run at last touch and stop other animation
 
Upvote 0
Top