<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <!-- Deliberately empty so that we can add camera preview to it dynamically--> <LinearLayout android:layout_width="match_parent" android:orientation="vertical" android:layout_weight=".5" android:layout_height="0dp" android:id="@+id/llCamera"> </LinearLayout> <RelativeLayout android:padding="4dp" android:layout_width="match_parent" android:orientation="vertical" android:layout_weight=".5" android:layout_height="0dp"> <include layout="@layout/verifier_buttons"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="17sp" android:layout_below="@+id/llPassFail" android:id="@+id/tvObjective"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/tvObjective" android:id="@+id/tvRings"/> </RelativeLayout> </LinearLayout> <ImageButton android:id="@+id/fabPlaceWaypoint" android:layout_width="70dp" android:layout_height="70dp" android:layout_alignParentBottom="true" android:layout_alignParentRight="true" android:layout_margin="16dp" android:background="@drawable/round_button" android:src="@drawable/ic_place_white_24dp"/> </RelativeLayout>