Kamal Kamal - 1 year ago 87
Android Question

How to use TextInputLayout in new android design library

Recently google introduced new Android Design Library in that how to use

field to enable the Floating Hint feature of EditText.

Not much guidance is available here.

This page says

you can now wrap it in a TextInputLayout

But No idea because smart prediction (Ctrl+SPACE) doesn't predicts any attributes to the TextInputLayout. So my questions are:

How do we get hold of the EditText underlying this component?

How can we get data from EditText?

Answer Source

TextInputLayout extends ViewGroup class. So which means that you have to wrap your EditText in a TextInputLayout.


        android:id="@+id/editText1" />

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download