How to make an Edittext Material Design style?

Asked

Viewed 287 times

0

Could someone give me an idea of how I can do this Plain text:

1 answer

1

This Edittext (No Plain text) is part of the Widgets of the material design present in API 21+

You can use them in older Apis by adding the Support library as a dependency.

Layout.xml

<android.support.design.widget.TextInputLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:id="@+id/inputGroup"
                >
                <android.support.design.widget.TextInputEditText
                    android:id="@+id/inputXpto"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:inputType="text"
                    android:hint="@string/procurando_por_algo"
                    />
</android.support.design.widget.TextInputLayout>

In your build.Radle file APP:

Add this line to dependencies (dependencies):

 compile 'com.android.support:design:24.2.1'

Browser other questions tagged

You are not signed in. Login or sign up in order to post.