I'm trying to make an android app and need some help, i want to make imagebutton1 that have a src1 already to change its src1 and a textbox1 text "a" when clicked to src2 and the textbox1 text become "b" if clicked again change to src1 and the text to "a" etc... i used to do this in vb.net by
Private Sub units_Click(sender As Object, e As EventArgs) Handles units.Click
counter = counter + 1
If (-1) ^ counter < 0 Then
units.Image = WindowsApplication1.My.Resources.Resources.lup
Label3.Text = "a"
Else
units.Image = WindowsApplication1.My.Resources.Resources.ldown
Label3.Text = "b"
End If
End Sub
please help and mention what each line do because I'm new to java