code: public static Animator loadAnimator(Context context, int id)
              throws NotFoundException {
  
          XmlResourceParser parser = null;
          try {
              parser = context.getResources().getAnimation(id);
              return createAnimatorFromXml(context, parser);
          } catch (XmlPullParserException ex) {
              Resources.NotFoundException rnf =
                      new Resources.NotFoundException("Can't load animation resource ID #0x" +
                      Integer.toHexString(id));
              rnf.initCause(ex);
              throw rnf;
          } catch (IOException ex) {
              Resources.NotFoundException rnf =
                      new Resources.NotFoundException("Can't load animation resource ID #0x" +
                      Integer.toHexString(id));
              rnf.initCause(ex);
              throw rnf;
          } finally {
              if (parser != null) parser.close();
          }
      }
docs: Loads an {@link Animator} object from a resource
  
  @param context Application context used to access resources
  @param id The resource id of the animation to load
  @return The animator object reference by the specified id
  @throws android.content.res.Resources.NotFoundException when the animation cannot be loaded