當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。