|
|
|
@ -32,7 +32,7 @@ public abstract class BaseLoaderCallback implements LoaderCallbackInterface { |
|
|
|
|
RestartMessage.setTitle("App restart is required"); |
|
|
|
|
RestartMessage.setMessage("Application will be closed now. Start it when installation will be finished!"); |
|
|
|
|
RestartMessage.setCancelable(false); // This blocks the 'BACK' button
|
|
|
|
|
RestartMessage.setButton("OK", new OnClickListener() { |
|
|
|
|
RestartMessage.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new OnClickListener() { |
|
|
|
|
public void onClick(DialogInterface dialog, int which) { |
|
|
|
|
mAppContext.finish(); |
|
|
|
|
} |
|
|
|
@ -48,7 +48,7 @@ public abstract class BaseLoaderCallback implements LoaderCallbackInterface { |
|
|
|
|
MarketErrorMessage.setTitle("OpenCV Manager"); |
|
|
|
|
MarketErrorMessage.setMessage("Package installation failed!"); |
|
|
|
|
MarketErrorMessage.setCancelable(false); // This blocks the 'BACK' button
|
|
|
|
|
MarketErrorMessage.setButton("OK", new OnClickListener() { |
|
|
|
|
MarketErrorMessage.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new OnClickListener() { |
|
|
|
|
public void onClick(DialogInterface dialog, int which) { |
|
|
|
|
mAppContext.finish(); |
|
|
|
|
} |
|
|
|
@ -69,7 +69,7 @@ public abstract class BaseLoaderCallback implements LoaderCallbackInterface { |
|
|
|
|
IncomatibilityMessage.setTitle("OpenCV Manager"); |
|
|
|
|
IncomatibilityMessage.setMessage("OpenCV Manager service is incompatible with this app. Update it!"); |
|
|
|
|
IncomatibilityMessage.setCancelable(false); // This blocks the 'BACK' button
|
|
|
|
|
IncomatibilityMessage.setButton("OK", new OnClickListener() { |
|
|
|
|
IncomatibilityMessage.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new OnClickListener() { |
|
|
|
|
public void onClick(DialogInterface dialog, int which) { |
|
|
|
|
mAppContext.finish(); |
|
|
|
|
} |
|
|
|
@ -84,7 +84,7 @@ public abstract class BaseLoaderCallback implements LoaderCallbackInterface { |
|
|
|
|
InitFailedDialog.setTitle("OpenCV error"); |
|
|
|
|
InitFailedDialog.setMessage("OpenCV was not initialised correctly. Application will be shut down"); |
|
|
|
|
InitFailedDialog.setCancelable(false); // This blocks the 'BACK' button
|
|
|
|
|
InitFailedDialog.setButton("OK", new OnClickListener() { |
|
|
|
|
InitFailedDialog.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new OnClickListener() { |
|
|
|
|
|
|
|
|
|
public void onClick(DialogInterface dialog, int which) { |
|
|
|
|
mAppContext.finish(); |
|
|
|
@ -102,7 +102,7 @@ public abstract class BaseLoaderCallback implements LoaderCallbackInterface { |
|
|
|
|
InstallMessage.setTitle("Package not found"); |
|
|
|
|
InstallMessage.setMessage(callback.getPackageName() + " package was not found! Try to install it?"); |
|
|
|
|
InstallMessage.setCancelable(false); // This blocks the 'BACK' button
|
|
|
|
|
InstallMessage.setButton("Yes", new OnClickListener() |
|
|
|
|
InstallMessage.setButton(AlertDialog.BUTTON_POSITIVE, "Yes", new OnClickListener() |
|
|
|
|
{ |
|
|
|
|
public void onClick(DialogInterface dialog, int which) |
|
|
|
|
{ |
|
|
|
@ -110,7 +110,7 @@ public abstract class BaseLoaderCallback implements LoaderCallbackInterface { |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
InstallMessage.setButton2("No", new OnClickListener() { |
|
|
|
|
InstallMessage.setButton(AlertDialog.BUTTON_NEGATIVE, "No", new OnClickListener() { |
|
|
|
|
|
|
|
|
|
public void onClick(DialogInterface dialog, int which) |
|
|
|
|
{ |
|
|
|
|