Compare commits

..

No commits in common. 'main' and 'dev1' have entirely different histories.
main ... dev1

Binary file not shown.

Binary file not shown.

@ -0,0 +1,37 @@
*.iml
.DS_Store
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Android Studio Navigation editor temp files
.navigation/
# Android Studio captures folder
captures/
# Intellij
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/dictionaries
.idea/libraries
.idea/
# Keystore files
*.jks
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild

@ -1,16 +1,3 @@
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.
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.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@ -188,3 +175,27 @@
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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.

@ -1,3 +1,4 @@
# MiNotes
[中文]
1. MiCode便签是小米便签的社区开源版由MIUI团队(www.miui.com) 发起并贡献第一批代码遵循NOTICE文件所描述的开源协议

@ -0,0 +1,20 @@
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "25.0.1"
defaultConfig {
applicationId "net.micode.notes"
minSdkVersion 14
targetSdkVersion 14
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
android{ useLibrary 'org.apache.http.legacy' }
}

@ -77,8 +77,9 @@ public class GTaskASyncTask extends AsyncTask<Void, String, Integer> {
pendingIntent = PendingIntent.getActivity(mContext, 0, new Intent(mContext,
NotesListActivity.class), 0);
}
notification.setLatestEventInfo(mContext, mContext.getString(R.string.app_name), content,
pendingIntent);
// notification.setLatestEventInfo(mContext, mContext.getString(R.string.app_name), content,
// pendingIntent);
notification.contentIntent = pendingIntent;
mNotifiManager.notify(GTASK_SYNC_NOTIFICATION_ID, notification);
}

@ -870,4 +870,9 @@ public class NoteEditActivity extends Activity implements OnClickListener,
private void showToast(int resId, int duration) {
Toast.makeText(this, resId, duration).show();
}
public void OnOpenMenu(View view) {
openOptionsMenu();
}
}

@ -16,6 +16,7 @@
package net.micode.notes.ui;
import android.R.menu;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
@ -59,7 +60,6 @@ import android.widget.ListView;
import android.widget.PopupMenu;
import android.widget.TextView;
import android.widget.Toast;
import net.micode.notes.R;
import net.micode.notes.data.Notes;
import net.micode.notes.data.Notes.NoteColumns;
@ -104,6 +104,7 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
private ListView mNotesListView;
private Button mAddNewNote;
private Button mMenuSet;
private boolean mDispatch;
@ -223,6 +224,7 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
mAddNewNote = (Button) findViewById(R.id.btn_new_note);
mAddNewNote.setOnClickListener(this);
mAddNewNote.setOnTouchListener(new NewNoteOnTouchListener());
mMenuSet = (Button) findViewById(R.id.btn_set);
mDispatch = false;
mDispatchY = 0;
mOriginY = 0;
@ -234,10 +236,12 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
private class ModeCallback implements ListView.MultiChoiceModeListener, OnMenuItemClickListener {
private DropdownMenu mDropDownMenu;
private ActionMode mActionMode;
private Menu menu;
private MenuItem mMoveMenu;
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
getMenuInflater().inflate(R.menu.note_list_options, menu);
this.menu = menu;
menu.findItem(R.id.delete).setOnMenuItemClickListener(this);
mMoveMenu = menu.findItem(R.id.move);
if (mFocusNoteDataItem.getParentId() == Notes.ID_CALL_RECORD_FOLDER
@ -251,6 +255,7 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
mNotesListAdapter.setChoiceMode(true);
mNotesListView.setLongClickable(false);
mAddNewNote.setVisibility(View.GONE);
mMenuSet.setVisibility(View.GONE);
View customView = LayoutInflater.from(NotesListActivity.this).inflate(
R.layout.note_list_dropdown_menu, null);
@ -298,14 +303,37 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
public void onDestroyActionMode(ActionMode mode) {
mNotesListAdapter.setChoiceMode(false);
mNotesListView.clearChoices();
mNotesListView.setItemChecked(0,true);
mNotesListView.setItemChecked(0,false);
mNotesListView.setLongClickable(true);
System.out.println("-----------------onDestroyActionMode------------------");
mNotesListAdapter.notifyDataSetChanged();
// closeOptionsMenu();
// mNotesListView.invalidate();
mAddNewNote.setVisibility(View.VISIBLE);
mMenuSet.setVisibility(View.VISIBLE);
// mNotesListView.setChoiceMode(ListView.CHOICE_MODE_NONE);
// menu.clear();
// menu.close();
}
public void finishActionMode() {
mActionMode.finish();
mActionMode = null;
mNotesListAdapter.setChoiceMode(false);
mNotesListView.setLongClickable(true);
}
public void onItemCheckedStateChanged(ActionMode mode, int position, long id,
boolean checked) {
mNotesListAdapter.setCheckedItem(position, checked);
@ -346,6 +374,7 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
}
}
private class NewNoteOnTouchListener implements OnTouchListener {
public boolean onTouch(View v, MotionEvent event) {
@ -546,6 +575,7 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
if (data.getId() == Notes.ID_CALL_RECORD_FOLDER) {
mState = ListEditState.CALL_RECORD_FOLDER;
mAddNewNote.setVisibility(View.GONE);
mMenuSet.setVisibility(View.GONE);
} else {
mState = ListEditState.SUB_FOLDER;
}
@ -666,6 +696,8 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
@Override
public void onBackPressed() {
System.out.println("-------onBackPressed---00000");
switch (mState) {
case SUB_FOLDER:
mCurrentFolderId = Notes.ID_ROOT_FOLDER;
@ -677,10 +709,12 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
mCurrentFolderId = Notes.ID_ROOT_FOLDER;
mState = ListEditState.NOTE_LIST;
mAddNewNote.setVisibility(View.VISIBLE);
mMenuSet.setVisibility(View.VISIBLE);
mTitleBar.setVisibility(View.GONE);
startAsyncNotesListQuery();
break;
case NOTE_LIST:
System.out.println("-------onBackPressed---");
super.onBackPressed();
break;
default:
@ -951,4 +985,8 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
}
return false;
}
public void OnOpenMenu(View view) {
openOptionsMenu();
}
}

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save