Android Question ImageViews

Rudi_

Member
Licensed User
Longtime User
can i use several imageviews with only one click event as i would with buttons like "ImageViews_Click"
 

DonManfred

Expert
Licensed User
Longtime User
yes

B4X:
Dim img1, img2, img3 As ImageView
img1.Initialize("ImageView")
img2.Initialize("ImageView")
img3.Initialize("ImageView")
 
Last edited:
Upvote 0

klaus

Expert
Licensed User
Longtime User
Sure, set the EventName the same for all ImageViews.
Use Sender in the Event routine(s) to know what view raised the event.
Example in chapter 3 Second program in the Beginner's Guide (with Buttons, but the principle is the same).
 
Upvote 0

metheoneandonly

Member
Licensed User
Longtime User
Please, how to check in runtime which image is loaded into ImageView? Can someone give me a sample of code? Thanks in advance!
 
Upvote 0
Top