title: how to take pic on same activity of registration form
body: <p>I am trying to make an android application in which i make a information filling form in which user fill the in formation.and also i gave a camera button for capture photo and save it.</p>
  
  <p>I want when user click camera button camera open and take picture and save it.</p>
  
  <p>I do not open another activity on  camera button click.and also i do not want another xml layout file for camera.means i want when i press camera button camera open in same layout and save pic.</p>
  
  <p>How can i do this.</p>
  
  <p>Here is my Code :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:background="@drawable/bl"
  android:orientation="vertical"
  android:weightSum="1.0" &gt;
  
  &lt;ScrollView
      android:layout_width="fill_parent"
      android:layout_height="wrap_content" &gt;
  
      &lt;LinearLayout
          android:layout_width="fill_parent"
          android:layout_height="wrap_content "
          android:orientation="vertical" &gt;
  
          &lt;LinearLayout
              android:layout_width="fill_parent"
              android:layout_height="0dp"
              android:layout_weight=".05"
              android:orientation="vertical"
              android:weightSum="1.0" &gt;
  
              &lt;TextView
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="center_horizontal" /&gt;
          &lt;/LinearLayout&gt;
  
          &lt;LinearLayout
              android:layout_width="fill_parent"
              android:layout_height="45dp"
              android:layout_marginTop="8dp"
              android:layout_weight=".02"
              android:background="@drawable/keypad_select"
              android:orientation="horizontal"
              android:weightSum="1.0" &gt;
  
              &lt;TextView
                  android:layout_width="0dp"
                  android:layout_height="wrap_content"
                  android:layout_marginLeft="10dp"
                  android:layout_weight=".50"
                  android:text="FAULT TYPE:-"
                  android:textColor="@color/orange"
                  android:textSize="25sp" /&gt;
  
              &lt;Spinner
                  android:id="@+id/spinner1"
                  android:layout_width="0dp"
                  android:layout_height="49dp"
                  android:layout_weight="0.50" /&gt;
          &lt;/LinearLayout&gt;
  
          &lt;LinearLayout
              android:layout_width="fill_parent"
              android:layout_height="45dp"
              android:layout_marginTop="8dp"
              android:layout_weight=".05"
              android:background="@drawable/keypad_select"
              android:orientation="horizontal"
              android:weightSum="1.0" &gt;
  
              &lt;TextView
                  android:id="@+id/Button01"
                  android:layout_width="0dp"
                  android:layout_height="wrap_content"
                  android:layout_weight=".50"
                  android:text="" /&gt;
  
              &lt;Button
                  android:id="@+id/save_button"
                  android:layout_width="0dp"
                  android:layout_height="wrap_content"
                  android:layout_gravity="center_horizontal"
                  android:layout_weight="0.19"
                  android:background="@drawable/btn_white_glossy"
                  android:text="SAVE.." /&gt;
          &lt;/LinearLayout&gt;
      &lt;/LinearLayout&gt;
  &lt;/ScrollView&gt;
  </code></pre>
  
  <p></p>