iOS Tutorial FloatLabeledEditText (iUI8)

Erel

Administrator
Staff member
Licensed User


iUI8 v1.20 includes a new view named FloatLabeledEditText. It is a modified TextField that instead of hiding the hint text when the text field is non-empty it moves it to the top.

It is implemented as a custom view. You just need to a reference to iUI8 library and then add the view with the designer (it will appear under CustomView menu).

It is based on this open source project: https://github.com/jverdi/JVFloatLabeledTextField

Note that you need to add #MinVersion: 8 when using iUI8 library.
 

moore_it

Active Member
Licensed User
Ok. It's wonderful but it's possible to have a password FloatLabeledTextField ?
Thanks
 

AndOrNot

Well-Known Member
Licensed User
Is possible to set hint text color?
Another issue, when i try to change view dimension, it doesnt work
 

Erel

Administrator
Staff member
Licensed User
when i try to change view dimension, it doesnt work
You need to change the position of FLV.BaseView.

You can change the active and inactive colors with this code:
B4X:
Dim no As NativeObject = FloatLabeledTextField1
no.SetField("floatingLabelActiveTextColor", no.ColorToUIColor(Colors.Red))
Dim s As AttributedString
s.Initialize("hint text here", Font.DEFAULT, Colors.Blue)
no.RunMethod("setAttributedPlaceholder:", Array(s))
 
Top