Reputation:
I'm having trouble adding a image to my background, I saw a similar question earlier and none the answers helped me. Ive tried everything "@drawables/myimagename", "myimagename.png", and "myimagename" none of these things seem to work. I even tried to put in the path of the picture, and still nothing.
Upvotes: 0
Views: 5474
Reputation: 11
try this instead.
go to values -> colour.xml and delete
color name="background">color
it worked for me
Upvotes: 1
Reputation: 101
you must want that folder name drawable and you also call it like
android:background="@drawable/myimagename"
and the name myimagename
must be typed like in the file name in the folder
Upvotes: 1
Reputation:
You need to use this
@drawable/myimagename
instead of
@drawables/myimagename
Make sure you have the image named myimagename in the drawable folder of your application
Upvotes: 0
Reputation: 132992
Ive tried everything "@drawables/myimagename"
To set image from drawable,drawable-mdpi,drawable-hdpi,...
folder's use @drawable/[image_name]
instead of @drawables
:
android:background="@drawable/myimagename"
Upvotes: 1
Reputation: 12388
You cannot use @drawables/
, use @drawable/
android:background="@drawable/myimagename"
Upvotes: 0