Beautiful EditText with TextInputLayout

Overview

EditText is basic UI component of Android, but basic EditText is very simple and not beautiful. There are a lot of solution to make it beautifully. In this paper, i will introduce a simple solution for this issue. This is using TextInputLayout – a library of Android SDK.

How to implement

    1. Integrating com.android.support:design library
    dependencies {
        compile 'com.android.support:design:23.3.0'
    }
    1. Wrapping EditText by TextInputLayout
<android.support.design.widget.TextInputLayout     android:layout_width="match_parent"     android:layout_height="wrap_content">
        <EditText             android:layout_width="match_parent"             android:layout_height="@dimen/login_phone_number_edit_text_height"/>
</android.support.design.widget.TextInputLayout>

In summary
We will see the result of above solution:

Screen Shot 2016-08-19 at 16.47.49

Screen Shot 2016-08-19 at 16.46.51

Screen Shot 2016-08-19 at 16.50.39

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s