android.app.ProgressDialog.setIcon()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(5.6k)|赞(0)|评价(0)|浏览(189)

本文整理了Java中android.app.ProgressDialog.setIcon()方法的一些代码示例,展示了ProgressDialog.setIcon()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ProgressDialog.setIcon()方法的具体详情如下:
包路径:android.app.ProgressDialog
类名称:ProgressDialog
方法名:setIcon

ProgressDialog.setIcon介绍

暂无

代码示例

代码示例来源:origin: MZCretin/SuperExpandableListView

private void showDialog(String msg) {
  if ( progressDialog == null ) {
    //创建ProgressDialog对象
    progressDialog = new ProgressDialog(
        this);
    //设置进度条风格,风格为圆形,旋转的
    progressDialog.setProgressStyle(
        ProgressDialog.STYLE_SPINNER);
    //设置ProgressDialog 标题图标
    progressDialog.setIcon(android.R.drawable.btn_star);
    //设置ProgressDialog 的进度条是否不明确
    progressDialog.setIndeterminate(false);
    //设置ProgressDialog 是否可以按退回按键取消
    progressDialog.setCancelable(false);
  }
  //设置ProgressDialog 提示信息
  progressDialog.setMessage("正在" + msg + "...");
  // 让ProgressDialog显示
  progressDialog.show();
}

代码示例来源:origin: stackoverflow.com

public class Main extends ListActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {

  super.onCreate(savedInstanceState);

  final ProgressDialog _progressDialog = new ProgressDialog(this);
  _progressDialog.setIcon(R.drawable.icon);
  _progressDialog.setTitle("Loading ...");
  _progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);

  new AsyncTask<Void, Void, Void>() {
   protected Long doInBackground(Void ... urls) {
     GetData();
   }

   protected void onPostExecute(Void result) {
     _progressDialog.dismiss();
   }

   protected void onPreExecute(Void no) {
     _progressDialog.show();
   }

  }.execute();

}

代码示例来源:origin: MZCretin/AutoUpdateProject

progressDialog = new ProgressDialog(mContext);
if ( iconRes != 0 ) {
  progressDialog.setIcon(iconRes);
} else {
  progressDialog.setIcon(R.mipmap.ic_launcher1);

代码示例来源:origin: 6ag/BaoKanAndroid

/**
 * 弹出下载对话框
 */
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();
}

代码示例来源:origin: tagtime/TagTime

private Dialog progressDialog() {
  mProgress = new ProgressDialog(ManageData.this);
  mProgress.setIcon(R.drawable.alert_dialog_icon);
  mProgress.setTitle(R.string.saving_log);
  mProgress.setProgressStyle(ProgressDialog.STYLE_SPINNER);
  mProgress.setButton("Hide", new DialogInterface.OnClickListener() {
    public void onClick(DialogInterface dialog, int which) {
      // TODO Just make dialog go away (Do I need to do anything?)
    }
  });
  mProgress.setButton2("Cancel", new DialogInterface.OnClickListener() {
    public void onClick(DialogInterface dialog, int which) {
      // TODO Cancel the save	
    }
  });
  return mProgress;
}

代码示例来源:origin: stackoverflow.com

dialog.setCancelable(true);
dialog.setTitle(DialogTitel);
dialog.setIcon(R.drawable.icon);
dialog.setMessage(DialogText);
dialog.setOnDismissListener(new OnDismissListener() {

代码示例来源:origin: stackoverflow.com

dialog.setMessage("Please wait...");
dialog.setCancelable(false);
dialog.setIcon(android.R.drawable.ic_dialog_info);
dialog.show();

代码示例来源:origin: stackoverflow.com

mProgressDialog.setIcon(R.drawable.dwnload);

代码示例来源:origin: stackoverflow.com

dialog.setMessage("Please wait...");
dialog.setCancelable(false);
dialog.setIcon(android.R.drawable.ic_dialog_info);
dialog.show();

代码示例来源:origin: stackoverflow.com

dialog.setCancelable(false);
dialog.setTitle(DialogTitel);
dialog.setIcon(R.drawable.icon);
dialog.setMessage(DialogText);
dialog.show();

代码示例来源:origin: stackoverflow.com

dialog.setMessage("Please wait...");
dialog.setCancelable(false);
dialog.setIcon(android.R.drawable.ic_dialog_info);
dialog.show();

代码示例来源:origin: stackoverflow.com

mProgress.setIcon(R.drawable.icon_72);
mProgress.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
mProgress.setMessage("Buffering Video...");

代码示例来源:origin: stackoverflow.com

dialog.setCancelable(true);
dialog.setTitle(DialogTitel);
dialog.setIcon(R.drawable.icon);
dialog.setMessage(DialogText);
dialog.setOnDismissListener(new OnDismissListener() {

代码示例来源:origin: stackoverflow.com

pd.setIcon(R.drawable.ic_launcher);
pd.setTitle("Please Wait...");
pd.setMessage(message);

代码示例来源:origin: stackoverflow.com

pDialog.setTitle("In progress...");
pDialog.setIcon(android.R.drawable.stat_sys_download);
pDialog.setMax(100);

代码示例来源:origin: GeoODK/collect

mProgressDialog.setTitle(getString(R.string.downloading_data));
mProgressDialog.setMessage(mAlertMsg);
mProgressDialog.setIcon(android.R.drawable.ic_dialog_info);
mProgressDialog.setIndeterminate(true);
mProgressDialog.setCancelable(false);

代码示例来源:origin: stackoverflow.com

progressDialog.setIcon(R.drawable.logo);
progressDialog.setMessage(Html.fromHtml("<b>Password</b><br/>Validating Password..."));
progressDialog.setIndeterminate(false);

代码示例来源:origin: GeoODK/collect

mLocationDialog.setIcon(android.R.drawable.ic_dialog_info);
mLocationDialog.setTitle(getString(R.string.getting_location));
mLocationDialog.setMessage(getString(R.string.please_wait_long));

代码示例来源:origin: GeoODK/collect

mBearingDialog.setIcon(android.R.drawable.ic_dialog_info);
mBearingDialog.setTitle(getString(R.string.getting_bearing));
mBearingDialog.setMessage(getString(R.string.please_wait_long));

代码示例来源:origin: GeoODK/collect

mProgressDialog.setIcon(android.R.drawable.ic_dialog_info);
mProgressDialog.setTitle(getString(R.string.loading_form));
mProgressDialog.setMessage(getString(R.string.please_wait));
mProgressDialog.setIcon(android.R.drawable.ic_dialog_info);
mProgressDialog.setTitle(getString(R.string.saving_form));
mProgressDialog.setMessage(getString(R.string.please_wait));

相关文章