Spanish [SOLUCIONADO] ¿Cómo se usa MadeWithLove de las XUI Views?

vecino

Well-Known Member
Licensed User
Longtime User
Hola amigos, pues eso, ¿cómo se usa?
He visto un ejemplo en portugués, creo, que lo convierte en enlazable, pero no entiendo cómo hay que declararla y usarla para mostrarla en pantalla.
Saludos.
 

TILogistic

Expert
Licensed User
Longtime User
love.mBase.GetView(0) es la vista que esta en la mbase de love (panel)

Dim lbl As Label = love.mBase.GetView(0)
cs.EnableClickEvents(lbl)
lbl.Text = cs

vea:

diseño de clase: MadeWithLove

B4X:
'Base type must be Object
Public Sub DesignerCreateView (Base As Object, Lbl As Label, Props As Map)
    mBase = Base
    Tag = mBase.Tag : mBase.Tag = Me
    Dim xlbl As B4XView = Lbl
    #if B4J
      Dim tf As B4JTextFlow
    tf.Initialize
    tf.Append("Made with ")
    tf.SetFont(xlbl.Font)
    tf.SetColor(xlbl.TextColor)
    tf.Append(Chr(0xF004))
    tf.SetFont(xui.CreateFontAwesome(xlbl.TextSize))
    tf.SetColor(xui.Color_Red)
    tf.Append(" in B4X")
    tf.SetFont(xlbl.Font)
    tf.SetColor(xlbl.TextColor)
    mBase.AddView(tf.CreateTextFlow, 0, 0, mBase.Width, mBase.Height)
    #else if B4A
    Dim cs As CSBuilder
    cs.Initialize.Append("Made with ").Typeface(Typeface.FONTAWESOME).Color(xui.Color_Red).Append(Chr(0xF004)).Pop.Pop.Append(" in B4X").PopAll
    xlbl.Text = cs
    xlbl.SetTextAlignment("CENTER", "CENTER")
    mBase.AddView(xlbl, 0, 0, mBase.Width, mBase.Height)
    #else if B4i
    Dim cs As CSBuilder
    cs.Initialize.Append("Made with ").Font(Font.CreateFontAwesome(xlbl.TextSize)).Color(xui.Color_Red).Append(Chr(0xF004)).Pop.Pop.Append(" in B4X").PopAll
    Lbl.AttributedText = cs
    xlbl.SetTextAlignment("CENTER", "CENTER")
    mBase.AddView(xlbl, 0, 0, mBase.Width, mBase.Height)
    #end if
End Sub
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…