本文整理了Java中android.app.ProgressDialog.setContentView()
方法的一些代码示例,展示了ProgressDialog.setContentView()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ProgressDialog.setContentView()
方法的具体详情如下:
包路径:android.app.ProgressDialog
类名称:ProgressDialog
方法名:setContentView
暂无
代码示例来源:origin: stackoverflow.com
public static ProgressDialog createProgressDialog(Context mContext) {
ProgressDialog dialog = new ProgressDialog(mContext);
try {
dialog.show();
} catch (BadTokenException e) {
}
dialog.setCancelable(false);
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
dialog.setContentView(R.layout.progressdialog);
// dialog.setMessage(Message);
return dialog;
}
代码示例来源:origin: MindorksOpenSource/android-mvp-architecture
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;
}
代码示例来源:origin: stackoverflow.com
protected void onPreExecute() {
dialog.show();
dialog.setContentView(R.layout.progressbar);
代码示例来源:origin: stackoverflow.com
ProgressDialog mProgressDialog = ProgressDialog.show(MainActivity.this, "", "");
mProgressDialog.setContentView(R.layout.main);
mProgressDialog.show();
代码示例来源:origin: stackoverflow.com
public class MainActivity extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
View v = getLayoutInflater().inflate(R.layout.right_spin, null);
TextView txt = (TextView)v.findViewById(R.id.txt);
txt.setText("arabic words");
ProgressDialog dialog = new ProgressDialog(this);
dialog.show();
dialog.setContentView(v);
}
代码示例来源:origin: stackoverflow.com
private ProgressDialog mDialog;
Override
protected void onPreExecute() {
mDialog = new ProgressDialog(...);
mDialog.setContentView(R.layout.dialog_layout);
// define your mDialog object further...
mDialog.show()
}
@Override
protected Drawable doInBackground(...) {
// do stuff
}
@Override
protected void onPostExecute(...) {
mDialog.dismiss();
}
代码示例来源:origin: stackoverflow.com
public static void updateProgressDialog(Context context, ProgressDialog mProgressDialog) {
//If you can't access getBusy(), you may want to use a boolean argument here
if (getBusy()) {
if (mProgressDialog == null) {
mProgressDialog = new ProgressDialog(context, R.style.ProgressDialog); //you might have to cast context, not sure
mProgressDialog.show();
mProgressDialog.setContentView(R.layout.progress_layout);
}
} else {
if (mProgressDialog != null) {
mProgressDialog.dismiss();
mProgressDialog = null;
}
}
}
代码示例来源:origin: stackoverflow.com
ProgressDialog mProgressDialog ;
public void updateProgressDialog(Context context, boolean flag) {
//we're going to keep the progress dialog around if anything's busy
if (flag) {
if (mProgressDialog == null) {
mProgressDialog = new ProgressDialog(context, R.style.ProgressDialog);
mProgressDialog.show();
mProgressDialog.setContentView(R.layout.progress_layout);
}
} else {
if (mProgressDialog != null) {
mProgressDialog.dismiss();
mProgressDialog = null;
}
}
}
代码示例来源:origin: stackoverflow.com
public class Progresss {
static ProgressDialog dialog;
public static void start(Context context) {
dialog = new ProgressDialog(context);
try {
dialog.show();
} catch (BadTokenException e) {
}
dialog.setCancelable(false);
dialog.setContentView(R.layout.progressdialog123);
// dialog.setMessage(Message);
// return dialog;
}
public static void stop() {
if(dialog!=null)
dialog.dismiss();
}
}
代码示例来源:origin: stackoverflow.com
public class BaseActivity extends Activity {
...
ProgressDialog mProgressDialog ;
protected void updateProgressDialog() {
//we're going to keep the progress dialog around if anything's busy
if (getBusy()) {
if (mProgressDialog == null) {
mProgressDialog = new ProgressDialog(this, R.style.ProgressDialog);
mProgressDialog.show();
mProgressDialog.setContentView(R.layout.progress_layout);
}
} else {
if (mProgressDialog != null) {
mProgressDialog.dismiss();
mProgressDialog = null;
}
}
}
...
}
代码示例来源:origin: stackoverflow.com
AVLoadingIndicatorView avLoadingIndicatorView=new AVLoadingIndicatorView(MainActivity.this);
avLoadingIndicatorView.setIndicator("BallSpinFadeLoader");
avLoadingIndicatorView.setIndicatorColor(R.color.colorPrimary);
// Create progress dialog
ProgressDialog pd = new ProgressDialog(activity_context);
pd.setIndeterminate(true);
pd.show();
// Set custom view(Loading Indicator View) after showing dialog
pd.setContentView(avLoadingIndicatorView);
代码示例来源:origin: stackoverflow.com
final ProgressDialog dialog = ProgressDialog.show(MainActivity.this, null, null);
ProgressBar spinner = new android.widget.ProgressBar(MainActivity.this, null,android.R.attr.progressBarStyle);
spinner.getIndeterminateDrawable().setColorFilter(Color.parseColor("#53CBF1"), android.graphics.PorterDuff.Mode.SRC_IN);
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
dialog.setContentView(spinner);
dialog.setCancelable(false);
dialog.show();
代码示例来源:origin: stackoverflow.com
mProgressDialog = new ProgressDialog(ctx, R.style.ProgressDialog);
mProgressDialog.show();
mProgressDialog.setContentView(R.layout.progress_layout);
代码示例来源:origin: stackoverflow.com
pDialog.setContentView(R.layout.custom_progressdialog);
pDialog.setCancelable(false);
pDialog.show();
代码示例来源:origin: stackoverflow.com
pDialog.setContentView(R.layout.progressbar);
代码示例来源:origin: playerone-id/EosCommander
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;
}
代码示例来源:origin: MindorksOpenSource/android-mvp-interactor-architecture
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;
}
代码示例来源:origin: MindorksOpenSource/SnapHelperExample
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;
}
代码示例来源:origin: stackoverflow.com
protected void onPreExecute() {
dialog.show();
dialog.setContentView(R.layout.progressbar);
代码示例来源:origin: stackoverflow.com
pDialog.setCancelable(false);
pDialog.setMessage("Saving\n .....");
pDialog.setContentView(// your coustom layout);
pDialog.show();
内容来源于网络,如有侵权,请联系作者删除!