当前位置: 首页>>代码示例>>Java>>正文


Java ProgressDialog.setMax方法代码示例

本文整理汇总了Java中android.app.ProgressDialog.setMax方法的典型用法代码示例。如果您正苦于以下问题:Java ProgressDialog.setMax方法的具体用法?Java ProgressDialog.setMax怎么用?Java ProgressDialog.setMax使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.app.ProgressDialog的用法示例。


在下文中一共展示了ProgressDialog.setMax方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreateDialog

import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    Bundle args = getArguments();
    int size = args.getInt(ARG_SIZE);
    String message = args.getString(ARG_MESSAGE);

    messagingListener = new SimpleMessagingListener() {
        @Override
        public void updateProgress(int progress) {
            dialog.setProgress(progress);
        }
    };

    messagingController = MessagingController.getInstance(getActivity());
    messagingController.addListener(messagingListener);

    dialog = new ProgressDialog(getActivity());
    dialog.setMessage(message);
    dialog.setMax(size);
    dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
    dialog.setProgress(0);
    dialog.show();

    return dialog;
}
 
开发者ID:philipwhiuk,项目名称:q-mail,代码行数:26,代码来源:AttachmentDownloadDialogFragment.java

示例2: onCreateDialog

import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected Dialog onCreateDialog(int id) {
    //pDialog.show();
    switch (id) {
        case progress_bar_type:
            pDialog = new ProgressDialog(this);
            pDialog.setMessage("Downloading " + u + ".pdf");
            pDialog.setIndeterminate(false);
            pDialog.setMax(100);
            pDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
            pDialog.setCancelable(true);
            pDialog.setCanceledOnTouchOutside(false);
            pDialog.setButton(ProgressDialog.BUTTON_NEGATIVE, "Background", new DialogInterface.OnClickListener() {
                @Override
                public void onClick(DialogInterface dialog, int which) {
                    //Cancel download task
                    pDialog.cancel();
                    Toast.makeText(PdfSelector.this,
                            "Downloading in background", Toast.LENGTH_SHORT).show();
                    startActivity(new Intent(PdfSelector.this, Subjects.class));
                    //finish();
                }
            });
            pDialog.show();
            return pDialog;
        default:
            return null;
    }
}
 
开发者ID:Shobhit-pandey,项目名称:CollegeDoc,代码行数:30,代码来源:PdfSelector.java

示例3: show

import android.app.ProgressDialog; //导入方法依赖的package包/类
public static void show(Context context) {
    // 创建进度对话框
    pd = new ProgressDialog(context);
    pd.setMax(100);
    // 设置对话框标题
    pd.setTitle("下载更新");
    // 设置对话框显示的内容
    pd.setMessage("进度...");
    // 设置对话框不能用取"消按"钮关闭
    pd.setCancelable(false);
    // 设置对话框的进度条风格
    // pd.setProgressStyle(ProgressDialog.STYLE_SPINNER);
    pd.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
    // 设置对话框的进度条是否显示进度
    pd.setIndeterminate(false);
    pd.show();
}
 
开发者ID:weimin96,项目名称:shareNote,代码行数:18,代码来源:FirHelper.java

示例4: onPreExecute

import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected void onPreExecute() {
    m_dialog = new ProgressDialog(m_context);
    m_dialog.setCancelable(true);
    m_dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
    m_dialog.setProgress(0);
    m_dialog.setMax(getExternalNotes().size());
    m_dialog.show();
}
 
开发者ID:YoeriNijs,项目名称:NoteBuddy,代码行数:10,代码来源:BackupImporter.java

示例5: getXApplicationList

import android.app.ProgressDialog; //导入方法依赖的package包/类
public static List<ApplicationInfoEx> getXApplicationList(Context context, ProgressDialog dialog) {
	// Get references
	PackageManager pm = context.getPackageManager();

	// Get app list
	SparseArray<ApplicationInfoEx> mapApp = new SparseArray<ApplicationInfoEx>();
	List<ApplicationInfoEx> listApp = new ArrayList<ApplicationInfoEx>();
	List<ApplicationInfo> listAppInfo = pm.getInstalledApplications(PackageManager.GET_META_DATA);
	if (dialog != null)
		dialog.setMax(listAppInfo.size());
	for (int app = 0; app < listAppInfo.size(); app++) {
		if (dialog != null)
			dialog.setProgress(app + 1);

		ApplicationInfo appInfo = listAppInfo.get(app);
		Util.log(null, Log.INFO, "package=" + appInfo.packageName + " uid=" + appInfo.uid);

		ApplicationInfoEx appInfoEx = new ApplicationInfoEx(context, appInfo.uid);
		if (mapApp.get(appInfoEx.getUid()) == null) {
			mapApp.put(appInfoEx.getUid(), appInfoEx);
			listApp.add(appInfoEx);
		}
	}

	// Sort result
	Collections.sort(listApp);
	return listApp;
}
 
开发者ID:ukanth,项目名称:XPrivacy,代码行数:29,代码来源:ApplicationInfoEx.java

示例6: getProgressDialog

