List of usage examples for android.app AlertDialog.Builder show
public void show()
From source file:com.thanu.schoolbustracker.RouteActivity.java
@Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.menu_legalnotices: String LicenseInfo = GooglePlayServicesUtil.getOpenSourceSoftwareLicenseInfo(getApplicationContext()); AlertDialog.Builder LicenseDialog = new AlertDialog.Builder(RouteActivity.this); LicenseDialog.setTitle("Legal Notices"); LicenseDialog.setMessage(LicenseInfo); LicenseDialog.show(); return true; }//from www .j a va 2 s . c o m return super.onOptionsItemSelected(item); }
From source file:com.restswitch.controlpanel.MainActivity.java
private void alertInfo(String msg) { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("Information"); builder.setMessage(msg);/*from ww w. ja v a 2 s. c om*/ builder.setNeutralButton("OK", null); builder.setIcon(android.R.drawable.ic_dialog_info); builder.show(); }
From source file:com.jdom.get.stuff.done.android.AndroidApplicationContextFactory.java
public void displayAlert(String arg0) { AlertDialog.Builder builder = new AlertDialog.Builder(activity); builder.setCancelable(false).setPositiveButton(OK_BUTTON_TEXT, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.dismiss();/*from www . ja v a 2s . c o m*/ } }).setMessage(arg0); builder.show(); }
From source file:com.eTilbudsavis.sdkdemo.CatalogViewer.java
private void dialog(String title, String message) { AlertDialog.Builder b = new Builder(CatalogViewer.this); b.setTitle(title);/* ww w .jav a 2s .co m*/ b.setMessage(message); b.setPositiveButton("OK", new OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); } }); b.show(); }
From source file:com.mobage.air.extension.AlertDialog_show.java
@Override public FREObject call(final FREContext context, FREObject[] args) { ArgsParser parser = new ArgsParser(args); HashMap<String, String> opts = parser.nextKeyValueMap(); final String onClickId = parser.nextString(); @SuppressWarnings("unused") final String onErrorId = parser.nextString(); parser.finish();/*from ww w . j a v a2 s .c o m*/ AlertDialog.Builder builder = new AlertDialog.Builder(context.getActivity()); builder.setTitle(opts.get("title")); builder.setMessage(opts.get("message")); builder.setPositiveButton("OK", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { JSONArray args = new JSONArray(); args.put(which); Dispatcher.dispatch(context, onClickId, args); } }); builder.show(); return null; }
From source file:com.loopj.android.http.sample.CustomCASample.java
/** * Displays a dialog showing contents of `custom_ca.txt` file from assets. * This is needed to avoid Lint's strict mode. */// ww w . j ava2 s . c o m private void showCustomCAHelp() { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle(R.string.title_custom_ca); builder.setMessage(getReadmeText()); builder.setNeutralButton(android.R.string.cancel, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); } }); builder.show(); }
From source file:com.chaosinmotion.securechat.fragments.LoginAccount.java
private void displayError() { AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); builder.setMessage(R.string.login_error_message); builder.setTitle(R.string.login_error_title); builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { @Override//from ww w . jav a2 s . c o m public void onClick(DialogInterface dialog, int which) { // Ignore } }); builder.show(); return; }
From source file:appathon.history.PickerActivity.java
private void onError(String error, final boolean finishActivity) { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("error_dialog_title").setMessage(error).setPositiveButton("error_dialog_button_text", new DialogInterface.OnClickListener() { @Override// w w w .ja v a 2 s.c o m public void onClick(DialogInterface dialogInterface, int i) { if (finishActivity) { finishActivity(); } } }); builder.show(); }
From source file:es.rczone.tutoriales.gmaps.MainActivity.java
private void showLegalNotice() { String LicenseInfo = GooglePlayServicesUtil.getOpenSourceSoftwareLicenseInfo(this); AlertDialog.Builder LicenseDialog = new AlertDialog.Builder(this); LicenseDialog.setTitle("Legal Notices"); LicenseDialog.setMessage(LicenseInfo); LicenseDialog.show(); }
From source file:com.example.okano.simpleroutesearch.MapsActivity.java
public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case MENU_A://from ww w. j a v a 2s . c o m showMapInfo(); //show_mapInfo(); return true; case MENU_B: //Legal Notices(?) String LicenseInfo = GooglePlayServicesUtil.getOpenSourceSoftwareLicenseInfo(getApplicationContext()); AlertDialog.Builder LicenseDialog = new AlertDialog.Builder(MapsActivity.this); LicenseDialog.setTitle("Legal Notices"); LicenseDialog.setMessage(LicenseInfo); LicenseDialog.show(); return true; case MENU_c: //show_settings(); return true; } return false; }