<?xml version="1.0" encoding="utf-8"?>

<!-- Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@drawable/list_background">

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical">

        <TextView
            android:id="@+id/tv_title_bar"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/title_bar_bg"
            android:visibility="gone"
            android:gravity="center_vertical"
            android:singleLine="true"
            android:textColor="#FFEAD1AE"
            android:textSize="@dimen/text_font_size_medium" />
        <!-- 顶部工具栏 -->
        <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:padding="10dip"
            android:gravity="center_vertical|end">

            <!-- 菜单按钮 -->
            <ImageButton
                android:id="@+id/btn_menu"
                android:layout_width="50dip"
                android:layout_height="50dip"
                android:src="@android:drawable/ic_menu_more"
                android:background="@null"
                android:onClick="showCustomMenu" />
            <!-- 搜索图标按钮 -->
            <ImageButton
                android:id="@+id/btn_search"
                android:layout_width="50dp"
                android:layout_height="50dip"
                android:layout_marginRight="10dip"
                android:src="@android:drawable/ic_menu_search"
                android:background="@null"
                android:onClick="handleSearchClick" />

            <!-- 正方形添加按钮 -->
            <Button
                android:id="@+id/btn_new_note"
                android:background="@drawable/new_note"
                android:layout_width="50dip"
                android:layout_height="50dip"
                android:focusable="false" />
        </LinearLayout>

        <ListView
            android:id="@+id/notes_list"
            android:layout_width="fill_parent"
            android:layout_height="0dip"
            android:layout_weight="1"
            android:cacheColorHint="@null"
            android:listSelector="@android:color/transparent"
            android:divider="@null"
            android:fadingEdge="@null" />

        <!-- 底部模式切换栏 -->
        <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="60dip"
            android:orientation="horizontal"
            android:weightSum="2"
            android:background="#FF007AFF">

            <!-- 笔记模式按钮 -->
            <Button
                android:id="@+id/btn_note_mode"
                android:layout_width="0dip"
                android:layout_height="fill_parent"
                android:layout_weight="1"
                android:text="笔记"
                android:textColor="#FFFFFFFF"
                android:background="#FF007AFF"
                android:onClick="switchToNoteMode"
                android:textSize="@dimen/text_font_size_medium"
                android:gravity="center"
                android:padding="0dip"
                android:layout_margin="0dip"
                android:minHeight="0dip"
                android:minWidth="0dip" />

            <!-- 清单模式按钮 -->
            <Button
                android:id="@+id/btn_checklist_mode"
                android:layout_width="0dip"
                android:layout_height="fill_parent"
                android:layout_weight="1"
                android:text="清单"
                android:textColor="#FF000000"
                android:background="#FFFFFFFF"
                android:onClick="switchToChecklistMode"
                android:textSize="@dimen/text_font_size_medium"
                android:gravity="center"
                android:padding="0dip"
                android:layout_margin="0dip"
                android:minHeight="0dip"
                android:minWidth="0dip" />
        </LinearLayout>
    </LinearLayout>


</FrameLayout>
