• Post Reply Bookmark Topic Watch Topic
  • New Topic

Calling image for button

 
Ryan Lemon
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an image in src/images/ and I try to call it a couple different ways, but to no avail. In this first code, CreateListGroup can't be resolved:



I've also tried bitmap, but I keep getting an error saying CreateLGImage can't be resolved:


 
Ron McLeod
Saloon Keeper
Posts: 1263
131
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If what you want to do is use an image as a button, you can use an ImageButton widget. The image file should be placed in res/drawable.

For example:

 
Ryan Lemon
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ron! That worked great.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!