|
|
|
@ -174,10 +174,10 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
|
|
|
|
|
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
|
|
|
|
context = NotesListActivity.this;
|
|
|
|
|
switch (requestCode) {
|
|
|
|
|
case 1:
|
|
|
|
|
case 3:
|
|
|
|
|
if (resultCode == RESULT_OK) {
|
|
|
|
|
if (Build.VERSION.SDK_INT >= 19) {
|
|
|
|
|
handeImage(data);
|
|
|
|
|
handelImage(data);
|
|
|
|
|
} else {
|
|
|
|
|
handleImageBefor(data);
|
|
|
|
|
}
|
|
|
|
@ -586,7 +586,7 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
|
|
|
|
|
private void openFolder(NoteItemData data) {
|
|
|
|
|
mCurrentFolderId = data.getId();
|
|
|
|
|
String iddd = Long.toString(mCurrentFolderId);
|
|
|
|
|
Log.i(TAG, iddd);
|
|
|
|
|
//Log.i(TAG, iddd);
|
|
|
|
|
startAsyncNotesListQuery();
|
|
|
|
|
if (data.getId() == Notes.ID_CALL_RECORD_FOLDER) {
|
|
|
|
|
mState = ListEditState.CALL_RECORD_FOLDER;
|
|
|
|
@ -840,7 +840,6 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
|
|
|
|
|
public void ResetPassword(){
|
|
|
|
|
String if_now_create = "true";
|
|
|
|
|
enterPrivateFolder(if_now_create);
|
|
|
|
|
Log.i(TAG, "ResetPassword: 11111111111111111111111111111");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -1015,7 +1014,6 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
|
|
|
|
|
showSoftInput();
|
|
|
|
|
if (create.equals("false")){
|
|
|
|
|
builder.setTitle("enter the password");
|
|
|
|
|
//Log.i(TAG, "enterPrivateFolder: 111");
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
builder.setTitle("set the password for the Private Folder");
|
|
|
|
@ -1107,7 +1105,6 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
|
|
|
|
|
if (item.getType() == Notes.TYPE_FOLDER
|
|
|
|
|
|| item.getType() == Notes.TYPE_SYSTEM) {
|
|
|
|
|
openFolder(item);
|
|
|
|
|
Log.i(TAG, "onItemClick: 1");
|
|
|
|
|
} else if (item.getType() == Notes.TYPE_NOTE) {
|
|
|
|
|
openNode(item);
|
|
|
|
|
} else {
|
|
|
|
@ -1198,7 +1195,7 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void handeImage(Intent data) {
|
|
|
|
|
private void handelImage(Intent data) {
|
|
|
|
|
String imagePath = null;
|
|
|
|
|
Uri uri2 = data.getData();
|
|
|
|
|
if (DocumentsContract.isDocumentUri(this, uri2)) {
|
|
|
|
@ -1216,13 +1213,13 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
|
|
|
|
|
} else if ("file".equalsIgnoreCase(uri2.getScheme())) {
|
|
|
|
|
imagePath = uri2.getPath();
|
|
|
|
|
}
|
|
|
|
|
displayIaage(imagePath);
|
|
|
|
|
displayImage(imagePath);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void handleImageBefor(Intent data) {
|
|
|
|
|
Uri uri = data.getData();
|
|
|
|
|
String imagePath = getImagePath(uri, null);
|
|
|
|
|
displayIaage(imagePath);
|
|
|
|
|
displayImage(imagePath);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private String getImagePath(Uri uri, String selection) {
|
|
|
|
@ -1237,10 +1234,9 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
|
|
|
|
|
return path;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void displayIaage(String path) {
|
|
|
|
|
private void displayImage(String path) {
|
|
|
|
|
if (path != null) {
|
|
|
|
|
Bitmap bitmap = BitmapFactory.decodeFile(path);
|
|
|
|
|
//imageView.setImageBitmap(bitmap);
|
|
|
|
|
Drawable drawable = new BitmapDrawable(bitmap);
|
|
|
|
|
Toast.makeText(context, " 获取图片", Toast.LENGTH_SHORT).show();
|
|
|
|
|
getWindow().setBackgroundDrawable(drawable);
|
|
|
|
|