tomtom
tomtom

Reputation: 614

Android doesnt recognize image with text in button?

I have tried to add a small icon to android text button .I am getting below errors, even though i have manually added one phone.png image in drawable folder.

But some how when i add "drawable/ic_launcher_search" it does shows a small search icon ,even though i couldnt find in my drawable folder with such name. may be i am missing something how to add and may be it support some other file format in other folders. Any help would be highly appreciated.

 <Button
        android:layout_marginTop="300dp"
        android:layout_gravity="right"
        android:textColor="@drawable/pressedcolor"
        android:id="@+id/calculate_button"
        android:drawableLeft="@android:drawable/ic_launcher_search"
        android:drawablePadding="20dp"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:padding="5dp"
        android:background="@drawable/gradient_normal"
        android:text="aaaaaaCalcula

te">

Upvotes: 0

Views: 31

Answers (1)

Wahdat Jan
Wahdat Jan

Reputation: 4156

Clean the project and Run again

Upvotes: 2

Related Questions