當前位置: 首頁>>代碼示例>>Java>>正文


Java ProgressDialog.setIcon方法代碼示例

本文整理匯總了Java中android.app.ProgressDialog.setIcon方法的典型用法代碼示例。如果您正苦於以下問題:Java ProgressDialog.setIcon方法的具體用法?Java ProgressDialog.setIcon怎麽用?Java ProgressDialog.setIcon使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.app.ProgressDialog的用法示例。


在下文中一共展示了ProgressDialog.setIcon方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onPreExecute

import android.app.ProgressDialog; //導入方法依賴的package包/類
@Override
protected void onPreExecute() {
    PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
    wakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, getClass().getName());
    wakeLock.acquire();

    progressDialog = new ProgressDialog(context);
    progressDialog.setIcon(R.mipmap.ic_launcher);
    progressDialog.setTitle(R.string.app_name);
    progressDialog.setMessage(context.getString(R.string.msg_downloading, url.toString()));
    progressDialog.setIndeterminate(true);
    progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
    progressDialog.setCancelable(true);
    progressDialog.setOnCancelListener(new DialogInterface.OnCancelListener() {
        @Override
        public void onCancel(DialogInterface dialog) {
            DownloadTask.this.cancel(true);
        }
    });
    progressDialog.show();
}
 
開發者ID:miankai,項目名稱:MKAPP,代碼行數:22,代碼來源:DownloadTask.java

示例2: onCreateDialog

import android.app.ProgressDialog; //導入方法依賴的package包/類
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    String title ="";
    int icon=-1 ;
    icon= R.drawable.filetype_video;
    ProgressDialog pd = new ProgressDialog(getActivity());
    pd.setTitle(title);
    if(icon >=0)
        pd.setIcon(icon);
    pd.setMessage(getText(R.string.deleting));
    pd.setIndeterminate(true);
    pd.setCancelable(true);

    return pd;

}
 
開發者ID:archos-sa,項目名稱:aos-Video,代碼行數:17,代碼來源:DeleteDialog.java

示例3: showProgressDialog

import android.app.ProgressDialog; //導入方法依賴的package包/類
public static void showProgressDialog(Context context) {
	dialog = new ProgressDialog(context);
	dialog.setIcon(R.mipmap.ic_launcher);
	dialog.setTitle(R.string.app_name);

	dialog.setMessage("請等候,數據加載中……");
	dialog.show();
}
 
開發者ID:ceji-longquan,項目名稱:ceji_android,代碼行數:9,代碼來源:PromptManager.java

示例4: onCreateDialog

import android.app.ProgressDialog; //導入方法依賴的package包/類
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    ProgressDialog pd = new ProgressDialog(getActivity());
    pd.setTitle(mCurrentDirectory.getLastPathSegment());
    pd.setIcon(R.drawable.filetype_video_folder);
    pd.setMessage(getText(R.string.loading));
    pd.setIndeterminate(true);
    pd.setCancelable(true);

    return pd;
}
 
開發者ID:archos-sa,項目名稱:aos-Video,代碼行數:12,代碼來源:BrowserByFolder.java

示例5: showDownloadDialog

import android.app.ProgressDialog; //導入方法依賴的package包/類
/**
 * 彈出下載對話框
 */
public void showDownloadDialog() {
    mDownloadDialog = new ProgressDialog(mContext);
    mDownloadDialog.setIcon(R.mipmap.ic_launcher);
    mDownloadDialog.setTitle("版本更新");
    mDownloadDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
    mDownloadDialog.setMessage("正在玩命下載中......");
    mDownloadDialog.getWindow().setGravity(Gravity.CENTER);
    mDownloadDialog.setMax(100);
    mDownloadDialog.show();
}
 
開發者ID:6ag,項目名稱:LiuAGeAndroid,代碼行數:14,代碼來源:MainActivity.java

示例6: 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


注:本文中的android.app.ProgressDialog.setIcon方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。