本文整理了Java中android.app.ProgressDialog.isIndeterminate()
方法的一些代码示例,展示了ProgressDialog.isIndeterminate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ProgressDialog.isIndeterminate()
方法的具体详情如下:
包路径:android.app.ProgressDialog
类名称:ProgressDialog
方法名:isIndeterminate
暂无
代码示例来源:origin: square/assertj-android
public ProgressDialogAssert isIndeterminate() {
isNotNull();
assertThat(actual.isIndeterminate()) //
.overridingErrorMessage("Expected to be indeterminate but was determinate.") //
.isTrue();
return this;
}
代码示例来源:origin: square/assertj-android
public ProgressDialogAssert isDeterminate() {
isNotNull();
assertThat(actual.isIndeterminate()) //
.overridingErrorMessage("Expected to be determinate but was indeterminate.") //
.isFalse();
return this;
}
}
代码示例来源:origin: robolectric/robolectric
@Test
public void shouldSetIndeterminate() {
assertThat(dialog.isIndeterminate()).isFalse();
dialog.setIndeterminate(true);
assertThat(dialog.isIndeterminate()).isTrue();
dialog.setIndeterminate(false);
assertThat(dialog.isIndeterminate()).isFalse();
}
代码示例来源:origin: stackoverflow.com
ProgressDialog progress = ProgressDialog.show(LoginScreen.this, "Downloading Users", "Please wait while users are downloaded");
@Override
protected void onPreExecute()
{
progress.setCancelable(false);
progress.isIndeterminate();
progress.show();
}
代码示例来源:origin: qqq3/good-weather
@NonNull
protected ProgressDialog getProgressDialog() {
ProgressDialog dialog = new ProgressDialog(this);
dialog.isIndeterminate();
dialog.setMessage(getString(R.string.load_progress));
dialog.setCancelable(false);
return dialog;
}
代码示例来源:origin: stackoverflow.com
public class GetUsersTask extends AsyncTask<Void, Void, Void> {
ProgressDialog progress = ProgressDialog.show(LoginScreen.this, "Downloading Users", "Please wait while users are downloaded");
// you can create it here
@Override
protected void onPreExecute()
{
// show it here like so
progress.setCancelable(false);
progress.isIndeterminate();
progress.show();
}
@Override
protected void onPostExecute(Void result) {
// and dismiss it here
progress.dismiss();
}
}
@Override
protected void onProgressUpdate(Void... values) {
// can update the ProgressBar here if you need to
}
@Override
protected Void doInBackground(Void... params) {
...
}
代码示例来源:origin: thuryn/your-local-weather
@NonNull
protected ProgressDialog getProgressDialog() {
ProgressDialog dialog = new ProgressDialog(this);
dialog.isIndeterminate();
dialog.setMessage(getString(R.string.load_progress));
dialog.setCancelable(false);
return dialog;
}
代码示例来源:origin: stackoverflow.com
ProgressDialog progress = (ProgressDialog) new ProgressDialog(context);
progress.isIndeterminate();
progress.setTitle("Map setup");
progress.setCancelable(false);
progress.setMessage("Wait a second while map is prepared");
progress.show();
代码示例来源:origin: com.squareup.assertj/assertj-android
public ProgressDialogAssert isDeterminate() {
isNotNull();
assertThat(actual.isIndeterminate()) //
.overridingErrorMessage("Expected to be determinate but was indeterminate.") //
.isFalse();
return this;
}
}
代码示例来源:origin: com.squareup.assertj/assertj-android
public ProgressDialogAssert isIndeterminate() {
isNotNull();
assertThat(actual.isIndeterminate()) //
.overridingErrorMessage("Expected to be indeterminate but was determinate.") //
.isTrue();
return this;
}
代码示例来源:origin: stackoverflow.com
pDialog = new ProgressDialog(SingleMenuItemActivity.this);
pDialog.setMessage("Please Wait ...");
pDialog.isIndeterminate();
pDialog.setCancelable(false);
pDialog.show();
代码示例来源:origin: stackoverflow.com
public class loadTotalMemberByBranch extends AsyncTask<Void, Void,Void> {
ProgressDialog progressDialog = new ProgressDialog(Login.this);
int ranSucess=0;
@Override
protected void onPreExecute() {
// TODO Auto-generated method stub
super.onPreExecute();
progressDialog.setTitle("");
progressDialog.isIndeterminate();
progressDialog.setCancelable(false);
progressDialog.show();
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_NOSENSOR);
}
@Override
protected Void doInBackground(Void... params) {
// TODO Auto-generated method stub
return null;
}
@Override
protected void onPostExecute(Void result) {
// TODO Auto-generated method stub
super.onPostExecute(result);
progressDialog.dismiss();
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_NOSENSOR);
}
}
代码示例来源:origin: Microsoft/AppCenter-SDK-Android
@Override
public Void answer(InvocationOnMock invocation) {
when(mProgressDialog.isIndeterminate()).thenReturn((Boolean) invocation.getArguments()[0]);
return null;
}
}).when(mProgressDialog).setIndeterminate(anyBoolean());
代码示例来源:origin: stackoverflow.com
dialog.setCancelable(true);
dialog.setMessage("Loading..");
dialog.isIndeterminate();
dialog.show();
代码示例来源:origin: Microsoft/AppCenter-SDK-Android
/**
* Update progress dialog for mandatory update.
*/
synchronized void updateProgressDialog(ReleaseDetails releaseDetails, DownloadProgress downloadProgress) {
/* If not canceled and U.I. context did not change. */
if (releaseDetails == mReleaseDetails && mProgressDialog != null) {
/* If file size is known update downloadProgress bar. */
if (downloadProgress.getTotalSize() >= 0) {
/* When we switch from indeterminate to determinate */
if (mProgressDialog.isIndeterminate()) {
/* Configure the progress dialog determinate style. */
mProgressDialog.setProgressPercentFormat(NumberFormat.getPercentInstance());
mProgressDialog.setProgressNumberFormat(mForegroundActivity.getString(R.string.appcenter_distribute_download_progress_number_format));
mProgressDialog.setIndeterminate(false);
mProgressDialog.setMax((int) (downloadProgress.getTotalSize() / MEBIBYTE_IN_BYTES));
}
mProgressDialog.setProgress((int) (downloadProgress.getCurrentSize() / MEBIBYTE_IN_BYTES));
}
/* And schedule the next check. */
HandlerUtils.getMainHandler().postAtTime(new Runnable() {
@Override
public void run() {
checkDownload(mContext, DistributeUtils.getStoredDownloadId(), true);
}
}, HANDLER_TOKEN_CHECK_PROGRESS, SystemClock.uptimeMillis() + CHECK_PROGRESS_TIME_INTERVAL_IN_MILLIS);
}
}
内容来源于网络,如有侵权,请联系作者删除!