<?xml version="1.0" encoding="utf-8"?>
<!--
/*
 * Copyright (c) 2013, The Linux Foundation. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *        * Redistributions of source code must retain the above copyright
 *            notice, this list of conditions and the following disclaimer.
 *        * Redistributions in binary form must reproduce the above copyright
 *            notice, this list of conditions and the following disclaimer in the
 *            documentation and/or other materials provided with the distribution.
 *        * Neither the name of The Linux Foundation nor
 *            the names of its contributors may be used to endorse or promote
 *            products derived from this software without specific prior written
 *            permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NON-INFRINGEMENT ARE DISCLAIMED.    IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:background="#101010" >

<LinearLayout
    android:id="@+id/maptest_folder_nav"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="#003000"
    style="@style/somePadding" >

    <Button
        android:id="@+id/maptest_nav_root"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="0"
        android:text="@string/map_folder_root"
        android:onClick="onClickSetPathRoot" />

    <Button
        android:id="@+id/maptest_nav_up"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="0"
        android:text="@string/map_folder_up"
        android:onClick="onClickSetPathUp" />

    <TextView
        android:id="@+id/maptest_nav_current"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:layout_marginLeft="20dp"
        android:layout_marginRight="10dp"
        android:gravity="center_vertical|right"
        android:text="@string/blank" />

    <Spinner
        android:id="@+id/maptest_nav_folders"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_weight="1" />

    <Button
        android:id="@+id/maptest_nav_down"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:layout_weight="0"
        android:text="@string/map_folder_enter"
        android:onClick="onClickSetPathEnter" />

    <EditText
        android:layout_marginLeft="40dp"
        android:id="@+id/maptest_nav_list_max"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="0"
        android:ems="2"
        android:inputType="number" />

    <EditText
        android:id="@+id/maptest_nav_list_offset"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="0"
        android:ems="2"
        android:inputType="number" />

    <Button
        android:id="@+id/maptest_nav_list_get"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:layout_weight="0"
        android:text="@string/map_folder_listing"
        android:onClick="onClickGetFolderListing" />

    <Button
        android:id="@+id/maptest_nav_list_size"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:layout_weight="0"
        android:text="@string/map_folder_listing_size"
        android:onClick="onClickGetFolderListingSize" />

</LinearLayout>

<ViewFlipper
    android:id="@+id/maptest_viewflipper"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

<!-- LIST TAB -->
<LinearLayout
    android:id="@+id/maptest_tab_list"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal" >

    <!-- Browsing Layout -->
    <LinearLayout
        android:layout_width="250dp"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:background="#000030" >

        <!-- Horizontal line -->
        <View
            android:layout_width="wrap_content"
            android:layout_height="0dp"
            android:layout_weight="1" />

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

            <Button
                android:id="@+id/maptest_msglist_params"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/map_message_parameters"
                android:onClick="onClickMessageParameters" />

            <Button
                android:id="@+id/maptest_msglist_filter"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/map_message_filter"
                android:onClick="onClickGetMessagesFilter" />

        </LinearLayout>

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

            <!-- MaxListCount -->
            <TableRow>
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/map_max_list_count_prompt" />

                <EditText
                    android:id="@+id/maptest_msglist_max"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:inputType="number" />
            </TableRow>

            <!-- ListStartOffset -->
            <TableRow>
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/map_list_start_offset_prompt" />

                <EditText
                    android:id="@+id/maptest_msglist_offset"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:inputType="number" />
            </TableRow>

            <!-- SubjectLength -->
            <TableRow>
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/map_subject_length_prompt" />

                <EditText
                    android:id="@+id/maptest_msglist_subject_len"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:inputType="number" />
            </TableRow>

        </TableLayout>

        <Button
            android:id="@+id/maptest_msglist_get"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/map_message_listing"
            android:onClick="onClickGetMessagesListing" />

        <Button
            android:id="@+id/maptest_msglist_get_size"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/map_message_listing_size"
            android:onClick="onClickGetMessageListingSize" />

    </LinearLayout>

    <!-- Messages layout -->
    <ListView
        android:id="@+id/maptest_msglist_lv"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:visibility="gone" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:layout_weight="1"
        android:orientation="vertical" >

        <ProgressBar
            android:id="@+id/maptest_msglist_progressbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            style="?android:attr/progressBarStyleLarge"
            android:visibility="gone" />

        <TextView
            android:id="@+id/maptest_msglist_empty"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/map_messages_list_empty"
            android:layout_gravity="center_horizontal|center_vertical"
            android:visibility="gone" />

    </LinearLayout>

</LinearLayout>

<!-- PREVIEW TAB -->
<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:focusableInTouchMode="true"
    android:orientation="vertical" >

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="#000030"
        style="@style/somePadding" >

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:orientation="horizontal" >
            <Button
                android:id="@+id/map_msg_get"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/map_msg_get_lbl"
                android:onClick="onClickGetMessage" />
            <EditText
                android:id="@+id/map_msg_handle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:ems="10" />
            <RadioGroup
                android:id="@+id/map_msg_get_charset"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical"
                android:orientation="horizontal" >
                <RadioButton
                    android:id="@+id/map_msg_get_charset_native"
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:text="@string/charset_native_lbl" />
                <RadioButton
                    android:id="@+id/map_msg_get_charset_utf8"
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:text="@string/charset_utf8_lbl"
                    android:checked="true" />
            </RadioGroup>
            <CheckBox
                android:id="@+id/map_msg_get_attachment"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/map_msg_get_attachment_lbl" />
        </LinearLayout>

        <Button
            android:id="@+id/map_msg_copy_to_editor"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:text="@string/map_msg_copy_to_editor_lbl"
            android:onClick="onClickCopyMessage" />
        <Button
            android:id="@+id/map_msg_delete"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/map_delete_message"
            android:layout_toLeftOf="@id/map_msg_copy_to_editor"
            android:onClick="onClickDeleteMessage" />
        <Button
            android:id="@+id/map_msg_set_status"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/map_set_unread"
            android:layout_toLeftOf="@id/map_msg_delete"
            android:onClick="onClickSetStatus" />
    </RelativeLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        style="@style/somePadding" >

        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1">
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/map_bmsg_status_prompt" />
            <EditText
                android:id="@+id/maptest_bmsg_status"
                android:editable="false"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1">
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/map_bmsg_type_prompt" />
            <EditText
                android:id="@+id/maptest_bmsg_type"
                android:editable="false"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="3">
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/map_bmsg_folder_prompt" />
            <EditText
                android:id="@+id/maptest_bmsg_folder"
                android:editable="false"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />
        </LinearLayout>

    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        style="@style/somePadding" >

        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1">
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/map_bbody_encoding_prompt" />
            <EditText
                android:id="@+id/maptest_bbody_encoding"
                android:editable="false"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1">
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/map_bbody_charset_prompt" />
            <EditText
                android:id="@+id/maptest_bbody_charset"
                android:editable="false"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1">
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/map_bbody_language_prompt" />
            <EditText
                android:id="@+id/maptest_bbody_language"
                android:editable="false"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />
        </LinearLayout>

    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:background="#303030"
        style="@style/somePadding" >

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/map_originators_prompt" />
        <EditText
            android:id="@+id/maptest_orig"
            android:editable="false"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />
    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:background="#303030"
        style="@style/somePadding" >
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/map_recipients_prompt" />
        <EditText
            android:id="@+id/maptest_rcpt"
            android:editable="false"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />
    </LinearLayout>

    <EditText
        android:id="@+id/maptest_message"
        android:editable="false"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:typeface="monospace"
        android:textAppearance="?android:attr/textAppearanceSmall"
        style="@style/somePadding" />

</LinearLayout>


<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:focusableInTouchMode="true"
    android:orientation="vertical" >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:background="#000030"
        style="@style/somePadding" >

        <Button
            android:id="@+id/map_msg_push"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/map_msg_push_lbl"
            android:onClick="onClickPushMessage" />
        <CheckBox
            android:id="@+id/map_msg_push_transparent"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/map_msg_push_transparent_lbl" />
        <CheckBox
            android:id="@+id/map_msg_push_retry"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/map_msg_push_retry_lbl" />
        <RadioGroup
            android:id="@+id/map_msg_push_charset"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:orientation="horizontal" >
            <RadioButton
                android:id="@+id/map_msg_push_charset_native"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:text="@string/charset_native_lbl" />
            <RadioButton
                android:id="@+id/map_msg_push_charset_utf8"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:text="@string/charset_utf8_lbl"
                android:checked="true" />
        </RadioGroup>

    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        style="@style/somePadding" >

        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1">
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/map_bmsg_type_prompt" />
            <Spinner
                android:id="@+id/bmsgedit_type"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:entries="@array/map_message_type_array" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1">
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/map_bbody_encoding_prompt" />
            <Spinner
                android:id="@+id/bmsgedit_encoding"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:entries="@array/map_message_encoding_array" />
        </LinearLayout>

        <Space
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="3" />

    </LinearLayout>

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:background="#303030"
        style="@style/somePadding" >

        <TextView
            android:id="@+id/bmsgedit_orig_add_lbl"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:text="@string/map_originators_prompt" />
        <Button
            android:id="@+id/bmsgedit_orig_del"
            android:text="@string/ppl_del"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:ems="1"
            android:onClick="onClickRemovePeople" />
        <Button
            android:id="@+id/bmsgedit_orig_add"
            android:text="@string/ppl_add"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toLeftOf="@id/bmsgedit_orig_del"
            android:ems="1"
            android:onClick="onClickAddPerson" />
        <EditText
            android:id="@+id/bmsgedit_orig"
            android:editable="false"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_toLeftOf="@id/bmsgedit_orig_add"
            android:layout_toRightOf="@id/bmsgedit_orig_add_lbl" />

    </RelativeLayout>

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:background="#303030"
        style="@style/somePadding" >

        <TextView
            android:id="@+id/bmsgedit_rcpt_add_lbl"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:text="@string/map_recipients_prompt" />
        <Button
            android:id="@+id/bmsgedit_rcpt_del"
            android:text="@string/ppl_del"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:ems="1"
            android:onClick="onClickRemovePeople" />
        <Button
            android:id="@+id/bmsgedit_rcpt_add"
            android:text="@string/ppl_add"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toLeftOf="@id/bmsgedit_rcpt_del"
            android:ems="1"
            android:onClick="onClickAddPerson" />
        <EditText
            android:id="@+id/bmsgedit_rcpt"
            android:editable="false"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_toLeftOf="@id/bmsgedit_rcpt_add"
            android:layout_toRightOf="@id/bmsgedit_rcpt_add_lbl" />

    </RelativeLayout>

    <EditText
        android:id="@+id/bmsgedit_contents"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:typeface="monospace"
        android:textAppearance="?android:attr/textAppearanceSmall"
        style="@style/somePadding" />

</LinearLayout>

</ViewFlipper>

</LinearLayout>
