title: Capturing image along with the frame
body: <p>I am working with the custom camera, i have done basic functionality of taking picture and saving it in sd card. 
  I want camera to come in the black space in the image below.
  This has been done using surface view. 
  But when Image is clicked,the frame doesn't come in the image clicked.</p>
  
  <p>Can anybody suggest how to click image with the frame as in image below.
  <img src="https://i.stack.imgur.com/hfoIY.jpg" alt="enter image description here"></p>
  
  <p>Here is my layout for preview screen for camera.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/layout"
      android:layout_width="match_parent"
      android:layout_height="match_parent" &gt;
  
     &lt;SurfaceView
      android:id="@+id/surfaceView"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="@drawable/frame" /&gt;
  
  
  
      &lt;Button
          android:id="@+id/btn_click"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentRight="true"
          android:layout_centerInParent="true"
          android:text="@string/take_photo" /&gt;
  
      &lt;ImageView
          android:id="@+id/imageView"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:visibility="gone" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>