Commits

Michael Ma committed 91ee56b

重构:UI界面

Comments (0)

Files changed (29)

Project/res/drawable/listview_style.xml

-<?xml version="1.0" encoding="utf-8" ?>
+<?xml version="1.0" encoding="utf-8"?>
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-	<item android:state_window_focused="false" android:drawable="@drawable/listitem" />
-	<item android:state_focused="true" android:state_pressed="true"
-		android:drawable="@drawable/listitem_pushed" />
-	<item android:state_focused="false" android:state_pressed="true"
-		android:drawable="@drawable/listitem_pushed" />
-	<item android:state_selected="true" android:drawable="@drawable/listitem_pushed" />
-	<item android:state_focused="true" android:drawable="@drawable/listitem_pushed" />
+
+    <item android:drawable="@drawable/listitem" android:state_window_focused="false"/>
+    <item android:drawable="@drawable/listitem_pushed" android:state_focused="true" android:state_pressed="true"/>
+    <item android:drawable="@drawable/listitem_pushed" android:state_focused="false" android:state_pressed="true"/>
+    <item android:drawable="@drawable/listitem_pushed" android:state_selected="true"/>
+    <item android:drawable="@drawable/listitem_pushed" android:state_focused="true"/>
+
 </selector>

Project/res/layout/bookmark_manage_listview.xml

 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-	android:orientation="horizontal" android:layout_width="fill_parent"
-	android:layout_height="fill_parent"
-	android:id="@+id/bookmarkManageListview">
-	<LinearLayout android:orientation="vertical"
-		android:layout_width="fill_parent" android:layout_height="wrap_content"
-		android:layout_weight="1">
-		<LinearLayout android:id="@+id/bookmarkManageListItem"
-			    android:layout_width="fill_parent" android:layout_height="wrap_content"
-			    android:orientation="horizontal">
-		        <TextView android:id="@+id/bookmarkName" android:textSize="20dp"
-		            android:layout_width="fill_parent" android:layout_height="wrap_content"
-		            android:singleLine="true"/>
-		        <TextView  android:id="@+id/bookmarkPos" android:textSize="10dp"
-		            android:layout_width="fill_parent" android:layout_height="wrap_content"
-		            android:singleLine="true" />
-			</LinearLayout>
-	</LinearLayout>
-</LinearLayout>
+    android:id="@+id/bookmarkManageListview"
+    android:layout_width="fill_parent"
+    android:layout_height="wrap_content"
+    android:background="@drawable/listview_style"
+    android:orientation="horizontal" >
+
+    <LinearLayout
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:orientation="vertical" >
+
+        <LinearLayout
+            android:id="@+id/bookmarkManageListItem"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal" >
+
+            <TextView
+                android:id="@+id/bookmarkName"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:singleLine="true"
+                android:textSize="20dp" />
+
+            <TextView
+                android:id="@+id/bookmarkPos"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:singleLine="true"
+                android:textSize="10dp" />
+        </LinearLayout>
+    </LinearLayout>
+
+</LinearLayout>

Project/res/layout/edit_note.xml

 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-	android:orientation="vertical" android:layout_width="match_parent"
-	android:layout_height="match_parent">
-	<com.noodle.note.view.LineEditText
-		android:inputType="textMultiLine" android:id="@+id/editNoteTextbox"
-		android:hint="请输入笔记内容" android:autoLink="all" android:gravity="top"
-		android:layout_weight="1" android:layout_height="wrap_content"
-		android:layout_width="match_parent" />
-	<LinearLayout android:id="@+id/editNoteButtonBar"
-		android:layout_height="wrap_content" android:layout_width="match_parent"
-		android:gravity="center">
-		<Button android:id="@+id/editNoteSavingButton"
-			android:layout_height="wrap_content" android:layout_width="wrap_content"
-			android:text="保存笔记" />
-	</LinearLayout>
-</LinearLayout>
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical" >
+
+    <com.noodle.note.view.LineEditText
+        android:id="@+id/editNoteTextbox"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:autoLink="all"
+        android:gravity="top"
+        android:hint="请输入笔记内容"
+        android:inputType="textMultiLine" />
+
+    <LinearLayout
+        android:id="@+id/editNoteButtonBar"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:gravity="center" >
+
+        <Button
+            android:id="@+id/editNoteSavingButton"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="保存笔记" />
+    </LinearLayout>
+
+</LinearLayout>

Project/res/layout/main.xml

 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-	android:id="@+id/mainBackground" android:layout_width="fill_parent"
