Private Sub AnimatePanelText(xlv As CustomListView, _
WaitAfter As Int, _
Content As String, _
Height As Int, _
Color As Int) As ResumableSub
LogSub("AnimatePanel: Content = " & Content)
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0,0,0, xlv.AsView.Width, Height)
p.SetColorAnimated(0, xui.Color_Transparent, Color)
' 1. Create a layout with BBCodeView.
' 2. Initialize a BCTextEngine object. This should be called after the BBCodeViews And BBLabels were added.
p.LoadLayout("pnlBCEngine")
''BBCodeView1.mBase.SetLayoutAnimated(0,0,0,320,Height) ' nope
Dim sp As ScrollPane = BBCodeView1.sv
sp.SetVScrollVisibility("NEVER")
''sp.SetLayoutAnimated(0,0,0,B4M.xDevWidth,Height)
sp.SetLayoutAnimated(0,0,0,320,Height) ' nope
''sp.FitToWidth = True ' nope
TextEngine.Initialize(p)
BBCodeView1.Text = Content
''BBCodeView1.Base_Resize(B4M.xDevWidth, Height) ' nope
xlv.Add(p, xlv.Size) ' unique at least
p = xlv.GetPanel(xlv.Size-1)
p.Visible = False
p.SetVisibleAnimated(WaitAfter, True)
If xui.IsB4J Then
Sleep(0)
Else
Sleep(WaitAfter)
End If
Return True
End Sub