List of usage examples for android.app ProgressDialog getButton
public Button getButton(int whichButton)
From source file:tv.loilo.promise.samples.progress.SampleProgressSpinnerDialogFragment.java
@Override public void onStart() { super.onStart(); final ProgressDialog progressDialog = (ProgressDialog) getDialog(); progressDialog.getButton(DialogInterface.BUTTON_NEGATIVE).setOnClickListener(new View.OnClickListener() { @Override/* www . j av a 2 s .c o m*/ public void onClick(View v) { PromiseLoader.cancelLoader(getLoaderManager(), LOADER_ID); } }); }
From source file:tv.loilo.promise.samples.progress.SampleProgressBarDialogFragment.java
@Override public void onStart() { super.onStart(); mIsStarted = true;//w ww . j av a2 s. c om final ProgressDialog progressDialog = (ProgressDialog) getDialog(); progressDialog.getButton(DialogInterface.BUTTON_NEGATIVE).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { ProgressPromiseLoader.cancelLoader(getLoaderManager(), LOADER_ID); } }); ProgressPromiseLoader.attachProgressCallback(getLoaderManager(), LOADER_ID, mLoaderCallbacks); }