get a drawable resource


// name = "cj" or other text based on card suit and rank

Field f = R.drawable.class.getDeclaredField(name);

int id = f.getInt(nul);

cardImage.setImageResource(id);


from http://blog.bumblemachine.com/archives/15

Comments

Popular posts from this blog

How to get started with Vue in under a minute?

aigiri nandini - Brodha V you rock