use of android.app.DialogFragment in project k-9 by k9mail.
the class MessageListFragment method showDialog.
private void showDialog(int dialogId) {
DialogFragment fragment;
switch(dialogId) {
case R.id.dialog_confirm_spam:
{
String title = getString(R.string.dialog_confirm_spam_title);
int selectionSize = activeMessages.size();
String message = getResources().getQuantityString(R.plurals.dialog_confirm_spam_message, selectionSize, selectionSize);
String confirmText = getString(R.string.dialog_confirm_spam_confirm_button);
String cancelText = getString(R.string.dialog_confirm_spam_cancel_button);
fragment = ConfirmationDialogFragment.newInstance(dialogId, title, message, confirmText, cancelText);
break;
}
case R.id.dialog_confirm_delete:
{
String title = getString(R.string.dialog_confirm_delete_title);
int selectionSize = activeMessages.size();
String message = getResources().getQuantityString(R.plurals.dialog_confirm_delete_messages, selectionSize, selectionSize);
String confirmText = getString(R.string.dialog_confirm_delete_confirm_button);
String cancelText = getString(R.string.dialog_confirm_delete_cancel_button);
fragment = ConfirmationDialogFragment.newInstance(dialogId, title, message, confirmText, cancelText);
break;
}
case R.id.dialog_confirm_mark_all_as_read:
{
String title = getString(R.string.dialog_confirm_mark_all_as_read_title);
String message = getString(R.string.dialog_confirm_mark_all_as_read_message);
String confirmText = getString(R.string.dialog_confirm_mark_all_as_read_confirm_button);
String cancelText = getString(R.string.dialog_confirm_mark_all_as_read_cancel_button);
fragment = ConfirmationDialogFragment.newInstance(dialogId, title, message, confirmText, cancelText);
break;
}
default:
{
throw new RuntimeException("Called showDialog(int) with unknown dialog id.");
}
}
fragment.setTargetFragment(this, dialogId);
fragment.show(getFragmentManager(), getDialogTag(dialogId));
}
use of android.app.DialogFragment in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class InputMethodsSettings method showDialogInner.
private void showDialogInner(int id) {
DialogFragment newFragment = MyAlertDialogFragment.newInstance(id);
newFragment.setTargetFragment(this, 0);
newFragment.show(getFragmentManager(), "dialog " + id);
}
use of android.app.DialogFragment in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class ActionListViewSettings method showDialogInner.
private void showDialogInner(int id, int which, boolean longpress, boolean newAction) {
DialogFragment newFragment = MyAlertDialogFragment.newInstance(id, which, longpress, newAction);
newFragment.setTargetFragment(this, 0);
newFragment.show(getFragmentManager(), "dialog " + id);
}
use of android.app.DialogFragment in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class PieColor method showDialogInner.
private void showDialogInner(int id) {
DialogFragment newFragment = MyAlertDialogFragment.newInstance(id);
newFragment.setTargetFragment(this, 0);
newFragment.show(getFragmentManager(), "dialog " + id);
}
use of android.app.DialogFragment in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class BlurPersonalizations method showDialogInner.
private void showDialogInner(int id) {
DialogFragment newFragment = MyAlertDialogFragment.newInstance(id);
newFragment.setTargetFragment(this, 0);
newFragment.show(getFragmentManager(), "dialog " + id);
}
Aggregations