use of android.app.AlertDialog.Builder in project Conversations by siacs.
the class XmppActivity method warnMutalPresenceSubscription.
private void warnMutalPresenceSubscription(final Conversation conversation, final OnPresenceSelected listener) {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(conversation.getContact().getJid().toString());
builder.setMessage(R.string.without_mutual_presence_updates);
builder.setNegativeButton(R.string.cancel, null);
builder.setPositiveButton(R.string.ignore, new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
conversation.setNextCounterpart(null);
if (listener != null) {
listener.onPresenceSelected();
}
}
});
builder.create().show();
}
use of android.app.AlertDialog.Builder in project Conversations by siacs.
the class EditAccountActivity method showPassword.
private void showPassword() {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
View view = getLayoutInflater().inflate(R.layout.dialog_show_password, null);
TextView password = (TextView) view.findViewById(R.id.password);
password.setText(mAccount.getPassword());
builder.setTitle(R.string.password);
builder.setView(view);
builder.setPositiveButton(R.string.cancel, null);
builder.create().show();
}
use of android.app.AlertDialog.Builder in project platform_frameworks_base by android.
the class TileAdapter method showAccessibilityDialog.
private void showAccessibilityDialog(final int position, final View v) {
final TileInfo info = mTiles.get(position);
CharSequence[] options = new CharSequence[] { mContext.getString(R.string.accessibility_qs_edit_move_tile, info.state.label), mContext.getString(R.string.accessibility_qs_edit_remove_tile, info.state.label) };
AlertDialog dialog = new Builder(mContext).setItems(options, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (which == 0) {
startAccessibleDrag(position);
} else {
move(position, info.isSystem ? mEditIndex : mTileDividerIndex, v);
notifyItemChanged(mTileDividerIndex);
notifyDataSetChanged();
}
}
}).setNegativeButton(android.R.string.cancel, null).create();
SystemUIDialog.setShowForAllUsers(dialog, true);
SystemUIDialog.applyFlags(dialog);
dialog.show();
}
use of android.app.AlertDialog.Builder in project facebook-api-android-maven by avianey.
the class Util method showAlert.
/**
* Display a simple alert dialog with the given text and title.
*
* @param context
* Android context in which the dialog should be displayed
* @param title
* Alert dialog title
* @param text
* Alert dialog message
*/
@Deprecated
public static void showAlert(Context context, String title, String text) {
Builder alertBuilder = new Builder(context);
alertBuilder.setTitle(title);
alertBuilder.setMessage(text);
alertBuilder.create().show();
}
use of android.app.AlertDialog.Builder in project android_frameworks_base by DirtyUnicorns.
the class ResolverTargetActionsDialogFragment method onCreateDialog.
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
final Bundle args = getArguments();
final int itemRes = args.getBoolean(PINNED_KEY, false) ? R.array.resolver_target_actions_unpin : R.array.resolver_target_actions_pin;
return new Builder(getContext()).setCancelable(true).setItems(itemRes, this).setTitle(args.getCharSequence(TITLE_KEY)).create();
}
Aggregations