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


Java ProgressDialog.setContentView方法代码示例

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


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

示例1: showLoadingDialog

import android.app.ProgressDialog; //导入方法依赖的package包/类
public static ProgressDialog showLoadingDialog(Context context) {
    ProgressDialog progressDialog = new ProgressDialog(context);
    progressDialog.show();
    if (progressDialog.getWindow() != null) {
        progressDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
    }
    progressDialog.setContentView(R.layout.progress_dialog);
    progressDialog.setIndeterminate(true);
    progressDialog.setCancelable(false);
    progressDialog.setCanceledOnTouchOutside(false);
    return progressDialog;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:13,代码来源:CommonUtils.java

示例2: showLoadingDialog

import android.app.ProgressDialog; //导入方法依赖的package包/类
/**
 * Show loading progress
 */
public static ProgressDialog showLoadingDialog(Context context) {
  ProgressDialog progressDialog = new ProgressDialog(context);
  progressDialog.show();

  if (progressDialog.getWindow() != null) {
    progressDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
  }
  progressDialog.setContentView(R.layout.dialog_progress);
  progressDialog.setIndeterminate(true);
  progressDialog.setCancelable(true);
  progressDialog.setCanceledOnTouchOutside(false);

  return progressDialog;
}
 
开发者ID:nikacotAndroid,项目名称:Weather-Guru-MVP,代码行数:18,代码来源:AppUtils.java

示例3: showLoadingDialog

import android.app.ProgressDialog; //导入方法依赖的package包/类
public static ProgressDialog showLoadingDialog(Context context) {
    ProgressDialog progressDialog = new ProgressDialog(context);
    progressDialog.show();
    if (progressDialog.getWindow() != null) {
        progressDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
    }
    progressDialog.setContentView(R.layout.progress_dialog);
    progressDialog.setIndeterminate(true);
    progressDialog.setCancelable(true);
    progressDialog.setCanceledOnTouchOutside(false);
    return progressDialog;
}
 
开发者ID:iamBedant,项目名称:InstantAppStarter,代码行数:13,代码来源:CommonUtils.java

示例4: createAndShowWaitSpinner

import android.app.ProgressDialog; //导入方法依赖的package包/类
private static ProgressDialog createAndShowWaitSpinner(Context mContext)
{
	ProgressDialog dialog = new ProgressDialog(mContext);
	try {
		dialog.show();
	}
	catch (WindowManager.BadTokenException e) {
	}
	dialog.setCancelable(false);
	dialog.setIndeterminate(true);
	dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
	dialog.setContentView(R.layout.wait_spinner);
	return dialog;
}
 
开发者ID:ArtifexSoftware,项目名称:mupdf-android-viewer-nui,代码行数:15,代码来源:ProofActivity.java

示例5: showLoadingDialog

import android.app.ProgressDialog; //导入方法依赖的package包/类
/**
 * Show loading progress
 */
public static ProgressDialog showLoadingDialog(Context context) {
    ProgressDialog progressDialog = new ProgressDialog(context);
    progressDialog.show();

    if (progressDialog.getWindow() != null) {
        progressDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
    }
    progressDialog.setContentView(R.layout.dialog_progress);
    progressDialog.setIndeterminate(true);
    progressDialog.setCancelable(true);
    progressDialog.setCanceledOnTouchOutside(false);

    return progressDialog;
}
 
开发者ID:graviton57,项目名称:TheNounProject,代码行数:18,代码来源:AppUtils.java

示例6: showProgressBar

import android.app.ProgressDialog; //导入方法依赖的package包/类
/**
 * this function is used to show custom progress dialog.
 *
 * @param progressDialog - progress dialog object (not be null)
 */
public static void showProgressBar(ProgressDialog progressDialog) {
    if(progressDialog != null) {
        progressDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
        progressDialog.show();
        progressDialog.setContentView(R.layout.progress_dialog_layout);
        progressDialog.setCancelable(true);
    }
}
 
开发者ID:pawanchauhan05,项目名称:AndroidUtility,代码行数:14,代码来源:Utils.java


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