• Post Reply Bookmark Topic Watch Topic
  • New Topic

Calling image for button  RSS feed

 
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:


 
Saloon Keeper
Posts: 1737
236
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.
 
It is an experimental device that will make my mind that most powerful force on earth! More powerful than this tiny ad!
Thread Boost - a very different sort of advertising
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!