@SuppressWarnings("ResourceType")
  private void initColors() {
    final TypedArray attrs =
        getActivity()
            .getTheme()
            .obtainStyledAttributes(
                R.style.AppTheme,
                new int[] {
                  androidx.appcompat.R.attr.colorPrimary, android.R.attr.windowBackground
                });
    try {
      mColorPrimary = attrs.getColor(0, Color.BLACK);
    } finally {
      attrs.recycle();
    }
  }
A {@link Fragment} that illustrates using rounded corners with Fresco.
samples/showcase/src/main/java/com/facebook/fresco/samples/showcase/vito/VitoRoundedCornersFragment.java