-	android:layout_height="fill_parent" android:background="#e5e5e5">
-	<RelativeLayout android:id="@+id/mainTitlebar"
-		android:layout_width="fill_parent" android:layout_height="wrap_content"
-		android:layout_alignParentTop="true" android:background="@drawable/title_bar" >
-		<ImageView android:id="@+id/mainSearch" android:layout_width="36px"
-			android:layout_height="48px" android:layout_alignParentRight="true" android:src="@drawable/top_search_button" android:layout_marginRight="10dp"/>
-		<ImageView android:id="@+id/mainAdd" android:layout_width="36px"
-			android:layout_height="48px" android:layout_toLeftOf="@id/mainSearch" android:src="@drawable/top_add_button" android:layout_marginRight="10dp"/>
-	</RelativeLayout>
-	<RelativeLayout android:id="@+id/listContent"
-		android:layout_width="fill_parent" android:layout_height="wrap_content"
-		android:layout_below="@id/mainTitlebar">
-		<ListView android:id="@+id/recentNoteList" android:layout_width="fill_parent"
-			android:layout_height="wrap_content" android:drawSelectorOnTop="false"
-			android:scrollbars="vertical" android:scrollingCache="false">
-		</ListView>
-	</RelativeLayout>
-	<RelativeLayout android:id="@+id/tabContent"
-		android:layout_width="fill_parent" android:layout_height="50dp"
-		android:layout_alignParentBottom="true" android:background="@drawable/bottom_button">
-		<LinearLayout android:orientation="horizontal"
-			android:layout_width="fill_parent" android:layout_height="fill_parent"
-			android:layout_weight="6.0">
-			<RelativeLayout android:id="@+id/tabLayout1"
-				android:layout_width="fill_parent" android:layout_height="wrap_content"
-				android:layout_weight="1.0" android:layout_gravity="center_vertical">
-				<ImageView android:id="@+id/tab1" android:layout_width="wrap_content"
-					android:layout_height="wrap_content" android:layout_centerInParent="true"
-					android:src="@drawable/bottom_button_history" />
-			</RelativeLayout>
-			<RelativeLayout android:id="@+id/tabLayout2"
-				android:layout_width="fill_parent" android:layout_height="wrap_content"
-				android:layout_weight="1.0" android:layout_gravity="center_vertical">
-				<ImageView android:id="@+id/tab2" android:layout_width="wrap_content"
-					android:layout_height="wrap_content" android:layout_centerInParent="true"
-					android:src="@drawable/bottom_button_notebook" />
-			</RelativeLayout>
-			<RelativeLayout android:id="@+id/tabLayout3"
-				android:layout_width="fill_parent" android:layout_height="wrap_content"
-				android:layout_weight="1.0" android:layout_gravity="center_vertical">
-				<ImageView android:id="@+id/tab3" android:layout_width="wrap_content"
-					android:layout_height="wrap_content" android:layout_centerInParent="true"
-					android:src="@drawable/bottom_button_bookmark" />
-			</RelativeLayout>
-		</LinearLayout>
-	</RelativeLayout>
+    android:id="@+id/mainBackground"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    android:background="#e5e5e5" >
+
+    <RelativeLayout
+        android:id="@+id/mainTitlebar"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:layout_alignParentTop="true"
+        android:background="@drawable/title_bar" >
+
+        <ImageView
+            android:id="@+id/mainSearch"
+            android:layout_width="36px"
+            android:layout_height="48px"
+            android:layout_alignParentRight="true"
+            android:layout_marginRight="10dp"
+            android:src="@drawable/top_search_button" />
+
+        <ImageView
+            android:id="@+id/mainAdd"
+            android:layout_width="36px"
+            android:layout_height="48px"
+            android:layout_marginRight="10dp"
+            android:layout_toLeftOf="@id/mainSearch"
+            android:src="@drawable/top_add_button" />
+    </RelativeLayout>
+
+    <RelativeLayout
+        android:id="@+id/listContent"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:layout_below="@id/mainTitlebar" >
+
+        <ListView
+            android:id="@+id/mainListView"
+            android:layout_width="fill_parent"
+            android:layout_height="fill_parent"
+            android:cacheColorHint="#00000000"
+            android:fadingEdge="none"
+            android:divider="#00000000"
+            android:fadeScrollbars="true"
+            android:scrollbars="vertical"
+            android:scrollingCache="false" 
+            android:background="#e5e5e5">
+        </ListView>
+    </RelativeLayout>
+
+    <RelativeLayout
+        android:id="@+id/tabContent"
+        android:layout_width="fill_parent"
+        android:layout_height="50dp"
+        android:layout_alignParentBottom="true"
+        android:background="@drawable/bottom_button" >
+
+        <LinearLayout
+            android:layout_width="fill_parent"
+            android:layout_height="fill_parent"
+            android:layout_weight="6.0"
+            android:orientation="horizontal" >
+
+            <RelativeLayout
+                android:id="@+id/tabLayout1"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:layout_weight="1.0" >
+
+                <ImageView
+                    android:id="@+id/tab1"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_centerInParent="true"
+                    android:src="@drawable/bottom_button_history" />
+            </RelativeLayout>
+
+            <RelativeLayout
+                android:id="@+id/tabLayout2"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:layout_weight="1.0" >
+
+                <ImageView
+                    android:id="@+id/tab2"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_centerInParent="true"
+                    android:src="@drawable/bottom_button_notebook" />
+            </RelativeLayout>
+
+            <RelativeLayout
+                android:id="@+id/tabLayout3"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:layout_weight="1.0" >
+
+                <ImageView
+                    android:id="@+id/tab3"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_centerInParent="true"
+                    android:src="@drawable/bottom_button_bookmark" />
+            </RelativeLayout>
+        </LinearLayout>
+    </RelativeLayout>
+
 </RelativeLayout>

Project/res/layout/main_listview.xml

 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="fill_parent"
-    android:layout_height="wrap_content"
-    android:background="@drawable/listview_style">
+    android:layout_height="fill_parent"
+    android:background="@drawable/listview_style"
+    android:fadingEdge="none" >
 
     <TextView
         android:id="@+id/listNote"
-        android:layout_width="wrap_content"
+        android:layout_width="fill_parent"
         android:layout_height="35dp"
         android:singleLine="true"
-        android:textSize="11pt" />
+        android:textColor="#000000"
+        android:textSize="30px" />
+
+    <TextView
+        android:id="@+id/listContent"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:gravity="right"
+        android:singleLine="true"
+        android:textColor="#000000"
+        android:textSize="28px" />
+
+    <TextView
+        android:id="@+id/listInfo"
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent"
+        android:layout_below="@id/listNote"
+        android:gravity="left"
+        android:singleLine="true"
+        android:textColor="#000000"
+        android:textSize="20px" />
 
     <TextView
         android:id="@+id/listDetail"
         android:layout_below="@id/listNote"
         android:gravity="right"
         android:singleLine="true"
-        android:textSize="10pt" />
+        android:textSize="20px" />
 
 </RelativeLayout>

Project/res/layout/note_read.xml

 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 	android:id="@+id/noteReadMain" android:orientation="vertical"
-	android:layout_width="fill_parent" android:layout_height="fill_parent">
+	android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#e5e5e5">
+	<RelativeLayout android:id="@+id/mainTitlebar"
+		android:layout_width="fill_parent" android:layout_height="wrap_content"
+		android:layout_alignParentTop="true" android:background="@drawable/title_bar" >
+		<ImageView android:id="@+id/mainSearch" android:layout_width="36px"
+			android:layout_height="48px" android:layout_alignParentRight="true" android:src="@drawable/top_search_button" android:layout_marginRight="10dp"/>
+		<ImageView android:id="@+id/mainAdd" android:layout_width="36px"
+			android:layout_height="48px" android:layout_toLeftOf="@id/mainSearch" android:src="@drawable/top_add_button" android:layout_marginRight="10dp"/>
+	</RelativeLayout>
 	<TextView android:id="@+id/noteContent" android:layout_width="fill_parent"
-		android:layout_height="wrap_content" />
+		android:layout_height="wrap_content" android:textColor="#000000" android:textSize="24px"/>
 </LinearLayout>

