code: public static int getDrawableIdentifier(String name) {
          Resources res = Resources.getSystem();
          return res.getIdentifier(name, TYPE_DRAWABLE, NATIVE_PACKAGE);
      }
docs: Get a native drawable id by name as in 'R.drawable.name'.