This week's giveaway is in the Spring forum.
We're giving away four 3 month subscriptions to Marco Behler Videos and have Marco Behler on-line!
See this thread for details.
Win a 3 month subscription to Marco Behler Videos this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Calling image for button  RSS feed

 
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: 1530
210
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!