Drawable d = getResources().getDrawable(R.drawable.icon);
The getResources() method available depending upon context. If you need to reference it from within your own class then you'll need to pass a context in.
Android basics, tutorials, app reviews, news and more
Drawable d = getResources().getDrawable(R.drawable.icon);
0 comments:
Post a Comment