You can align the text using ..
Dim jo1 = FloatTextField1.TextField As JavaObject
jo1.RunMethod("setAlignment", Array As Object("CENTER"))
As far as the hint text .. I tried to adapt some B4A code by
@Erel Here ...
SetHintAlignmnetCenter(FloatTextField1)
Sub SetHintAlignmnetCenter(ft As B4XFloatTextField)
Dim HintWidth As Int = 200dip
Dim HintHeight As Int = 60dip
Dim HintImageView As B4XView = ft.mBase.GetView(1)
HintImageView.RemoveViewFromParent
Dim pnl As B4XView = xui.CreatePanel("")
ft.mBase.AddView(pnl, ft.mBase.Width/2 - HintWidth/2, 0, HintWidth, HintHeight)
pnl.AddView(HintImageView, 6dip, HintImageView.Top, HintImageView.Width, HintImageView.Height)
End Sub
It would appear the HintText is an ImageView and unfortunately ..
1. you only seem to get the height and width after text has been entered (thus the manual sizing above)
2. you end up with a panel holding the hint text (thus you initially have to click the the TextField on a non hint area.)
maybe take it for a spin and make your own decision.
@Erel will probably fly by soon with a more correct /succinct code anyway.