Android Question DSFloatLabelEditText Hint Font

Salar82

Member
Hi
I Used DSFloatLabelEditText (DesignSupportLibrary) in my project.
How Can I Change its "Hint Font" And "Hint Font Size"?

 

Erel

B4X founder
Staff member
Licensed User
Longtime User
You can right align it with this code:
B4X:
Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("1")
    SetHintAlignmnetRight(B4XFloatTextField1)
End Sub

Sub SetHintAlignmnetRight(ft As B4XFloatTextField)
    ft.TextField.SetTextAlignment("CENTER", "RIGHT")
    Dim HintImageView As B4XView = ft.mBase.GetView(1)
    HintImageView.RemoveViewFromParent
    Dim pnl As B4XView = xui.CreatePanel("")
    ft.mBase.AddView(pnl, ft.mBase.Width - HintImageView.Width - 10dip, 0, HintImageView.Width + 10dip, ft.mBase.Height)
    pnl.AddView(HintImageView, 6dip, HintImageView.Top, HintImageView.Width, HintImageView.Height)
End Sub
Make sure to uncheck "Show Clear Button" and "Show Accept Button" options.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…