<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_weight="1"
        android:gravity="center"
        android:orientation="vertical">

        <ImageView
            android:id="@+id/photo"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:src="@drawable/objective"
            android:background="@android:color/white"
         />

        <!--  android:layout_gravity="center_horizontal" -->

    </LinearLayout>

    <View
        android:layout_height="5dip"
        android:background="#CCCCCC"
        android:layout_width="match_parent" />

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_weight="1"
        android:gravity="center"
        android:orientation="vertical"
        android:weightSum="1">

        <SurfaceView
            android:id="@+id/surfaceview"
            android:layout_width="fill_parent"
            android:layout_height="match_parent" />
    </LinearLayout>

    <RelativeLayout
        android:layout_gravity="center_vertical|center_horizontal"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        >

        <Button
            android:id="@+id/startcamerapreview"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Start Preview" />

        <Button
            android:id="@+id/stopcamerapreview"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="15dp"

            android:layout_toRightOf="@+id/startcamerapreview"
            android:text="Stop Preview" />

        <Button
            android:id="@+id/capture_photo"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="15dp"

            android:layout_toRightOf="@+id/stopcamerapreview"
            android:text="Photo" />
    </RelativeLayout>


</LinearLayout>