修改部分bug

master
CYZ 3 years ago
parent f9df61bc63
commit 9d787d5eba

@ -20,7 +20,6 @@ import android.Manifest;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.Person;
import android.appwidget.AppWidgetManager;
import android.content.AsyncQueryHandler;
import android.content.ContentResolver;
@ -116,7 +115,7 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
private enum ListEditState {
NOTE_LIST, SUB_FOLDER, CALL_RECORD_FOLDER, PRIVATE_FOLDER, TRASH_FOLDER
};
}
private ListEditState mState;
@ -874,6 +873,10 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
enterPrivateFolder(if_now_create);
}
/*public void clean_All(){
}*/
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
@ -932,6 +935,10 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
restoreDeletedNodes();
break;
}
case R.id.menu_clean_all:{
//clean_All();
break;
}
default:
break;
}
@ -991,7 +998,6 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
builder.show();
}
}
}.execute();
}
@ -1007,8 +1013,9 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
public void saveContentToLocal(String filename, String content) throws Exception{
FileOutputStream output =this.openFileOutput(filename, Context.MODE_PRIVATE);
output.write(content.getBytes());
if (output != null){
try {
output.write(content.getBytes());
}finally {
output.close();
}
}

@ -1,4 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
</menu>
<!-- 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.
-->
<menu
xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/menu_clean_all"
android:title="Empty Trash"/>
</menu>

Loading…
Cancel
Save