Android Question Move the image randomly

lock255

Well-Known Member
Licensed User
Longtime User
Hi, how can I do to move an image inside a panel randomly, each time you press the button?
 

NJDude

Expert
Licensed User
Longtime User
Use the view's Left and Top properties.
B4X:
Button1.Left = randomValueX
Button1.Top = randomValueY

You will of course have to keep in consideration the width and height of the panel.
 
Upvote 0

lock255

Well-Known Member
Licensed User
Longtime User
For the size of the various objects use the percentages, it is not possible to move the objects randomly but using measures in percentage?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…