MCPcopy Create free account
hub / github.com/buggins/coolreader / askConfirmation

Method askConfirmation

android/src/org/coolreader/CoolReader.java:2073–2087  ·  view source on GitHub ↗
(int questionResourceId, final Runnable action)

Source from the content-addressed store, hash-verified

2071 }
2072
2073 public void askConfirmation(int questionResourceId, final Runnable action) {
2074 AlertDialog.Builder dlg = new AlertDialog.Builder(this);
2075 dlg.setTitle(questionResourceId);
2076 dlg.setPositiveButton(R.string.dlg_button_ok, new OnClickListener() {
2077 public void onClick(DialogInterface arg0, int arg1) {
2078 action.run();
2079 }
2080 });
2081 dlg.setNegativeButton(R.string.dlg_button_cancel, new OnClickListener() {
2082 public void onClick(DialogInterface arg0, int arg1) {
2083 // do nothing
2084 }
2085 });
2086 dlg.show();
2087 }
2088
2089 //==============================================================
2090 //

Callers 3

askDeleteBookMethod · 0.80
askDeleteRecentMethod · 0.80
askDeleteCatalogMethod · 0.80

Calls 2

setTitleMethod · 0.45
showMethod · 0.45

Tested by

no test coverage detected