<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_toLeftOf="@+id/add_quick_command_image"
            android:orientation="horizontal" >

            <Button
                android:id="@+id/main_button"
                style="?android:attr/buttonStyleSmall"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="Main" />

            <Button
                android:id="@+id/mod_button"
                style="?android:attr/buttonStyleSmall"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="Mod" />
        </LinearLayout>

        <ImageView
            android:id="@+id/add_quick_command_image"
            android:layout_width="30dp"
            android:layout_height="30dp"
            android:layout_alignParentRight="true"
            android:src="@drawable/add" />
    </RelativeLayout>

    <LinearLayout
        android:id="@+id/edit_qc_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/layout_sel_background"
        android:orientation="vertical"
        android:visibility="gone" >

        <TableLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content" >

            <TableRow
                android:layout_width="match_parent"
                android:layout_height="wrap_content" >

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Name"
                    android:textAppearance="?android:attr/textAppearanceLarge" />

                <EditText
                    android:id="@+id/name_edittext"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:singleLine="true" >
                </EditText>
            </TableRow>

            <TableRow
                android:layout_width="match_parent"
                android:layout_height="wrap_content" >

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Command"
                    android:textAppearance="?android:attr/textAppearanceLarge" />

                <EditText
                    android:id="@+id/command_edittext"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:singleLine="true" >
                </EditText>
            </TableRow>

            <TableRow
                android:layout_width="match_parent"
                android:layout_height="wrap_content" >

                <Button
                    android:id="@+id/cancel_button"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:text="Cancel" />

                <Button
                    android:id="@+id/save_button"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:text="Save" />
            </TableRow>
        </TableLayout>
    </LinearLayout>

    <com.mobeta.android.dslv.DragSortListView
        xmlns:dslv="http://schemas.android.com/apk/res-auto"
        android:id="@+id/list"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:dividerHeight="5dp"
        dslv:collapsed_height="2dp"
        dslv:drag_enabled="true"
        dslv:drag_handle_id="@+id/quick_command_drag_image"
        dslv:drag_scroll_start="0.33"
        dslv:float_alpha="0.6"
        dslv:max_drag_scroll_speed="0.5"
        dslv:slide_shuffle_speed="0.3"
        dslv:sort_enabled="true"
        dslv:track_drag_sort="false"
        dslv:use_default_controller="true" />

</LinearLayout>