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

@@ -43,7 +43,7 @@ public class Sample2NativeCamera 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();
@@ -80,7 +80,7 @@ public class Sample2NativeCamera 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();