Project/res/layout/notebook_manage.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:layout_height="fill_parent" >
-	<ListView android:id="@+id/notebookManageMylist" android:layout_width="fill_parent"
-		android:layout_height="wrap_content" android:scrollbars="vertical" android:clickable="true"></ListView>
-	<LinearLayout android:layout_width="fill_parent"
-		android:layout_height="wrap_content">
-	</LinearLayout>
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    android:orientation="vertical" 
+    android:background="#e5e5e5">
+
+    <RelativeLayout
+        android:id="@+id/mainTitlebar"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:layout_alignParentTop="true"
+        android:background="@drawable/title_bar" >
+
+        <ImageView
+            android:id="@+id/mainSearch"
+            android:layout_width="36px"
+            android:layout_height="48px"
+            android:layout_alignParentRight="true"
+            android:layout_marginRight="10dp"
+            android:src="@drawable/top_search_button" />
+
+        <ImageView
+            android:id="@+id/mainAdd"
+            android:layout_width="36px"
+            android:layout_height="48px"
+            android:layout_marginRight="10dp"
+            android:layout_toLeftOf="@id/mainSearch"
+            android:src="@drawable/top_add_button" />
+    </RelativeLayout>
+
+    <LinearLayout
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content" >
+
+        <TextView
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/noteBookManageHeader" 
+            android:textColor="#000000"/>
+    </LinearLayout>
+
+    <ListView
+        android:id="@+id/notebookManageMylist"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:clickable="true"
+        android:scrollbars="vertical" >
+    </ListView>
+
 </LinearLayout>

Project/res/layout/notebook_manage_listview.xml

 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-	android:orientation="horizontal" android:layout_width="fill_parent"
-	android:layout_height="fill_parent"
-	android:id="@+id/notebookManageListview">
-	<LinearLayout android:orientation="vertical"
-		android:layout_width="fill_parent" android:layout_height="wrap_content"
-		android:layout_weight="1"
-		>
-		<TextView android:id="@+id/notebookManageListName" android:textSize="20dp"
-			android:layout_width="fill_parent" android:layout_height="wrap_content"
-			android:singleLine="true" android:layout_weight="3" />
-		<TextView android:id="@+id/notebookManageListCount" android:textSize="10dp"
-			android:layout_width="fill_parent" android:layout_height="wrap_content"
-			android:singleLine="true" />
-	</LinearLayout>
-</LinearLayout>
+    android:id="@+id/notebookManageListview"
+    android:layout_width="fill_parent"
+    android:layout_height="wrap_content"
+    android:background="@drawable/listview_style" >
+
+    <LinearLayout
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:orientation="vertical" >
+
+        <TextView
+            android:id="@+id/notebookManageListName"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:layout_weight="3"
+            android:singleLine="true"
+            android:textSize="20dp" />
+
+        <TextView
+            android:id="@+id/notebookManageListCount"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:singleLine="true"
+            android:textSize="10dp" />
+    </LinearLayout>
+
+</LinearLayout>

Project/res/layout/notebookmanage_creat.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:layout_height="fill_parent"
-	android:id="@+id/notebookManageCreat">
-	<TextView android:text="@string/noteBookManageTitle"
-	    android:id="@+id/noteBookManageTitle"
-	    android:layout_width="fill_parent"
-	    android:layout_height="wrap_content"
-	    android:textSize="25dp"
-	    android:singleLine="true"/>
-	<EditText android:id="@+id/noteBookNewName"
-	    android:layout_width="fill_parent"
-	    android:layout_height="wrap_content"/>
-	<LinearLayout android:orientation="vertical"
-		android:layout_width="fill_parent" android:layout_height="wrap_content"
-		>
-		<Button android:text="@string/noteBookManageButtonSubmit"
-		    android:id="@+id/noteBookButtonSubmit"
-		    android:layout_width="fill_parent"
-		    android:layout_height="wrap_content"/>
-		<Button android:text="@string/noteBookManageButtonCancle"
-		    android:id="@+id/noteBookButtonCancle"
-		    android:layout_width="fill_parent"
-		    android:layout_height="wrap_content"/>
-	</LinearLayout>
-</LinearLayout>
+    android:id="@+id/notebookManageCreat"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    android:orientation="vertical" >
+
+    <TextView
+        android:id="@+id/noteBookManageTitle"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:singleLine="true"
+        android:text="@string/noteBookManageTitle"
+        android:textSize="25dp" />
+
+    <EditText
+        android:id="@+id/noteBookNewName"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content" />
+
+    <LinearLayout
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical" >
+
+        <Button
+            android:id="@+id/noteBookButtonSubmit"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/noteBookManageButtonSubmit" />
+
+        <Button
+            android:id="@+id/noteBookButtonCancle"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/noteBookManageButtonCancle" />
+    </LinearLayout>
+
+</LinearLayout>

Project/res/layout/notebookmanage_listview.xml

 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-	android:orientation="horizontal" android:layout_width="fill_parent"
-	android:layout_height="fill_parent"
-	android:id="@+id/notebookManageListview">
-	<LinearLayout android:orientation="vertical"
-		android:layout_width="fill_parent" android:layout_height="wrap_content"
-		android:layout_weight="1"
-		>
-		<TextView android:id="@+id/notebookManageListName" android:textSize="20dp"
-			android:layout_width="fill_parent" android:layout_height="wrap_content"
-			android:singleLine="true" android:layout_weight="3" />
-		<TextView android:id="@+id/notebookManageListCount" android:textSize="10dp"
-			android:layout_width="fill_parent" android:layout_height="wrap_content"
-			android:singleLine="true" />
-	</LinearLayout>
-</LinearLayout>
+    android:id="@+id/notebookManageListview"
+    android:layout_width="fill_parent"
+    android:layout_height="wrap_content"
+    android:background="@drawable/listview_style"
+    android:orientation="horizontal" >
+
+    <LinearLayout
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:orientation="vertical" >
+
+        <TextView
+            android:id="@+id/notebookManageListName"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:layout_weight="3"
+            android:singleLine="true"
+            android:textSize="20dp" />
+
+        <TextView
+            android:id="@+id/notebookManageListCount"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:singleLine="true"
+            android:textSize="10dp" />
+    </LinearLayout>
+
+</LinearLayout>

Project/res/layout/notebookmanage_lp_edit.xml

 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/notebookmanage_lp_edit"
