title: How to set image on centre in FrameLayout
body: <p>I'm doing a project in which I want to set an image in the center.I'm using TableLayout and I want set this image in FrameLayout. If u have any idea so please suggest me. Its very urgent. Thanx to all. Here is my code:</p>
  
  <pre><code>&lt;TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="wrap_content"
  android:layout_height="match_parent"
  android:shrinkColumns="*"
  android:stretchColumns="*" &gt;
  
         &lt;FrameLayout
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
           android:layout_weight="1"
            android:layout_gravity="center"
            android:scaleType="center"
           &gt;
  
          &lt;com.nexbits.digitechi.DrawCanvas
          android:id="@+id/SurfaceView"
  
          android:layout_width="wrap_content"
  
          android:layout_height="wrap_content"
  
           /&gt;
  
  
       &lt;/FrameLayout&gt;
  
       &lt;TableRow
  
       android:layout_height="wrap_content"
       android:layout_width="fill_parent"
       android:gravity="center_horizontal"&gt;
  
  
      &lt;ImageButton
          android:id="@+id/imageButton5"
  
          android:layout_weight="1"
          android:padding="20dip"
          android:layout_gravity="center_horizontal"
          android:onClick="video"
          android:src="@drawable/ic_webcamera" /&gt;
  
      &lt;ImageButton
           android:id="@+id/imageButton3"
           android:layout_weight="1"
           android:layout_gravity="center_horizontal"
  
           android:padding="20dip"
           android:src="@drawable/ic_twitter64" /&gt;
  
      &lt;ImageButton
          android:id="@+id/imageButton2"
  
           android:layout_weight="1"
           android:padding="20dip"
           android:layout_gravity="center_horizontal"
  
           android:src="@drawable/ic_brightness64" /&gt;
  
        &lt;ImageButton
            android:id="@+id/imageButton4"
            android:layout_weight="1"
            android:padding="20dip"
            android:layout_gravity="center_horizontal"
            android:src="@drawable/microscope" /&gt;
           &lt;/TableRow&gt;
           &lt;/TableLayout&gt;
  </code></pre>