public Sub StyleFloat(bbx As B4XFloatTextField)
bbx.HintLabelSmallOffsetY=5dip
bbx.HintLabelSmallOffsetx=5dip
bbx.Update
bbx.TextField.TextColor=Colors.Black
bbx.TextField.SetColorAndBorder(Colors.White, 2dip, Colors.Black, 5dip)
Dim edt As EditText = bbx.TextField
edt.Padding = Array As Int (5dip, 5dip, 5dip, 5dip)
End Sub
That works ok when stylefloat(myb4xfloattextfield) but if this is a password field and want someone to reveal... loosing the style ! why?
Because a new edit text is created each time and the old one is discarded. So you have to execute the code for styling again each time.
Deep dive:
In the SwitchFromPasswordToRegular sub on the B4XFloatTextField.bas the sub CreateTextFieldAll is called, which then creates a new edittext.
Because a new edit text is created each time and the old one is discarded. So you have to execute the code for styling again each time.
Deep dive:
In the SwitchFromPasswordToRegular sub on the B4XFloatTextField.bas the sub CreateTextFieldAll is called, which then creates a new edittext.