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