@Override
  public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    final Uri imageUri = sampleUris().createSampleUri(ImageUriProvider.ImageSize.M);

    // In Android N, visibility handling for ImageView was changed to use onVisibilityAggregated,
    // which doesn't update the visibility of the starting Vito view correctly when the activity
    // transition is reversed.
    // Hence, we have to (globally) disable Visibility APIs for now.
    VitoViewImpl2.useVisibilityCallbacks = Suppliers.BOOLEAN_FALSE;

    final ImageView imageView = view.findViewById(R.id.image_view);
    final ImageOptions imageOptions =
        ImageOptions.create()
            .scale(ScalingUtils.ScaleType.FOCUS_CROP)
            .focusPoint(FOCUS_POINT)
            .build();
    imageView.setImageURI(imageUri);
    VitoView.show(imageUri, imageOptions, CALLER_CONTEXT, imageView);
    imageView.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            startTransition(v, imageUri);
          }
        });
  }
Simple drawee fragment that just displays an image.
samples/showcase/src/main/java/com/facebook/fresco/samples/showcase/vito/transition/VitoTransitionFragment.java