Private Sub CreateActionButtons (actions As List) As Int
ActionsPanel.RemoveAllViews
Dim LastX As Int = 0
For Each action As String In actions
Dim l As Label
l.Initialize("lbl")
Dim xlbl As B4XView = l
xlbl.Text = action
xlbl.Color = ActionColors.GetDefault(action, xui.Color_White)
xlbl.SetTextAlignment("CENTER", "CENTER")
xlbl.Font = xui.CreateMaterialIcons(20)
xlbl.TextColor = xui.Color_Black
Dim width As Int = Max(40dip, cvs.MeasureText(action, xlbl.Font).Width + 20dip)
ActionsPanel.AddView(xlbl, ActionsPanel.Width - width - LastX, 0, width, ActionsPanel.Height)
LastX = LastX + width
Next
Return LastX
End Sub