Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
TextEngine.Initialize(Root)
Dialog.Initialize(Root)
Dialog.BackgroundColor = 0xFF0028FF
Dialog.ButtonsColor = 0xFF0028FF
Dialog.BorderColor = xui.Color_Gray
Dialog.ButtonsTextColor = xui.Color_White
Dialog.OverlayColor = xui.Color_Transparent
Dialog.BorderCornersRadius = 30dip
Dialog.BorderColor = xui.Color_Transparent
End Sub
Private Sub Button1_Click
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0, 0, 0, 300dip, 300dip)
p.LoadLayout("BBDialog")
BBCodeView1.TextEngine = TextEngine
Dim sv As ScrollPane = BBCodeView1.sv
sv.SetVScrollVisibility("NEVER")
BBCodeView1.Text = $"[color=white][TextSize=18]jk lfsdjf lksdjf lksdf
weklfjwklefjklwef asdasdasd
wefjwlekf [b]jklwef w[/b] [color=yellow]asdasdasd[/color]
efwjelk fwklefj [u]wlkef jwlkefwlekf jwelfw[/u]
ef wjeklf jwelkf [/TextSize][/color]"$
Dim rs As Object = Dialog.ShowCustom(p, "Setup", "", "")
Dim btn As B4XView = Dialog.GetButton(xui.DialogResponse_Positive)
btn.Left = btn.Left - 10dip
Wait For (rs) Complete (Result As Int)
End Sub