title: Show Crop Tool on Imageview Android
body: <p>I want to show the cropper tool on an imageview to allow me to crop the image and set the cropped image as the new src of the imageview. </p>
  
  <p>Let me explain properly, the image src is gotten from a file path or a gallery uri. No lifecycle method is used here. Suppose I have an imageview in xml like this:</p>
  
  <pre><code>&lt;ImageView
       android:id="@+id/imgView"
       android:layout_width="40dp"
       android:layout_height="40dp"
       android:src="filePath or gallery URI" /&gt;
  </code></pre>
  
  <p>and in activity, I get the image file path and set the src to the image like this:</p>
  
  <pre><code>        imageFilePath = bundle.getString("image_challenge_camera");
          Bitmap bitmap = BitmapFactory.decodeFile(imageFilePath);
          cropImgView.setImageBitmap(bitmap);
  </code></pre>
  
  <p>and also the uri in same way. How do I crop the existing image on the imageview. If so, how do I get the crop output image or data?</p>