Android Tutorial FloatLabeledEditText (ViewsEx)

upload_2016-2-28_15-46-20.png


FloatLabeledEditText is an improved EditText where the hint moves to the top instead of disappearing when there is text in the field.

With the floating hint you no longer need to add a label to describe the field.

The implementation is based on this open source project: https://github.com/wrapp/floatlabelededittext

It is implemented as a custom view. You need to add it from the designer. Note that you can change the text properties.

SS-2016-02-28_15.54.34.png


Technically FloatLabeledEditText wraps an EditText. You can get this EditText with the EditText property.
This is useful if you want to configure the internal EditText.

This library is part of the ViewsEx library (v1.10+). It is supported by Android 4+ and requires B4A v5.8+.
 

demasi

Active Member
Licensed User
Longtime User
Hello,
I'm trying to use this custom view FloatLabeledEditText but it does not appear in the Designer.
I'm using licensed version 5.80 and I download last version of ViewsEx and copied to the libraries folder.
But I noted that the post says ViewsEx last version is 1.1 and the lib says 1.0 when loads.
Any help?
 

Anser

Well-Known Member
Licensed User
Longtime User
What if I need to have this feature on a spinner too. Is it possible ?

In a data entry screen activity, there will be combination of EditText as well as few spinners. Having hint text (this nice feature) only on EditText may not give the visual uniformity in the screen.

Is there a chance extending this FloatLabeled Hint text feature on the spinners too ?
 
Last edited:

Roberto P.

Well-Known Member
Licensed User
Longtime User
Hi Erel
You can make available the sources of the library so we can customize the control?
Thanks so much
 

Roberto P.

Well-Known Member
Licensed User
Longtime User
very nice Erel,
thanks you
 

Tronak

Member
Licensed User
Longtime User
Hi all,

I'm trying to add an array:

Private fEdits(10) As FloatLabeledEditText

But when initializing:

fEdits(intOrder).Initialize("fEditText")

it says Boo:

java.lang.RuntimeException: Object should first be initialized (FloatLabeledEditText).

I'm scared.

Some help, please?
 

shashkiranr

Active Member
Licensed User
Longtime User
Hi All,

I want to change the color of the Edittext hint when it is in focus from white to red but the hint color has to remain white when not focused. any idea how I can achieve this?

Best,
SK
 

shashkiranr

Active Member
Licensed User
Longtime User
Hi Fred,

Thank you for your reply. I have considered even the masked edit text but my client wants the floating label edit text.

Best,
SK
 

shashkiranr

Active Member
Licensed User
Longtime User
Hi All,

For a new project of mine, If i set the text color, the text disappears and if I set the hint color, the hint text disappears, I do not know what is wrong. I am using B4A 6.0 beta. I have attached the project. Kindly let me know.

Best,
SK

Edit: I found the stupid mistake, didn't initialize the code module variables. This is what happens when you don't sleep .. ! :(
 

Attachments

  • appex.zip
    13.1 KB · Views: 451
Last edited:

Leni Berry

Active Member
Licensed User
Longtime User
CustomView on my B4A designer menu disabled...
I 'm using B4A v6.
How to get CustomView menu Enable?
 

shashkiranr

Active Member
Licensed User
Longtime User
Hi All,

Anyone know how to set the typeface for the Hint. Edittext hint is working alright but the Floatlabel hint is not set.

Best,
SK
 
Top