MaterialEditText
MaterialEditText copied to clipboard
Can't set background color
com.rengwuxian.materialedittext.MaterialEditText android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="#C0FFEE" android:hint="Basic"/>
Hi @tunjos ,
MateiralEditText
doesn't support attribute android:background
. You can use met_underlineColor
if you're going to customize the color of the underline.
What I did to have background was, by wrapping it with LinearLayout:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/text_rectangle"
android:padding="4dp"
android:layout_margin="8dp">
<com.rengwuxian.materialedittext.MaterialEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Nama"
app:met_floatingLabel="highlight"
app:met_floatingLabelText="Nama"
android:id="@+id/txtName" />
</LinearLayout>
ariefbayu awesome