MaterialEditText icon indicating copy to clipboard operation
MaterialEditText copied to clipboard

Can't set background color

Open tunjos opened this issue 9 years ago • 3 comments

com.rengwuxian.materialedittext.MaterialEditText android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="#C0FFEE" android:hint="Basic"/>

tunjos avatar Apr 06 '15 23:04 tunjos

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.

rengwuxian avatar Apr 26 '15 16:04 rengwuxian

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 avatar May 26 '15 06:05 ariefbayu

ariefbayu awesome

ratanakpek avatar Dec 01 '17 10:12 ratanakpek