Android Question Use the Visual Designer With the code

Justcooldev

Member
Licensed User
Hello,
My Code:
cs.Initialize
    cs.Size(25)
    cs.Alignment("ALIGN_LEFT")
    cs.Color(Colors.Black)
    cs.TypeFace(Typeface.FONTAWESOME)
    cs.Image(LoadBitmap(File.DirAssets, "office.png"), 90dip, 90dip, False).VerticalAlign(15dip).Append("         Office")
    cs.Append(CRLF)
    cs.PopAll
    
    bt1.As(B4XView).SetColorAndBorder(xui.Color_LightGray, 1dip, xui.Color_DarkGray, 9dip)
    SetShadow(bt2.As(B4XView), 4, xui.Color_Green)
    bt1.Text = cs
1. I would like to know how from the code we can vertically center the text in a button independently of the image.
2. How to put a specific color like: (#FF6AA84F) that fills the button.

Thank you in advance
 

MicroDrie

Well-Known Member
Licensed User
Longtime User
The fasted answer to find by your self is the first answer with the search "center text button". Let us know if you need more help to solve your problem.
 
Upvote 0
Top