public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { mImageView = new ImageView(Activity); string path = Arguments.GetString(EXTRA_IMAGE_PATH); float rotation = Arguments.GetFloat(EXTRA_IMAGE_ROTATION); BitmapDrawable image = PictureUtils.GetScaledDrawable(Activity, path); mImageView.SetImageDrawable(image); mImageView.Rotation = rotation; return(mImageView); }
private void ShowPhoto() { // (Re)set the image button's image based on our photo Photo p = mCrime.Photo; BitmapDrawable b = null; if (p != null) { //string path = Activity.GetFileStreamPath(p.Filename).AbsolutePath; b = PictureUtils.GetScaledDrawable(Activity, mCrime.Photo.Filename); // Set orientation for display mPhotoView.SetImageDrawable(b); mPhotoView.Rotation = mCrime.Photo.GetRotation(); // System.Diagnostics.Debug.WriteLine(String.Format("Photo path: {0}", mCrime.Photo.Filename), TAG); } if (b != null) { b.Dispose(); } GC.Collect(); }