am 74ec1a8d: am a85567e5: Merge "Fix progress spinner dialog in ApiDemos" into lmp-dev

* commit '74ec1a8dea99c3d3a0c53ab1dde3b9bbfe611434':
  Fix progress spinner dialog in ApiDemos
This commit is contained in:
Alan Viverette
2014-09-11 17:26:43 +00:00
committed by Android Git Automerger

View File

@@ -231,20 +231,6 @@ public class AlertDialogSamples extends Activity {
mProgressSpinnerDialog = new ProgressDialog(AlertDialogSamples.this); mProgressSpinnerDialog = new ProgressDialog(AlertDialogSamples.this);
mProgressSpinnerDialog.setTitle(R.string.select_dialog); mProgressSpinnerDialog.setTitle(R.string.select_dialog);
mProgressSpinnerDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); 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; return mProgressSpinnerDialog;
case DIALOG_SINGLE_CHOICE: case DIALOG_SINGLE_CHOICE:
return new AlertDialog.Builder(AlertDialogSamples.this) return new AlertDialog.Builder(AlertDialogSamples.this)
@@ -399,7 +385,7 @@ public class AlertDialogSamples extends Activity {
/* Display a custom progress bar */ /* Display a custom progress bar */
Button progressSpinnerButton = (Button) findViewById(R.id.progress_spinner_button); Button progressSpinnerButton = (Button) findViewById(R.id.progress_spinner_button);
progressButton.setOnClickListener(new OnClickListener() { progressSpinnerButton.setOnClickListener(new OnClickListener() {
public void onClick(View v) { public void onClick(View v) {
showDialog(DIALOG_PROGRESS_SPINNER); showDialog(DIALOG_PROGRESS_SPINNER);
} }