|
@ -534,25 +534,6 @@ public class FragmentCompose extends FragmentEx { |
|
|
return intent; |
|
|
return intent; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void handleExit() { |
|
|
|
|
|
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED)) |
|
|
|
|
|
new DialogBuilderLifecycle(getContext(), getViewLifecycleOwner()) |
|
|
|
|
|
.setMessage(R.string.title_ask_delete) |
|
|
|
|
|
.setPositiveButton(R.string.title_yes, new DialogInterface.OnClickListener() { |
|
|
|
|
|
@Override |
|
|
|
|
|
public void onClick(DialogInterface dialog, int which) { |
|
|
|
|
|
onAction(R.id.action_delete); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
.setNegativeButton(R.string.title_no, new DialogInterface.OnClickListener() { |
|
|
|
|
|
@Override |
|
|
|
|
|
public void onClick(DialogInterface dialog, int which) { |
|
|
|
|
|
finish(); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
.show(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void handlePickContact(int requestCode, Intent data) { |
|
|
private void handlePickContact(int requestCode, Intent data) { |
|
|
Cursor cursor = null; |
|
|
Cursor cursor = null; |
|
|
try { |
|
|
try { |
|
@ -641,6 +622,25 @@ public class FragmentCompose extends FragmentEx { |
|
|
}.load(this, args); |
|
|
}.load(this, args); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void handleExit() { |
|
|
|
|
|
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED)) |
|
|
|
|
|
new DialogBuilderLifecycle(getContext(), getViewLifecycleOwner()) |
|
|
|
|
|
.setMessage(R.string.title_ask_delete) |
|
|
|
|
|
.setPositiveButton(R.string.title_yes, new DialogInterface.OnClickListener() { |
|
|
|
|
|
@Override |
|
|
|
|
|
public void onClick(DialogInterface dialog, int which) { |
|
|
|
|
|
onAction(R.id.action_delete); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
.setNegativeButton(R.string.title_no, new DialogInterface.OnClickListener() { |
|
|
|
|
|
@Override |
|
|
|
|
|
public void onClick(DialogInterface dialog, int which) { |
|
|
|
|
|
finish(); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
.show(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
private void onAction(int action) { |
|
|
private void onAction(int action) { |
|
|
Helper.setViewsEnabled(view, false); |
|
|
Helper.setViewsEnabled(view, false); |
|
|
getActivity().invalidateOptionsMenu(); |
|
|
getActivity().invalidateOptionsMenu(); |
|
|