dialog.Initialize(Activity)
dialog.PutAtTop = True
dialog.BackgroundColor = Colors.White
Private pnl As B4XView = xui.CreatePanel("")
pnl.SetLayoutAnimated(0dip, 0dip, 0dip, 340dip, 100dip)
pnl.LoadLayout("layout")
lbltitle.Text = "Test1"
lblprompt.Text = "L'azzeramento dei movimenti non verrà effettuata perchè il trasferimento sul Server FTP non è andato a buon fine." & CRLF & "Si consiglia di risolvere il problema e riprovare, oppure effettuare l'esportazione in locale."
' 3 times the original height
lblprompt.Text = lblprompt.Text & CRLF & lblprompt.text & CRLF & lblprompt.text
lblprompt.Text = lblprompt.Text & CRLF & lblprompt.text & CRLF & lblprompt.text
lblprompt.Text = lblprompt.Text & CRLF & lblprompt.text & CRLF & lblprompt.text
pnl.RemoveAllViews
pnl.AddView(lblprompt,0dip,0dip,340dip,lblprompt.Height+50dip)
' resize the label
lblprompt.Height = strutils.MeasureMultilineTextHeight(lblprompt,lblprompt.Text)
' resize the panel to fit the lblprompt
pnl.SetLayoutAnimated(0,0dip,0dip,340dip,lblprompt.Height)
Dim devheight As Int = GetDeviceLayoutValues.height - 40dip
svdialog.Panel.AddView(pnl,0dip,0dip,340dip,pnl.Height)
svdialog.Panel.Height = pnl.Height
svdialog.Height = devheight-100dip
Dim rsub1 As ResumableSub = dialog.ShowCustom(svdialog, "OK", "", "CANCEL")
Wait For (rsub1) Complete (Result As Int)
If Result = xui.dialogResponse_Positive Then
'
End If