From the course: Android Development Essential Training: The User Interface with Kotlin

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Manage data entry with TextInputLayout

Manage data entry with TextInputLayout - Android Tutorial

From the course: Android Development Essential Training: The User Interface with Kotlin

Start my 1-month free trial

Manage data entry with TextInputLayout

- [Instructor] The EditText component does a fine job of collecting data from the user, but it has one user interface flaw. When you set a hint in the EditText component, it's displayed as long as the text is empty. But as soon as the user types something in, the hint goes away and the user experience sometimes involves having to back out the text so they can see the hint again. You can solve this with a component called TextInputLayout. It's a Material Design component, not a part of the core Android SDK, so it's backward compatible to older versions of Android and it's provided by an external library. To use it in this form, I'll go to Design Mode, and then I'll go to the Text category and down at the bottom, here's the TextInputLayout. I'll drag and drop it into my form. Then I'll go to Text Mode and look at the generated code. You can always tell when a component is a part of an external library when you drag it in in Design Mode because the generated code will include the…

Contents