Camera (XML code)

Place the following code in: res/layout/activity_main.xml

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

  <TextView
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:textSize="22sp"
    android:textStyle="bold"
    android:textColor="#FFFFFF"
    android:gravity="center_horizontal"
    android:layout_marginTop="15sp"
    android:text="Camera Application" />

  <ImageView
    android:layout_width="300dp"
    android:layout_height="150dp"
    android:contentDescription="Picture from Camera"
    android:layout_gravity="center_horizontal"
    android:layout_marginTop="15sp"
    android:id="@+id/ImageView01" />

  <Button
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:id="@+id/takePicture"
    android:layout_gravity="center"
    android:text="Take Picture"
    android:textSize="22sp"
    android:background="@android:drawable/btn_default"
    android:layout_marginTop="15dp"
    android:textColor="#000000" />
    
</LinearLayout>