I would like to call getResouces in some classes, however, these classes are not extended to Activity. How to do it in a right way?
Advertisement
Answer
You can pass in a pointer to your activity from which you should call getApplicationContext(). In certain cases you would want to use the regular getContext().