Android Question B4XView - SetLayoutAnimated - Top position doesn't work

Roberto P.

Well-Known Member
Licensed User
Longtime User
Hi all,

why doesn't the top parameter of the SetLayoutPosition function work? even setting a in the top parameter the position always remains the same.
See example:

B4X:
Sub btnCustom_Click
    Dim p As B4XView = xui.CreatePanel("")
    
    p.SetLayoutAnimated(0, 200dip, 1500dip, 300dip, 350dip)
    p.LoadLayout("CustomDialog")
    p.Top = 1350dip ' my test'

    dialog.PutAtTop = True 'put the dialog at the top of the screen
    Wait For (dialog.ShowCustom(p, "OK", "", "CANCEL")) Complete (Result As Int)
    If Result = xui.DialogResponse_Positive Then
        dialog.Show(fieldFirstName.Text & " " & fieldLastName.Text, "OK", "", "")
    End If
End Sub

dialog.png
 
Top