I know this question is general but I am always face to face this problem.
My question is I can reach getResource() or getContext() in Activity but when I want to use a class without activity
example:
public class MapOverlay extends ItemizedOverlay
I can not reach getResources() or Context.
How can I do that anybody know any trick?
ItemizedOverlay in not extending
android.content.Context.You can create the construcor like
and then use the
mContextfield to callgetResource()orgetContext()methods.