@Override
          public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
            final Entry spinnerEntry = entries[spinner.getSelectedItemPosition()];
            setImageUri(spinnerEntry.uri);
          }
This fragment displays different XML images.
samples/showcase/src/main/java/com/facebook/fresco/samples/showcase/imageformat/xml/ImageFormatXmlFragment.java