Fix progress spinner dialog in ApiDemos

BUG: 17446820
Change-Id: If6201e4483a5102d0f1567a36d1edf70392d5b8f
This commit is contained in:
Alan Viverette
2014-09-09 18:20:08 -07:00
parent 72e4885cb6
commit bbb85f6351

View File

@@ -231,20 +231,6 @@ public class AlertDialogSamples extends Activity {
mProgressSpinnerDialog = new ProgressDialog(AlertDialogSamples.this);
mProgressSpinnerDialog.setTitle(R.string.select_dialog);
mProgressSpinnerDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
mProgressSpinnerDialog.setButton(DialogInterface.BUTTON_POSITIVE,
getText(R.string.alert_dialog_hide), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
/* User clicked Yes so do some stuff */
}
});
mProgressSpinnerDialog.setButton(DialogInterface.BUTTON_NEGATIVE,
getText(R.string.alert_dialog_cancel), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
/* User clicked No so do some stuff */
}
});
return mProgressSpinnerDialog;
case DIALOG_SINGLE_CHOICE:
return new AlertDialog.Builder(AlertDialogSamples.this)
@@ -399,7 +385,7 @@ public class AlertDialogSamples extends Activity {
/* Display a custom progress bar */
Button progressSpinnerButton = (Button) findViewById(R.id.progress_spinner_button);
progressButton.setOnClickListener(new OnClickListener() {
progressSpinnerButton.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
showDialog(DIALOG_PROGRESS_SPINNER);
}