-	android:orientation="vertical" android:layout_width="fill_parent"
-	android:layout_height="fill_parent" >
-	<TextView android:text="@string/noteBookManageEditTitle"
-	    android:layout_width="fill_parent"
-	    android:layout_height="wrap_content"
-	    android:textSize="25dp"
-	    android:singleLine="true"/>
-	<EditText android:id="@+id/noteBookEditNewName"
-	    android:layout_width="fill_parent"
-	    android:layout_height="wrap_content"
-	    android:hint="@string/noteBookManageEditHint"/>
-	<LinearLayout android:orientation="vertical"
-		android:layout_width="fill_parent" android:layout_height="wrap_content"
-		>
-		<Button android:text="@string/noteBookManageEditButtonSubmit"
-		    android:id="@+id/noteBookEditButtonSubmit"
-		    android:layout_width="fill_parent"
-		    android:layout_height="wrap_content"/>
-		<Button android:text="@string/noteBookManageEditButtonCancle"
-		    android:id="@+id/noteBookEditButtonCancle"
-		    android:layout_width="fill_parent"
-		    android:layout_height="wrap_content"/>
-	</LinearLayout>
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    android:orientation="vertical" >
+
+    <TextView
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:singleLine="true"
+        android:text="@string/noteBookManageEditTitle"
+        android:textSize="25dp" />
+
+    <EditText
+        android:id="@+id/noteBookEditNewName"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:hint="@string/noteBookManageEditHint" />
+
+    <LinearLayout
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical" >
+
+        <Button
+            android:id="@+id/noteBookEditButtonSubmit"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/noteBookManageEditButtonSubmit" />
+
+        <Button
+            android:id="@+id/noteBookEditButtonCancle"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/noteBookManageEditButtonCancle" />
+    </LinearLayout>
+
 </LinearLayout>

Project/res/layout/notebookmanage_main.xml

 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/notebookManageMain"
-	android:orientation="vertical" android:layout_width="fill_parent"
-	android:layout_height="fill_parent" android:background="#e5e5e5">
-	<ListView android:id="@+id/notebookManageMylist" android:layout_width="fill_parent"
-		android:layout_height="wrap_content" android:scrollbars="vertical" android:clickable="true"></ListView>
-	<LinearLayout android:layout_width="fill_parent"
-		android:layout_height="wrap_content">
-	</LinearLayout>
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    android:background="#e5e5e5"
+    android:orientation="vertical" >
+
+    <RelativeLayout
+        android:id="@+id/mainTitlebar"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:layout_alignParentTop="true"
+        android:background="@drawable/title_bar" >
+
+        <ImageView
+            android:id="@+id/mainSearch"
+            android:layout_width="36px"
+            android:layout_height="48px"
+            android:layout_alignParentRight="true"
+            android:layout_marginRight="10dp"
+            android:src="@drawable/top_search_button" />
+
+        <ImageView
+            android:id="@+id/mainAdd"
+            android:layout_width="36px"
+            android:layout_height="48px"
+            android:layout_marginRight="10dp"
+            android:layout_toLeftOf="@id/mainSearch"
+            android:src="@drawable/top_add_button" />
+    </RelativeLayout>
+
+    <ListView
+        android:id="@+id/notebookManageMylist"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:clickable="true"
+        android:scrollbars="vertical" >
+    </ListView>
+
 </LinearLayout>

Project/res/layout/notes_display.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:layout_height="fill_parent" >
-	<ListView android:id="@+id/notesList" android:layout_width="fill_parent"
-		android:layout_height="wrap_content" android:scrollbars="vertical" android:clickable="true"></ListView>
-	<LinearLayout android:layout_width="fill_parent"
-		android:layout_height="wrap_content">
-	</LinearLayout>
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    android:background="#e5e5e5"
+    android:orientation="vertical" >
+
+    <RelativeLayout
+        android:id="@+id/mainTitlebar"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:layout_alignParentTop="true"
+        android:background="@drawable/title_bar" >
+
+        <ImageView
+            android:id="@+id/mainSearch"
+            android:layout_width="36px"
+            android:layout_height="48px"
+            android:layout_alignParentRight="true"
+            android:layout_marginRight="10dp"
+            android:src="@drawable/top_search_button" />
+
+        <ImageView
+            android:id="@+id/mainAdd"
+            android:layout_width="36px"
+            android:layout_height="48px"
+            android:layout_marginRight="10dp"
+            android:layout_toLeftOf="@id/mainSearch"
+            android:src="@drawable/top_add_button" />
+    </RelativeLayout>
+
+    <ListView
+        android:id="@+id/notesList"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:clickable="true"
+        android:scrollbars="vertical" >
+    </ListView>
+
+    <LinearLayout
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content" >
+    </LinearLayout>
+
 </LinearLayout>

Project/res/layout/notes_display_listview.xml

 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-	android:orientation="horizontal" android:layout_width="fill_parent"
-	android:layout_height="fill_parent"
-	android:id="@+id/notesListview">
-	<LinearLayout android:orientation="vertical"
-		android:layout_width="fill_parent" android:layout_height="wrap_content"
-		android:layout_weight="1"
-		>
-		<TextView android:id="@+id/noteListName" android:textSize="20dp"
-			android:layout_width="fill_parent" android:layout_height="wrap_content"
-			android:singleLine="true" android:layout_weight="3" />
-		<TextView android:id="@+id/noteListCreated" android:textSize="10dp"
-			android:layout_width="fill_parent" android:layout_height="wrap_content"
-			android:singleLine="true" />
-	</LinearLayout>
-</LinearLayout>
+    android:id="@+id/notesListview"
+    android:layout_width="fill_parent"
+    android:layout_height="wrap_content"
+    android:background="@drawable/listview_style"
+    android:orientation="horizontal" >
+
+    <LinearLayout
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:orientation="vertical" >
+
+        <TextView
+            android:id="@+id/noteListName"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:layout_weight="3"
+            android:singleLine="true"
+            android:textSize="20dp" />
+
+        <TextView
+            android:id="@+id/noteListCreated"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:singleLine="true"
+            android:textSize="10dp" />
+    </LinearLayout>
+
+</LinearLayout>

Project/res/menu/read_menu.xml

 <?xml version="1.0" encoding="utf-8"?>
 <menu xmlns:android="http://schemas.android.com/apk/res/android">
-	<item android:id="@+id/readTab1" android:title="@string/readTab1" />
-	<item android:id="@+id/readTab2" android:title="@string/readTab2" />
-	<item android:id="@+id/readTab3" android:title="@string/readTab3" />
+	<item android:id="@+id/readTab1" android:icon="@drawable/bottom_button_bookmark" android:title="@string/readTab1" />
+	<item android:id="@+id/readTab2" android:icon="@android:drawable/ic_menu_edit" android:title="@string/readTab2" />
+	<item android:id="@+id/readTab3" android:icon="@android:drawable/ic_menu_delete" android:title="@string/readTab3" />
 </menu>

