Android Question Swipe ActionColors, TextColor

Magma

Expert
Licensed User
Longtime User
Hi there...

In CLV Swipe with ActionColors, you can set the background color...

How to set the TextColor ?
 

Magma

Expert
Licensed User
Longtime User
Never mind.. changed from the class

B4X:
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.CreateDefaultBoldFont(20)
        xlbl.Font = xui.CreateFontAwesome(40)
        xlbl.TextColor = xui.Color_white 'here
        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
 
Upvote 0
Top