master
liuwang 2 years ago
parent 97a73789b4
commit b34607cf22

@ -80,7 +80,7 @@ import java.util.HashSet;
public class NotesListActivity extends Activity implements OnClickListener, OnItemLongClickListener {
private static final int FOLDER_NOTE_LIST_QUERY_TOKEN = 0;
private int mode=-1;
private static final int FOLDER_LIST_QUERY_TOKEN = 1;
private static final int MENU_FOLDER_DELETE = 0;
@ -141,6 +141,7 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
super.onCreate(savedInstanceState);
setContentView(R.layout.note_list);
initResources();
getWindow().setBackgroundDrawableResource(R.drawable.bamboo);
/**
* Insert an introduction when user firstly use this application
@ -809,12 +810,35 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
} else {
Log.e(TAG, "Wrong state:" + mState);
}
if(mode==-1){
menu.findItem(R.id.menu_bamboo).setVisible(false);
} else if (mode==0) {
menu.findItem(R.id.menu_flower).setVisible(false);
} else if (mode==1) {
menu.findItem(R.id.menu_miniyellow).setVisible(false);
}
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.menu_bamboo:{
mode = -1;
getWindow().setBackgroundDrawableResource(R.drawable.bamboo);
break;
}
case R.id.menu_flower:{
mode = 0;
getWindow().setBackgroundDrawableResource(R.drawable.flower);
break;
}
case R.id.menu_miniyellow:{
mode = 1;
getWindow().setBackgroundDrawableResource(R.drawable.miniyellow);
break;
}
case R.id.menu_new_folder: {
showCreateOrModifyFolderDialog(true);
break;

Binary file not shown.

After

Width:  |  Height:  |  Size: 538 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 KiB

@ -18,8 +18,8 @@
<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">
android:layout_height="fill_parent">
<!-- android:background="@drawable/list_background">-->
<LinearLayout
android:layout_width="fill_parent"

@ -36,4 +36,13 @@
<item
android:id="@+id/menu_search"
android:title="@string/menu_search"/>
<item
android:id="@+id/menu_bamboo"
android:title="@string/menu_bamboo"/>
<item
android:id="@+id/menu_miniyellow"
android:title="@string/menu_miniyellow"/>
<item
android:id="@+id/menu_flower"
android:title="@string/menu_flower"/>
</menu>

@ -39,6 +39,11 @@
<string name="file_path">/MIUI/notes/</string>
<string name="file_name_txt_format">notes_%s.txt</string>
<!-- notes list string -->
<string name="menu_flower">Background:flower</string>
<string name="menu_bamboo">Background:bamboo</string>
<string name="menu_miniyellow">Background:miniyellow</string>
<string name="format_folder_files_count">(%d)</string>
<string name="menu_create_folder">New Folder</string>
<string name="menu_export_text">Export text</string>

Loading…
Cancel
Save