Project/res/values/notebookmanage_lp_edit.xml

     <string name="noteBookManageEditHint">请输入新的笔记本名</string>
     <string name="noteBookManageEditButtonSubmit">确定</string>
     <string name="noteBookManageEditButtonCancle">取消</string>
+    <string name="noteBookManageHeader">笔记本管理</string>
 </resources>

Project/src/com/noodle/note/activity/BookmarkIndexActivity.java

 
 import com.noodle.note.R;
 import com.noodle.note.gateway.BookmarkGateway;
+import com.noodle.note.gateway.NoteGateway;
 import com.noodle.note.model.Bookmark;
+import com.noodle.note.model.Note;
 import com.noodle.note.persistent.unitofwork.Session;
+import com.noodle.note.utils.StringHelper;
+import com.noodle.note.utils.StringHelper.DateFormat;
 
 /**
  * 笔记本书签显示页面
 	protected void onCreate(Bundle savedInstanceState) {
 		super.onCreate(savedInstanceState);
 		initView();
-		SimpleAdapter listAdapter = new SimpleAdapter(this, bookmarkList, R.layout.main_listview, new String[] { "bookmarkName", "noteName" }, new int[] { R.id.listNote,
-				R.id.listDetail });
-		setListAdapter(listAdapter);
 	}
 
 	private void initView() {
 
 		ArrayList<Bookmark> list = new ArrayList<Bookmark>();
 		BookmarkGateway bookmarkGateway = (BookmarkGateway) Session.getInstance(this).query(Bookmark.class);
+		NoteGateway noteGateway = (NoteGateway) Session.getInstance(this).query(Note.class);
 		list = (ArrayList<Bookmark>) bookmarkGateway.findAll();
 		if (!list.isEmpty()) {
 			for (Bookmark bm : list) {
 				HashMap<String, Object> contentMap = new HashMap<String, Object>();
+				Note note = noteGateway.findById(bm.getNote().getId());
 				contentMap.put("bookmarkName", bm.getName());
-				contentMap.put("noteName", bm.getNote().getTitle());
+				contentMap.put("noteName", "位于笔记:" + note.getTitle() + " 第" + String.valueOf(bm.getLineNumber() + 1) + "行");
 				contentMap.put("noteId", bm.getNote().getId());
 				contentMap.put("startLine", bm.getLineNumber());
+				contentMap.put("created", "创建于:" + StringHelper.parseDate(bm.getCreated(), DateFormat.MONTH_DATE));
 				bookmarkList.add(contentMap);
 			}
 		} else {
 			noContentMap.put("noteId", -1);
 			bookmarkList.add(noContentMap);
 		}
-
+		SimpleAdapter listAdapter = new SimpleAdapter(this, bookmarkList, R.layout.main_listview, new String[] { "bookmarkName", "noteName", "created" }, new int[] {
+				R.id.listNote, R.id.listInfo, R.id.listDetail });
+		setListAdapter(listAdapter);
 	}
 
 	/**

Project/src/com/noodle/note/activity/BookmarkManageActivity.java

 import android.widget.EditText;
 import android.widget.ListView;
 import android.widget.SimpleAdapter;
+import android.widget.Toast;
 
 import com.noodle.note.R;
 import com.noodle.note.gateway.BookmarkGateway;
 			column = bundle.getInt("column");
 			noteId = bundle.getInt("noteId");
 			String bookmarkName = bookmarkEditText.getText().toString();
-			Note note = Registry.getInstance().getEntity(Note.class, noteId);
-			Bookmark bookmark = new Bookmark(note, line, column);
-			bookmark.setName(bookmarkName);
-			BookmarkGateway bookmarkGateway = (BookmarkGateway) session.query(Bookmark.class);
-			bookmarkGateway.create(bookmark);
-			Intent intent = new Intent();
-			intent.putExtras(bundle);
-			intent.setClass(BookmarkManageActivity.this, BookmarkManageActivity.class);
-			startActivity(intent);
-			overridePendingTransition(0, 0);
-			BookmarkManageActivity.this.finish();
+			if (null == bookmarkName || "".equals(bookmarkName)) {
+				Toast.makeText(BookmarkManageActivity.this, "请输入书签名称", Toast.LENGTH_SHORT).show();
+			} else {
+				Note note = Registry.getInstance().getEntity(Note.class, noteId);
+				Bookmark bookmark = new Bookmark(note, line, column);
+				bookmark.setName(bookmarkName);
+				BookmarkGateway bookmarkGateway = (BookmarkGateway) session.query(Bookmark.class);
+				bookmarkGateway.create(bookmark);
+				Intent intent = new Intent();
+				intent.putExtras(bundle);
+				intent.setClass(BookmarkManageActivity.this, BookmarkManageActivity.class);
+				startActivity(intent);
+				overridePendingTransition(0, 0);
+				BookmarkManageActivity.this.finish();
+			}
 		}
+
 	};
 	/**
 	 * 按钮“返回“的操作设置

Project/src/com/noodle/note/activity/MainActivity.java

 import android.view.ViewGroup.LayoutParams;
 import android.view.animation.TranslateAnimation;
 import android.widget.ImageView;
-import android.widget.ListView;
 import android.widget.RelativeLayout;
 
 import com.noodle.note.R;
 
 	private ImageView addButton;
 	private ImageView searchButton;
-	
+
+
 	@Override
 	public void onCreate(Bundle savedInstanceState) {
 		super.onCreate(savedInstanceState);
 		activeBackground.setImageResource(R.drawable.bottom_button_activeline);
 		addButton = (ImageView) findViewById(R.id.mainAdd);
 		searchButton = (ImageView) findViewById(R.id.mainSearch);
-
 		// 默认滚动背景位置
 		switch (defaultActiveBackgroundId) {
 		case 1:
 		default:
 			break;
 		}
-		
+
 		// 获得内容页面
 		View view = getLocalActivityManager().startActivity("recentView", new Intent(MainActivity.this, RecentViewActivity.class)).getDecorView();
 		listContentLayout.addView(view);
 		}
 	}
 
-	@Override
-	protected void onRestart() {
-		super.onRestart();
-	}
-
 }

Project/src/com/noodle/note/activity/NoteReadActivity.java

 package com.noodle.note.activity;
 
+import java.util.Date;
+
 import android.app.Activity;
 import android.content.Intent;
 import android.os.Bundle;
 import android.view.Menu;
 import android.view.MenuInflater;
 import android.view.MenuItem;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.ImageView;
 import android.widget.TextView;
 
 import com.noodle.note.R;
+import com.noodle.note.gateway.BookmarkGateway;
 import com.noodle.note.gateway.NoteGateway;
+import com.noodle.note.model.Bookmark;
 import com.noodle.note.model.Note;
 import com.noodle.note.persistent.identitymap.Registry;
 import com.noodle.note.persistent.unitofwork.Session;
 	private int startLine = 0;
 	private int size = 24;
 	private int pk;
+	
+	private ImageView addButton;
+	private ImageView searchButton;
+
 	@Override
 	public void onCreate(Bundle savedInstanceState) {
 		super.onCreate(savedInstanceState);
 		setContentView(R.layout.note_read);
 		noteContentView = (TextView) findViewById(R.id.noteContent);
+		addButton = (ImageView) findViewById(R.id.mainAdd);
+		searchButton = (ImageView) findViewById(R.id.mainSearch);
 		displayContent();
+		setListener();
 	}
 
 	/**
 	private void deleteNote() {
 		NoteGateway gateway = (NoteGateway) Session.getInstance(this).query(Note.class);
 		Note note = Registry.getInstance().getEntity(Note.class, pk);
+		BookmarkGateway bookmarkGateway = (BookmarkGateway) Session.getInstance(this).query(Bookmark.class);
 		int notebookId = note.getNotebook().getId();
+		bookmarkGateway.deleteByNote(note);
 		gateway.delete(note);
 		Intent intent = new Intent();
 		Bundle bundle = new Bundle();
 		intent.setClass(this, NotesDisplayActivity.class);
 		startActivity(intent);
 		finish();
-		
+
 	}
 
 	/**
 		noteContentView.setText(content);
 		noteContentView.setMovementMethod(ScrollingMovementMethod.getInstance());
 		noteContentView.scrollBy(0, startLine * size);
+		note.setVisited(new Date());
+		gateway.update(note);
 	}
 
 	/**
 		startActivity(intent);
 		finish();
 	}
+	/**
+	 * 设置监听器
+	 */
+	private void setListener(){
+		addButton.setOnClickListener(addButtonListener);
+		searchButton.setOnClickListener(searchButtonListener);
+	}
+	
+	/**
+	 * 顶部按钮监听器
+	 */
+
+	OnClickListener addButtonListener = new OnClickListener() {
+		@Override
+		public void onClick(View v) {
+			startActivity(new Intent().setClass(NoteReadActivity.this, EditNoteActivity.class));
+		}
+	};
+	OnClickListener searchButtonListener = new OnClickListener() {
+		@Override
+		public void onClick(View v) {
+			// TODO 搜索页面
+		}
+	};
 }

Project/src/com/noodle/note/activity/NotebookIndexActivity.java

 import android.widget.SimpleAdapter;
 
 import com.noodle.note.R;
+import com.noodle.note.gateway.NoteGateway;
 import com.noodle.note.gateway.NotebookGateway;
+import com.noodle.note.model.Note;
 import com.noodle.note.model.Notebook;
 import com.noodle.note.persistent.unitofwork.Session;
 import com.noodle.note.utils.StringHelper;
 	protected void onCreate(Bundle savedInstanceState) {
 		super.onCreate(savedInstanceState);
 		initView();
-		SimpleAdapter listAdapter = new SimpleAdapter(this, notebookList, R.layout.main_listview, new String[] { "notebookName", "created" }, new int[] { R.id.listNote,
-				R.id.listDetail });
-		setListAdapter(listAdapter);
 	}
 
 	private void initView() {
 		ArrayList<Notebook> notes = new ArrayList<Notebook>();
 		NotebookGateway notebookGateway = (NotebookGateway) Session.getInstance(this).query(Notebook.class);
+		NoteGateway noteGateway = (NoteGateway) Session.getInstance(this).query(Note.class);
 		notes = (ArrayList<Notebook>) notebookGateway.findAll();
 		if (!notes.isEmpty()) {
 			for (Notebook nb : notes) {
 				HashMap<String, Object> contentMap = new HashMap<String, Object>();
+				int noteNumber = noteGateway.count(nb.getId());
 				contentMap.put("notebookName", nb.getName());
-				contentMap.put("created", StringHelper.parseDate(nb.getCreated(), DateFormat.MONTH_DATE_AND_HOUR_MINITE));
+				contentMap.put("noteNumber", "共" + noteNumber + "篇笔记");
+				contentMap.put("created", "创建于:" + StringHelper.parseDate(nb.getCreated(), DateFormat.MONTH_DATE_AND_HOUR_MINITE));
 				contentMap.put("id", nb.getId());
 				notebookList.add(contentMap);
 			}
 		} else {
 			HashMap<String, Object> noContentMap = new HashMap<String, Object>();
 			noContentMap.put("notebookName", "暂无内容");
-			noContentMap.put("created", "");
+			noContentMap.put("noteNumber", "");
 			noContentMap.put("id", -1);
 			notebookList.add(noContentMap);
 		}
+		SimpleAdapter listAdapter = new SimpleAdapter(this, notebookList, R.layout.main_listview, new String[] { "notebookName", "noteNumber", "created" }, new int[] {
+				R.id.listNote, R.id.listContent, R.id.listDetail });
+		setListAdapter(listAdapter);
 	}
 
 	@Override
 			startActivity(intent);
 		}
 	}
+
 	@Override
 	protected void onRestart() {
 		notebookList.clear();
 		initView();
 		super.onRestart();
 	}
-	
+
 }

Project/src/com/noodle/note/activity/NotebookManageActivity.java

 import android.view.MenuInflater;
 import android.view.MenuItem;
 import android.view.View;
+import android.view.View.OnClickListener;
 import android.view.View.OnCreateContextMenuListener;
 import android.widget.AdapterView;
 import android.widget.AdapterView.OnItemClickListener;
+import android.widget.ImageView;
 import android.widget.ListView;
 import android.widget.SimpleAdapter;
 
  * 
  */
 public class NotebookManageActivity extends Activity {
-	/** 
-	 * 笔记本条目浏览的List 
+	/**
+	 * 笔记本条目浏览的List
 	 */
 	private ListView listView;
-	/** 
-	 * 笔记本条目浏览中每个List的HashMap 
+	/**
+	 * 笔记本条目浏览中每个List的HashMap
 	 */
 	private ArrayList<HashMap<String, Object>> listItem = new ArrayList<HashMap<String, Object>>();
+	
+	private ImageView addButton;
+	private ImageView searchButton;
 
 	@Override
 	public void onCreate(Bundle savedInstanceState) {
 		super.onCreate(savedInstanceState);
 		setContentView(R.layout.notebookmanage_main);
+		addButton = (ImageView) findViewById(R.id.mainAdd);
+		searchButton = (ImageView) findViewById(R.id.mainSearch);
 		initViews();
 		setListeners();
 	}
 
-	/** 
+	/**
 	 * manage页面listview长按菜单
 	 */
 	OnCreateContextMenuListener longpressmenu = new OnCreateContextMenuListener() {
 			String lpMenuTitle = "菜单";
 			String lpMenuItem1 = "编辑";
 			String lpMenuItem2 = "删除";
-			String lpMenuItem3 = "分享";
 
 			menu.setHeaderTitle(lpMenuTitle);
 			/** 第二个参数为操作ID */
 			menu.add(0, 0, 0, lpMenuItem1);
 			menu.add(0, 1, 0, lpMenuItem2);
-			menu.add(0, 2, 0, lpMenuItem3);
 		}
 	};
 
-	/** 
+	/**
 	 * manage页面listview项的接口设置以及监听器设置
 	 */
 	public void setListeners() {
 		listView.setAdapter(listItemAdapter);
 		listView.setOnItemClickListener(oicl);
 		listView.setOnCreateContextMenuListener(longpressmenu);
+		addButton.setOnClickListener(addButtonListener);
+		searchButton.setOnClickListener(searchButtonListener);
 	}
 
-	/** 
+	/**
 	 * manage长按菜单操作链接
 	 */
 	@Override
 		NotebookGateway notebookListGateway = (NotebookGateway) Session.getInstance(this).query(Notebook.class);
 
 		switch (item.getItemId()) {
-		/** 长按菜单的“编辑”操作 */
+		// 长按菜单的“编辑”操作
 		case 0:
 			Intent intent = new Intent();
 			intent.setClass(NotebookManageActivity.this, NotebookManageCreatActivity.class);
 			startActivity(intent);
 			NotebookManageActivity.this.finish();
 			break;
-		// 长按菜单的“删除”操作 
+		// 长按菜单的“删除”操作
 		case 1:
 			notebookListGateway.deleteById(listItemId);
 			Intent selfintent = new Intent();
 			startActivity(selfintent);
 			NotebookManageActivity.this.finish();
 			break;
-		// 长按菜单的“分享”操作 
+		// 长按菜单的“分享”操作
 		// TODO待实现
 		case 2:
 			break;
 		return super.onContextItemSelected(item);
 	}
 
-	/** 
-	 * Menu按键名设置 
+	/**
+	 * Menu按键名设置
 	 */
 	@Override
 	public boolean onCreateOptionsMenu(Menu menu) {
 		return true;
 	}
 
-	/** 
+	/**
 	 * manage页面menu操作设置
 	 */
 	@Override
 		return super.onOptionsItemSelected(item);
 	}
 
-	/** 
-	 * manage页面liseview短按监听 
+	/**
+	 * manage页面liseview短按监听
 	 */
 	OnItemClickListener oicl = new OnItemClickListener() {
 		public void onItemClick(AdapterView<?> adapter, View v, int position, long id) {
 		}
 	};
 
-	/** 
+	/**
 	 * manage页面listview短按链接设置
 	 */
 	private void shortpress(int pk) {
 		startActivity(intent);
 	}
 
-	/** 
-	 * manage页面listview内容创建 
+	/**
+	 * manage页面listview内容创建
 	 */
 	private void initViews() {
 		NotebookGateway notebookGateway = (NotebookGateway) Session.getInstance(NotebookManageActivity.this).query(Notebook.class);
 			noContentMap.put("id", -1);
 			listItem.add(noContentMap);
 		}
+		
 	}
+
+	/**
+	 * 顶部按钮监听器
+	 */
+
+	OnClickListener addButtonListener = new OnClickListener() {
+		@Override
+		public void onClick(View v) {
+			startActivity(new Intent().setClass(NotebookManageActivity.this, EditNoteActivity.class));
+		}
+	};
+	OnClickListener searchButtonListener = new OnClickListener() {
+		@Override
+		public void onClick(View v) {
+			// TODO 搜索页面
+		}
+	};
 }

Project/src/com/noodle/note/activity/NotesDisplayActivity.java

 import android.view.MenuInflater;
 import android.view.MenuItem;
 import android.view.View;
+import android.view.View.OnClickListener;
 import android.widget.AdapterView;
 import android.widget.AdapterView.OnItemClickListener;
+import android.widget.ImageView;
 import android.widget.ListView;
 import android.widget.SimpleAdapter;
 
 	private ArrayList<HashMap<String, Object>> listItem = new ArrayList<HashMap<String, Object>>();
 	private List<Note> notes = new ArrayList<Note>();
 
+	private ImageView addButton;
+	private ImageView searchButton;
+
 	@Override
 	protected void onCreate(Bundle savedInstanceState) {
 		super.onCreate(savedInstanceState);
 		setContentView(R.layout.notes_display);
+		addButton = (ImageView) findViewById(R.id.mainAdd);
+		searchButton = (ImageView) findViewById(R.id.mainSearch);
 		initView();
 		setListener();
 	}
 				R.id.noteListName, R.id.noteListCreated });
 		listView.setAdapter(listSimpleAdapter);
 		listView.setOnItemClickListener(listItemListener);
+		addButton.setOnClickListener(addButtonListener);
+		searchButton.setOnClickListener(searchButtonListener);
 	}
 
 	/**
 		}
 	}
 
+
+	/**
+	 * 顶部按钮监听器
+	 */
+
+	OnClickListener addButtonListener = new OnClickListener() {
+		@Override
+		public void onClick(View v) {
+			startActivity(new Intent().setClass(NotesDisplayActivity.this, EditNoteActivity.class));
+		}
+	};
+	OnClickListener searchButtonListener = new OnClickListener() {
+		@Override
+		public void onClick(View v) {
+			// TODO 搜索页面
+		}
+	};
+
 }

Project/src/com/noodle/note/activity/RecentViewActivity.java

 import android.widget.SimpleAdapter;
 
 import com.noodle.note.R;
+import com.noodle.note.gateway.BookmarkGateway;
 import com.noodle.note.gateway.NoteGateway;
