iOS Tutorial FloatLabeledEditText (iUI8)

SS-2016-02-29_10.40.03.png


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

Well-Known Member
Licensed User
Longtime User
Ok. It's wonderful but it's possible to have a password FloatLabeledTextField ?
Thanks
 

cloner7801

Active Member
Licensed User
Longtime User
I set FloatLabeledEditText alpha to 0 and in code I use alpha animated
but it didn't work
 

Erel

B4X founder
Staff member
Licensed User
Longtime 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))
 

hongbii khaw

Member
Licensed User
Longtime User
Hi all,
Can I create the floatedlabelededittext in the program instead of in designer?
Thank you.
 
Top