Android Question Set Edges of layout

angelone

Member
Licensed User
Longtime User
Hi,
i'am moving a image view by finger in this way

B4X:
Sub Activity_Touch (Action As Int, X As Float, Y As Float)
    selectpecs.Left = x-40.0
    selectpecs.Top = y - 40.0

End Sub

Is there a way to set Edges for the form?
 

angelone

Member
Licensed User
Longtime User
I have do create an If statement like this?

If selectpecs.Top = 0 Then
selectpecs.Top = x + 40.0
End If

If selectpecs.left = 0 Then
selectpecs.left = x + 40.0
End If
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
If x > 40 then Selectpecs.top = x
if y > 40 then Selectpecs.Left = y
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…