Skip to content
Advertisement

How do I pass a R.drawable as a parameter so I can get images parsed

I try to save a unique image to each object but I get this error, how should the constructor look for it to work that way? The constructor Beer(String, int, int) is undefined

JavaScript

Advertisement

Answer

JavaScript

and like said before:

JavaScript

Or you can send the int as parameter:

JavaScript

and:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement