SyntaxFix
Write A Post
Hire A Developer
Questions
If you are inheriting from a fragment you can do:
Drawable drawable = getActivity().getDrawable(R.drawable.icon)