本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
}