本文整理了Java中android.app.ProgressDialog.getMax()
方法的一些代码示例,展示了ProgressDialog.getMax()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ProgressDialog.getMax()
方法的具体详情如下:
包路径:android.app.ProgressDialog
类名称:ProgressDialog
方法名:getMax
暂无
代码示例来源:origin: square/assertj-android
public ProgressDialogAssert hasMax(int max) {
isNotNull();
int actualMax = actual.getMax();
assertThat(actualMax) //
.overridingErrorMessage("Expected max <%s> but was <%s>.", max, actualMax) //
.isEqualTo(max);
return this;
}
代码示例来源:origin: WVector/AppUpdate
public static void setProgress(long current) {
if (sHorizontalProgressDialog == null) {
return;
}
sHorizontalProgressDialog.setProgress(((int) current) / (1024 * 1024));
if (sHorizontalProgressDialog.getProgress() >= sHorizontalProgressDialog.getMax()) {
sHorizontalProgressDialog.dismiss();
sHorizontalProgressDialog = null;
}
}
代码示例来源:origin: WVector/AppUpdate
public static void setProgress(int current) {
if (sHorizontalProgressDialog == null) {
return;
}
sHorizontalProgressDialog.setProgress(current);
if (sHorizontalProgressDialog.getProgress() >= sHorizontalProgressDialog.getMax()) {
sHorizontalProgressDialog.dismiss();
sHorizontalProgressDialog = null;
}
}
代码示例来源:origin: androidquery/androidquery
public void done(){
if(pb != null){
pb.setProgress(pb.getMax());
}
if(pd != null){
pd.setProgress(pd.getMax());
}
if(act != null){
act.setProgress(9999);
}
}
代码示例来源:origin: WVector/AppUpdate
public static void onLoading(long total, long current) {
if (sHorizontalProgressDialog == null) {
return;
}
if (current == 0) {
sHorizontalProgressDialog.setMax(((int) total) / (1024 * 1024));
}
sHorizontalProgressDialog.setProgress(((int) current) / (1024 * 1024));
if (sHorizontalProgressDialog.getProgress() >= sHorizontalProgressDialog.getMax()) {
sHorizontalProgressDialog.dismiss();
sHorizontalProgressDialog = null;
}
}
}
代码示例来源:origin: robolectric/robolectric
@Test
public void shouldSetMax() {
assertThat(dialog.getMax()).isEqualTo(0);
dialog.setMax(41);
assertThat(dialog.getMax()).isEqualTo(41);
}
代码示例来源:origin: stackoverflow.com
if(mProgressDialog.getProgress()==mProgressDialog.getMax()){
mProgressDialog.dismiss();
Toast.makeText(fa, "File Downloaded", Toast.LENGTH_SHORT).show();
代码示例来源:origin: google/ringdroid
public boolean reportProgress(double fractionComplete) {
long now = getCurrentTime();
if (now - mLoadingLastUpdateTime > 100) {
mProgressDialog.setProgress(
(int) (mProgressDialog.getMax() * fractionComplete));
mLoadingLastUpdateTime = now;
}
return mLoadingKeepGoing;
}
};
代码示例来源:origin: com.squareup.assertj/assertj-android
public ProgressDialogAssert hasMax(int max) {
isNotNull();
int actualMax = actual.getMax();
assertThat(actualMax) //
.overridingErrorMessage("Expected max <%s> but was <%s>.", max, actualMax) //
.isEqualTo(max);
return this;
}
代码示例来源:origin: com.googlecode.android-query/android-query
public void done(){
if(pb != null){
pb.setProgress(pb.getMax());
}
if(pd != null){
pd.setProgress(pd.getMax());
}
if(act != null){
act.setProgress(9999);
}
}
代码示例来源:origin: stackoverflow.com
try {
while (barProgressDialog.getProgress() <= barProgressDialog.getMax()) {
Thread.sleep(2000);
barProgressDialog.incrementProgressBy(2);
if (barProgressDialog.getProgress() == barProgressDialog.getMax()) {
barProgressDialog.dismiss();
代码示例来源:origin: stackoverflow.com
if(mProgressDialog.getProgress()==mProgressDialog.getMax()){
mProgressDialog.dismiss();
代码示例来源:origin: stackoverflow.com
if(mProgressDialog.getProgress()==mProgressDialog.getMax()){
mProgressDialog.dismiss();
Toast.makeText(fa, "File Downloaded", Toast.LENGTH_SHORT).show();
代码示例来源:origin: stackoverflow.com
if(mProgressDialog.getProgress()==mProgressDialog.getMax()){
mProgressDialog.dismiss();
代码示例来源:origin: stackoverflow.com
.getMax()) {
.getMax()) {
barProgressDialog.dismiss();
代码示例来源:origin: stackoverflow.com
public void run() {
try {
while (barraProgreso.getProgress() <= barraProgreso.getMax()) {
Thread.sleep(1000);
if(barraProgreso.getProgress() == barraProgreso.getMax()){
barraProgreso.dismiss();
代码示例来源:origin: stackoverflow.com
while (dialog.getProgress() < dialog.getMax()) {
代码示例来源:origin: stackoverflow.com
public void handleMessage(Message msg) {
progressDialog.setProgress(100 * msg.arg1 / msg.arg2);
if (progressDialog.getProgress() == progressDialog.getMax()) {
progressDialog.dismiss();
代码示例来源:origin: stackoverflow.com
try {
while (progressDoalog.getProgress() <= progressDoalog
.getMax()) {
Thread.sleep(200);
handle.sendMessage(handle.obtainMessage());
if (progressDoalog.getProgress() == progressDoalog
.getMax()) {
progressDoalog.dismiss();
代码示例来源:origin: stackoverflow.com
while (barProgressDialog.getProgress() <= barProgressDialog.getMax()) {
if (barProgressDialog.getProgress() == barProgressDialog.getMax()) {
内容来源于网络,如有侵权,请联系作者删除!