private Uri fromResourceId(@DrawableRes int resourceId) {
    return UriUtil.getUriForResourceId(resourceId);
  }
This fragment displays different XML images.
samples/showcase/src/main/java/com/facebook/fresco/samples/showcase/imageformat/xml/ImageFormatXmlFragment.java