/*
 * This file provided by Facebook is for non-commercial testing and evaluation
 * purposes only.  Facebook reserves all rights not expressly granted.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
package com.facebook.fresco.samples.showcase.drawee;

import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.facebook.drawee.view.SimpleDraweeView;
import com.facebook.fresco.samples.showcase.BaseShowcaseFragment;
import com.facebook.fresco.samples.showcase.R;

/**
 * Simple drawee fragment that just displays an image.
 */
public class DraweeSimpleFragment extends BaseShowcaseFragment {

  private static final Uri URI =
      Uri.parse("http://frescolib.org/static/sample-images/animal_d.png");

  @Nullable
  @Override
  public View onCreateView(
      LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    return inflater.inflate(R.layout.fragment_drawee_simple, container, false);
  }

  @Override
  public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    SimpleDraweeView simpleDraweeView = (SimpleDraweeView) view.findViewById(R.id.drawee_view);
    simpleDraweeView.setImageURI(URI);
  }

  @Override
  public int getTitleId() {
    return R.string.drawee_simple_title;
  }
}

@@ -1052,16 +1052,83 @@
 wcase.R;
+%0Aimport com.facebook.fresco.samples.showcase.misc.ImageUriProvider;
 %0A%0A/**%0A *
@@ -1254,117 +1254,8 @@
  %7B%0A%0A
-  private static final Uri URI =%0A      Uri.parse(%22http://frescolib.org/static/sample-images/animal_d.png%22);%0A%0A
   @N
@@ -1574,24 +1574,199 @@
 nceState) %7B%0A
+    final ImageUriProvider imageUriProvider = ImageUriProvider.getInstance(getContext());%0A    final Uri uri = imageUriProvider.createSampleUri(ImageUriProvider.ImageSize.M);%0A%0A
     SimpleDr
@@ -1882,19 +1882,19 @@
 mageURI(
-URI
+uri
 );%0A  %7D%0A%0A

Update DraweeSimpleFragment