replace getResources() with context.getResources()