removing warnings on deprecated api when targeting to android-15+

This commit is contained in:
Andrey Pavlenko
2012-07-14 19:07:27 +00:00
parent a2430afcac
commit 4e4db94b6b
10 changed files with 23 additions and 23 deletions

View File

@@ -36,7 +36,7 @@ public class Sample1Java extends Activity {
AlertDialog ad = new AlertDialog.Builder(mAppContext).create();
ad.setCancelable(false); // This blocks the 'BACK' button
ad.setMessage("Fatal error: can't open camera!");
ad.setButton("OK", new DialogInterface.OnClickListener() {
ad.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
finish();
@@ -73,7 +73,7 @@ public class Sample1Java extends Activity {
AlertDialog ad = new AlertDialog.Builder(this).create();
ad.setCancelable(false); // This blocks the 'BACK' button
ad.setMessage("Fatal error: can't open camera!");
ad.setButton("OK", new DialogInterface.OnClickListener() {
ad.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
finish();