Android Question Detect Last Object Selected

herryj

Member
Licensed User
Longtime User
Hi,
I have an image display on a screen randomly through array and there is a button located below that can detect what image last selected .
Can anyone give me some idea on how to do the red text above.

Really appreciated of your advance help.
 

derez

Expert
Licensed User
Longtime User
Use a global imageview and assign the selected imageview to it when selection is done:
(of course assign the number in the array to iv.tag )
B4X:
sub Global
   Dim send As ImageView
end sub

sub IV_click
   send = Sender
   selected =sender.tag
end sub

Send will have the selected image on it.
If you just want to know the selected number - then send can be local.
 
Upvote 0
Top