+import com.noodle.note.model.Bookmark;
 import com.noodle.note.model.Note;
 import com.noodle.note.persistent.unitofwork.Session;
 import com.noodle.note.utils.StringHelper;
 	protected void onCreate(Bundle savedInstanceState) {
 		super.onCreate(savedInstanceState);
 		initView();
-		SimpleAdapter listAdapter = new SimpleAdapter(this, noteList, R.layout.main_listview, new String[] { "noteTitle", "visited" }, new int[] { R.id.listNote, R.id.listDetail });
-		setListAdapter(listAdapter);
 	}
 
 	private void initView() {
 		ArrayList<Note> list = new ArrayList<Note>();
 		NoteGateway noteGateway = (NoteGateway) Session.getInstance(this).query(Note.class);
+		BookmarkGateway bookmarkGateway = (BookmarkGateway) Session.getInstance(this).query(Bookmark.class);
 		list = (ArrayList<Note>) noteGateway.findRecentVisit();
 		if (!list.isEmpty()) {
 			for (Note note : list) {
 				HashMap<String, Object> contentMap = new HashMap<String, Object>();
+				int bookmarkNumber = bookmarkGateway.getCount(note.getId());
 				contentMap.put("noteTitle", note.getTitle());
-				contentMap.put("visited", StringHelper.parseDate(note.getVisited(), DateFormat.MONTH_DATE_AND_HOUR_MINITE));
+				contentMap.put("visited", "最近访问 :" + StringHelper.parseDate(note.getVisited(), DateFormat.MONTH_DATE_AND_HOUR_MINITE));
 				contentMap.put("id", note.getId());
+				contentMap.put("bookmarkNumber", "共有" + String.valueOf(bookmarkNumber) + "个书签");
 				noteList.add(contentMap);
 			}
 		} else {
 			noContentMap.put("id", -1);
 			noteList.add(noContentMap);
 		}
+		SimpleAdapter listAdapter = new SimpleAdapter(this, noteList, R.layout.main_listview, new String[] { "noteTitle", "visited", "bookmarkNumber" }, new int[] { R.id.listNote,
+				R.id.listDetail, R.id.listInfo });
+		setListAdapter(listAdapter);
 	}
 
 	/**

Project/src/com/noodle/note/gateway/BookmarkGateway.java

 import com.noodle.note.model.Bookmark;
 import com.noodle.note.model.Note;
 import com.noodle.note.persistent.TableDataGateway;
+import com.noodle.note.persistent.identitymap.Registry;
 import com.noodle.note.utils.AttributeInjecter;
 import com.noodle.note.utils.DbHelper;
 import com.noodle.note.utils.StringHelper;
 		AttributeInjecter.set(model, "id", id);
 		// 关闭数据库连接
 		db.close();
+		Registry.getInstance().addEntity(model);
 	}
 
 	/**
 		// 改变状态
 		AttributeInjecter.set(model, "id", 0);
 	}
-
+	/**
+	 * 删除笔记下所有书签
+	 */
+	
+	public void deleteByNote(Note model){
+		SQLiteDatabase db = getWritableDatabase();
+		// 提取 ID 参数
+		Integer id = model.getId();
+		String[] params = { id.toString() };
+		// SQL
+		final String SQL = "DELETE FROM bookmarks WHERE note_id = ?";
+		db.execSQL(SQL, params);
+		db.close();
+	}
+	
 	/**
 	 * 更新书签
 	 */
 		db.update(TABLE, getValues(model), "id=?", params);
 		// 关闭数据库连接
 		db.close();
+		Registry.getInstance().addEntity(model);
+	}
+
+	public int getCount(int noteId) {
+		int count;
+		// 获得数据库连接
+		SQLiteDatabase db = getWritableDatabase();
+		// SQL语句
+		final String SQL = "SELECT COUNT(*) FROM bookmarks WHERE note_id = ?";
+		// 参数
+		String[] params = { String.valueOf(noteId) };
+		// 获取查询结果
+		Cursor cursor = db.rawQuery(SQL, params);
+		cursor.moveToNext();
+		count = cursor.getInt(0);
+		// 关闭游标及数据库连接
+		cursor.close();
+		db.close();
+		return count;
 	}
 
 	/**
 
 		return values;
 	}
+
 	/**
 	 * 查询标识映射中是否有主键为id的元素
 	 * 

Project/src/com/noodle/note/gateway/NoteGateway.java

 		AttributeInjecter.set(model, "id", id);
 		// 关闭数据库连接
 		db.close();
+		Registry.getInstance().addEntity(model);
 	}
 
 	/**
 		// 获取数据库连接
 		SQLiteDatabase db = getWritableDatabase();
 		// 提取 ID 参数
-		Integer id = model.getId();
-		String[] params = { id.toString() };
+		int id = model.getId();
+		String[] params = { String.valueOf(id) };
 		// 更新表
 		db.update(TABLE, getValues(model), "id=?", params);
 		// 关闭数据库连接
 		db.close();
+		Registry.getInstance().addEntity(model);
 	}
 
 	/**

Project/src/com/noodle/note/gateway/NotebookGateway.java

 		AttributeInjecter.set(model, "id", id);
 		// 关闭数据库连接
 		db.close();
+		Registry.getInstance().addEntity(model);
 	}
 
 	/**
 		db.update(TABLE, getValues(model), "id=?", arguments);
 		// 关闭数据库连接
 		db.close();
+		Registry.getInstance().addEntity(model);
 	}
 
 	/**

Project/src/com/noodle/note/gateway/TagGateway.java

 import com.noodle.note.model.Bookmark;
 import com.noodle.note.model.Tag;
 import com.noodle.note.persistent.TableDataGateway;
+import com.noodle.note.persistent.identitymap.Registry;
 import com.noodle.note.utils.AttributeInjecter;
 import com.noodle.note.utils.DbHelper;
 import com.noodle.note.utils.StringHelper;
 		AttributeInjecter.set(model, "id", id);
 		// 关闭数据库连接
 		db.close();
+		Registry.getInstance().addEntity(model);
 	}
 
 	/**
 		AttributeInjecter.set(model, "id", 0);
 		// 关闭数据库连接
 		db.close();
+		Registry.getInstance().addEntity(model);
 	}
 
 	/**

Project/src/com/noodle/note/persistent/identitymap/Registry.java

 	public void addEntity(EntityModel entity) {
 		HashMap<Integer, EntityModel> modelMap = (HashMap<Integer, EntityModel>) new HashMap<Integer, EntityModel>();
 		modelMap.put(entity.getId(), entity);
-		// 获取类
+		// 获取类
 		Class<? extends EntityModel> entityClass = entity.getClass();
 		if (entityMap.keySet().contains(entityClass)) {
+			if (entityMap.get(entityClass).containsKey(entity.getId())) {
+				entityMap.get(entityClass).remove(entity.getId());
+			}
 			entityMap.get(entityClass).put(entity.getId(), entity);
 		} else {
 			entityMap.put(entityClass, modelMap);