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?
 

DonManfred

Expert
Licensed User
Longtime User
do checks for
not exceed top = 0 (not go to minus)
not exceed left = 0 (not go to minus)
 
Upvote 0

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
Top