Removing references to getResources() from callbacks