Android Question I just want to loop the imageview1 to get down every second does anyone know how?

Lhander

New Member
Sub timer1_tick
a = a + 1
If a <= 60 Then
Do While ImageView5.Top = ImageView5.Top + 5
Loop
End If
End Sub

This is just an assignment :)
 

ronell

Well-Known Member
Licensed User
Longtime User
B4X:
Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Activity.LoadLayout("Layout1")
    timer1.Initialize("timer1",1000)
    timer1.Enabled = True
    

End Sub

Sub timer1_tick
    
    ImageView1.Top = ImageView1.Top + 50
    
    If ImageView1.Top  > 100%y Then
        ImageView1.top = 0%y - ImageView1.Height
        
    End If
    
End Sub
 
Upvote 0
Top