florent37 / MaterialTextField

A different beautiful Floating Edit Text
Apache License 2.0
1.49k stars 240 forks source link

issue with @drawable/ic_mail_grey600_24dp #25

Open wasim-abuzaher opened 7 years ago

wasim-abuzaher commented 7 years ago

So I got this issue when I tried to run the app after configuring the text field: screen shot 2017-03-22 at 10 27 56 am

I am sure it has something to do with this:

Don't forget to precise a drawable to mtf_image

app:mtf_image="@drawable/ic_mail_grey600_24dp"

Any guidance on how to precise the drawable right?

abraar14 commented 5 years ago

I'll tell you what I did to add a custom drawable instead of the default mail one. Firstly, I created a vector asset and added it to my drawable. Later on, I called that drawable when I was creating the text field. I've added some code below for context.

<com.github.florent37.materialtextfield.MaterialTextField
        android:layout_width="300dp"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:layout_marginBottom="335dp"
        app:mtf_cardCollapsedHeight="4dp"
        app:mtf_image="@drawable/ic_person_pin"
        app:mtf_labelColor="@color/color_tab_2">