@Override
    public View getView(int position, View convertView, ViewGroup parent) {
      final LayoutInflater layoutInflater = getLayoutInflater(null);
      final View view =
          convertView != null
              ? convertView
              : layoutInflater.inflate(
                  android.R.layout.simple_spinner_dropdown_item, parent, false);
      final TextView textView = (TextView) view.findViewById(android.R.id.text1);
      textView.setText(mEntries[position].label);
      return view;
    }
This fragment displays different XML images.
samples/showcase/src/main/java/com/facebook/fresco/samples/showcase/imageformat/xml/ImageFormatXmlFragment.java