How to make an EditText Style Material Design?

0

Can anyone give me an idea of how I can do this plain text:

    
asked by anonymous 17.10.2016 / 18:33

1 answer

1

This EditText (not plain text) is part of the design material Widgets present in the 21+ APIs

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 the build.gradle file of your APP :

Add this line in dependencies ( dependencies ):

 compile 'com.android.support:design:24.2.1'
    
17.10.2016 / 18:55