You can reference the activity context with MyActivity.this to create:
Drawable newMarker = MyActivity.this.getResources().getDrawable(R.drawable.generic2r);
For now, make sure that you only need your handler from this particular action.
Marmoy
source share