title: Android get Image of Main Relativelayout from xml layout?
body: <p>I have xml file and that create view and i pass that screen shot in next activity.and also there are image with  main layout.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical" android:layout_width="match_parent" android:id="@+id/mainLayout"
      android:layout_height="match_parent"&gt;
  
      &lt;ImageView android:layout_height="wrap_content" android:id="@+id/imageSelected"
          android:src="@drawable/icon" android:layout_width="wrap_content"
          android:layout_centerVertical="true" android:layout_alignParentLeft="true"
          android:layout_marginLeft="79dp"&gt;&lt;/ImageView&gt;
  
      &lt;RelativeLayout android:layout_width="fill_parent"
          android:id="@+id/relativelayoutfinal" android:layout_height="fill_parent"&gt;
      &lt;/RelativeLayout&gt;
  
      &lt;RelativeLayout android:id="@+id/RelativeLayoutbutton"
          android:layout_width="wrap_content" android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"&gt;
          &lt;include layout="@layout/bottombutton" /&gt;
      &lt;/RelativeLayout&gt;
  
      &lt;Button android:layout_width="wrap_content" android:background="@drawable/b_brightness_contrast"
          android:id="@+id/btnbrightcont" android:layout_height="wrap_content"
          android:layout_marginBottom="40dip" android:layout_alignParentBottom="true"
          android:layout_alignParentRight="true" android:layout_marginRight="103dp"&gt;&lt;/Button&gt;
      &lt;Button android:background="@drawable/b_adjust_and_scale"
          android:layout_width="wrap_content" android:id="@+id/btnadjustscale"
          android:layout_above="@+id/btnbrightcont" android:layout_alignLeft="@+id/btnbrightcont"
          android:layout_height="wrap_content"&gt;&lt;/Button&gt;
  
      &lt;SeekBar android:layout_height="wrap_content" android:progress="50"
          android:layout_marginTop="50dip" android:layout_marginRight="30dip"
          android:layout_width="160dip" android:id="@+id/sbbrightness"
          android:visibility="gone" android:layout_alignParentTop="true"
          android:layout_alignParentRight="true"&gt;&lt;/SeekBar&gt;
      &lt;SeekBar android:layout_height="wrap_content" android:progress="50"
          android:visibility="gone" android:layout_width="160dip" android:id="@+id/sbcontrast"
          android:layout_below="@+id/sbbrightness" android:layout_alignLeft="@+id/sbbrightness"&gt;&lt;/SeekBar&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>and just send image as drawable or bitmap to next activity...Its Possible?? </p>