Android Sample Material Design Floating Labels for EditText with Library.

Android floating labels were presented in android design support library to display a floating label over EditText.It is latest and most of the designers are using this design to implement on EditText. Initially it acts as hint in EditText when the field is empty. When user start inputting the text, it starts animating by moving to floating label position.

This article exhibits the use of floating labels.


In android design support library another component called TextInputLayout was presented with show the floating label on EditText. The EditText must be wrapped by TextInputLayout keeping in mind the end goal to show the floating label. You can likewise set a blunder(error) message to EditText by utilizing setErrorEnabled() and setError() method.


To add design support library dependency:-

working properly we have to add some library for TextInputLayout.

  1. In Android Studio, go to File ⇒ New Project and fill all the details required to create a new project.
  2. Open build.gradle and add design support library dependency. which is

    In next article i ‘ll discuss login/registration from with TextInputLayout design.


Leave a Reply

Be the First to Comment!

Notify of