`getResources().getValue()` will make your code much simpler and cleaner