private void showPhoto() {
    // (Re)set the image button's image based on our photo
    Photo p = mCrime.getPhoto();
    BitmapDrawable b = null;

    Log.d(TAG, "Inside showPhoto");

    if (p != null) {
      String path = getActivity().getFileStreamPath(p.getFilename()).getAbsolutePath();
      b = PictureUtils.getScaledDrawable(getActivity(), path);
    }
    mPhotoView.setImageDrawable(b);
  }
Ejemplo n.º 2
0
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    // return super.onCreateView(inflater, container, savedInstanceState);

    mImageView = new ImageView(getActivity());
    String path = (String) getArguments().getSerializable(EXTRA_IMAGE_PATH);

    BitmapDrawable bitmapDrawable = PictureUtils.getScaledDrawable(getActivity(), path);
    mImageView.setImageDrawable(bitmapDrawable);

    return mImageView;
  }