import android.app.ProgressDialog; //导入方法依赖的package包/类
public static ProgressDialog getProgressDialog(Context context) {
    ProgressDialog progressDialog = new ProgressDialog(context);
    progressDialog.setCancelable(false);
    progressDialog.setMax(100);
    progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
    progressDialog.setMessage(context.getString(R.string.please_wait));
    return progressDialog;
}
 
开发者ID:mobilemaster128,项目名称:quickblox-android,代码行数:9,代码来源:DialogUtils.java

示例7: onPreExecute

import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected void onPreExecute() {
  progressDialog = new ProgressDialog(context);
  progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
  progressDialog.setCancelable(false);
  progressDialog.setIndeterminate(false);
  progressDialog.setTitle(R.string.trimmer__deleting);
  progressDialog.setMessage(context.getString(R.string.trimmer__deleting_old_messages));
  progressDialog.setMax(100);
  progressDialog.show();
}
 
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:12,代码来源:Trimmer.java

示例8: setUpProgressDialog

import android.app.ProgressDialog; //导入方法依赖的package包/类
static void setUpProgressDialog(Context context) {
    mProgressDialog = new ProgressDialog(context);
    mProgressDialog.setCancelable(false);
    mProgressDialog.setMessage(context.getString(R.string.loading));
    mProgressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
    mProgressDialog.setProgress(0);
    mProgressDialog.setMax(100);
}
 
开发者ID:Pl4gue,项目名称:homeworkManager-android,代码行数:9,代码来源:BaseActivity.java

示例9: onPreExecute

import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected void onPreExecute() {
    super.onPreExecute();
    mProgressDialog = new ProgressDialog(context);
    mProgressDialog.setTitle("Progress...");
    mProgressDialog.setMax(3);
    mProgressDialog.show();
}
 
开发者ID:tranleduy2000,项目名称:text_converter,代码行数:9,代码来源:CodecFileFragment.java

示例10: showProgressDialog

import android.app.ProgressDialog; //导入方法依赖的package包/类
private void showProgressDialog() {

        progressDialog = new ProgressDialog(this);
        progressDialog.setMessage(getString(R.string.please_wait));
        progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
        progressDialog.setMax(numberOfLines);
        progressDialog.setCancelable(false);
        progressDialog.show();

    }
 
开发者ID:webianks,项目名称:scout,代码行数:11,代码来源:MainActivity.java

示例11: prepareProgressDialog

import android.app.ProgressDialog; //导入方法依赖的package包/类
private ProgressDialog prepareProgressDialog(Context context) {
		ProgressDialog progressDialog = new ProgressDialog(context);
		progressDialog.setTitle(R.string.stl_load_progress_title);
		progressDialog.setMax(0);
		progressDialog.setMessage(context.getString(R.string.stl_load_progress_message));
		progressDialog.setIndeterminate(false);
		progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
		progressDialog.setCancelable(false);
		
//		progressDialog.show();
		
		return progressDialog;
	}
 
开发者ID:xhd-Git,项目名称:3DPrint-Controller,代码行数:14,代码来源:STLObject.java

示例12: onPreExecute

import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected void onPreExecute() {
    super.onPreExecute();

    progressDialog = new ProgressDialog(context, R.style.SciChart_ExportProgressDialogStyle);
    progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
    progressDialog.setTitle(context.getString(R.string.export_all_examples));
    progressDialog.setIndeterminate(false);
    progressDialog.setMax(module.getExamples().size());
    progressDialog.setCancelable(false);
    progressDialog.setCanceledOnTouchOutside(false);

    progressDialog.show();
}
 
开发者ID:ABTSoftware,项目名称:SciChart.Android.Examples,代码行数:15,代码来源:ZipAndShareAllProjectsTask.java

示例13: onPreExecute

import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected void onPreExecute() {
    PreventActivity pa = wr.get();
    if (pa != null) {
        dialog = new ProgressDialog(pa);
        dialog.setTitle(R.string.app_name);
        dialog.setIcon(R.drawable.ic_launcher);
        dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
        dialog.setCancelable(false);
        dialog.setMax(mAdapter.getSize());
        dialog.show();
        labelLoader = new LabelLoader(pa);
    }
}
 
开发者ID:brevent,项目名称:prevent,代码行数:15,代码来源:PreventFragment.java

示例14: showProgressDialog

import android.app.ProgressDialog; //导入方法依赖的package包/类
public void showProgressDialog(){

        progressDialog= new ProgressDialog(MainActivity.this);
        progressDialog.setMax(100);
        progressDialog.setMessage("Loading Please wait ");
        progressDialog.setTitle("Loading ");
        progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
        progressDialog.show();

    }
 
开发者ID:kirti,项目名称:Android_MVP_Retrofit,代码行数:11,代码来源:MainActivity.java

示例15: showProgressDialog

import android.app.ProgressDialog; //导入方法依赖的package包/类
public void showProgressDialog(){

        progressDialog= new ProgressDialog(SecondActivity.this);
        progressDialog.setMax(100);
        progressDialog.setMessage("Loading Please wait ");
        progressDialog.setTitle("Loading ");
        progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
        progressDialog.show();

    }
 
开发者ID:kirti,项目名称:Android_MVP_Retrofit,代码行数:11,代码来源:SecondActivity.java


注:本文中的android.app.ProgressDialog.setMax方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。