本文整理了Java中android.app.ProgressDialog.setTitle()
方法的一些代码示例,展示了ProgressDialog.setTitle()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ProgressDialog.setTitle()
方法的具体详情如下:
包路径:android.app.ProgressDialog
类名称:ProgressDialog
方法名:setTitle
暂无
代码示例来源:origin: stackoverflow.com
ProgressDialog progress = new ProgressDialog(this);
progress.setTitle("Loading");
progress.setMessage("Wait while loading...");
progress.setCancelable(false); // disable dismiss by tapping outside of the dialog
progress.show();
// To dismiss the dialog
progress.dismiss();
代码示例来源:origin: stackoverflow.com
// create a ProgressDialog instance, with a specified theme:
ProgressDialog dialog = new ProgressDialog(mContext, ProgressDialog.THEME_HOLO_DARK);
// set indeterminate style
dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
// set title and message
dialog.setTitle("Please wait");
dialog.setMessage("Loading dictionary file...");
// and show it
dialog.show();
代码示例来源:origin: stackoverflow.com
@Override
public Dialog onCreateDialog(final Bundle savedInstanceState) {
final ProgressDialog dialog = new ProgressDialog(getActivity());
//
dialog.setTitle(R.string.login_title);
dialog.setMessage(getString(R.string.login_message));
dialog.setIndeterminate(true);
dialog.setCancelable(false);
// etc...
return dialog;
}
代码示例来源:origin: iMeiji/Toutiao
dialog.setTitle(R.string.loading);
.doOnNext(o -> dialog.show())
.observeOn(Schedulers.io())
.switchMap((Function<Object, ObservableSource<String>>) o -> {
})
.subscribe(dataBean -> {
dialog.dismiss();
VideoContentActivity.launch(dataBean);
}, throwable -> {
dialog.dismiss();
ErrorAction.print(throwable);
});
代码示例来源:origin: crazycodeboy/TakePhoto
/**
* 显示圆形进度对话框
*
* @param activity
* @param progressTitle 显示的标题
* @return
* @author JPH
* Date 2014-12-12 下午7:04:09
*/
public static ProgressDialog showProgressDialog(final Activity activity, String... progressTitle) {
if (activity == null || activity.isFinishing()) {
return null;
}
String title = activity.getResources().getString(R.string.tip_tips);
if (progressTitle != null && progressTitle.length > 0) {
title = progressTitle[0];
}
ProgressDialog progressDialog = new ProgressDialog(activity);
progressDialog.setTitle(title);
progressDialog.setCancelable(false);
progressDialog.show();
return progressDialog;
}
}
代码示例来源:origin: k9mail/k-9
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
Bundle args = getArguments();
String title = args.getString(ARG_TITLE);
String message = args.getString(ARG_MESSAGE);
ProgressDialog dialog = new ProgressDialog(getActivity());
dialog.setIndeterminate(true);
dialog.setTitle(title);
dialog.setMessage(message);
return dialog;
}
代码示例来源:origin: rmtheis/android-ocr
void displayProgressDialog() {
// Set up the indeterminate progress dialog box
indeterminateDialog = new ProgressDialog(this);
indeterminateDialog.setTitle("Please wait");
String ocrEngineModeName = getOcrEngineModeName();
if (ocrEngineModeName.equals("Both")) {
indeterminateDialog.setMessage("Performing OCR using Cube and Tesseract...");
} else {
indeterminateDialog.setMessage("Performing OCR using " + ocrEngineModeName + "...");
}
indeterminateDialog.setCancelable(false);
indeterminateDialog.show();
}
代码示例来源:origin: stackoverflow.com
ss2.setSpan(new ForegroundColorSpan(Color.GREEN), 0, ss2.length(), 0);
ProgressDialog pd = new ProgressDialog(MainActivity.this);
pd.setTitle(ss1);
pd.setMessage(ss2);
pd.show();
代码示例来源:origin: stackoverflow.com
public class AsyncClass extends AsyncTask<Void, String, Void> {
private Context context;
ProgressDialog dialog;
public AsyncClass(Context cxt) {
context = cxt;
dialog = new ProgressDialog(context);
}
@Override
protected void onPreExecute() {
dialog.setTitle("Please wait");
dialog.show();
}
@Override
protected Void doInBackground(Void... unused) {
SystemClock.sleep(2000);
return (null);
}
@Override
protected void onPostExecute(Void unused) {
dialog.dismiss();
}
}
代码示例来源:origin: jberkel/sms-backup-plus
@SuppressWarnings("deprecation")
@Override @NonNull
public Dialog onCreateDialog(Bundle savedInstanceState) {
// NB: progress dialog is not AppCompat-ready, and will not appear themed
// correctly on older devices
android.app.ProgressDialog progress = new android.app.ProgressDialog(getContext());
progress.setTitle(null);
progress.setProgressStyle(android.app.ProgressDialog.STYLE_SPINNER);
progress.setMessage(getString(R.string.ui_dialog_access_token_msg));
progress.setIndeterminate(true);
progress.setCancelable(false);
return progress;
}
}
代码示例来源:origin: stackoverflow.com
import android.app.Dialog;
import android.app.ProgressDialog;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
public class ProgressDialogFragment extends DialogFragment
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setCancelable(false);
}
@Override
public Dialog onCreateDialog(Bundle savedInstanceState)
{
ProgressDialog dialog = new ProgressDialog(getActivity(), getTheme());
dialog.setTitle(getString(R.string.pleaseWait));
dialog.setMessage(getString(R.string.webpage_being_loaded));
dialog.setIndeterminate(true);
dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
return dialog;
}
}
代码示例来源:origin: rmtheis/android-ocr
@Override
protected void onPreExecute() {
super.onPreExecute();
dialog.setTitle("Please wait");
dialog.setMessage("Checking for data installation...");
dialog.setIndeterminate(false);
dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
dialog.setCancelable(false);
dialog.show();
activity.setButtonVisibility(false);
}
代码示例来源:origin: stackoverflow.com
ProgressDialog dialog = new ProgressDialog(this, AlertDialog.THEME_HOLO_DARK);
dialog.setTitle("Title");
dialog.setMessage("Message");
dialog.show();
代码示例来源:origin: 8enet/AppOpsX
@Override
public void showProgress(boolean show, int max) {
if (progressDialog != null && progressDialog.isShowing()) {
progressDialog.dismiss();
progressDialog = null;
}
if (show) {
progressDialog = new ProgressDialog(getActivity());
progressDialog.setTitle(R.string.dlg_title);
progressDialog.setCanceledOnTouchOutside(false);
progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
progressDialog.setMax(max);
progressDialog.show();
}
}
代码示例来源:origin: TommyLemon/APIJSON
@Override
public void run() {
if (progressDialog == null) {
progressDialog = new ProgressDialog(context);
}
if(progressDialog.isShowing() == true) {
progressDialog.dismiss();
}
if (dialogTitle != null && ! "".equals(dialogTitle.trim())) {
progressDialog.setTitle(dialogTitle);
}
if (dialogMessage != null && ! "".equals(dialogMessage.trim())) {
progressDialog.setMessage(dialogMessage);
}
progressDialog.setCanceledOnTouchOutside(false);
progressDialog.show();
}
});
代码示例来源:origin: multidots/android-app-common-tasks
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.asn_activity_oauth);
View view = findViewById(R.id.progress_container);
view.setVisibility(View.GONE);
Intent intent = getIntent();
APIKEY = intent.getStringExtra("APIKEY");
APISECRET = intent.getStringExtra("APISECRET");
if (TextUtils.isEmpty(APIKEY) || TextUtils.isEmpty(APISECRET)) {
Common.showAlertDialog(this, "Linkedin", "Please pass APIKEY and APISECRET in intent extras", true);
setResult(RESULT_CANCELED);
finish();
} else {
progress = new ProgressDialog(this);
progress.setTitle("Loading...");
progress.setMessage("Please Wait...");
progress.show();
new OauthStart().execute();
}
}
代码示例来源:origin: TommyLemon/Android-ZBLibrary
@Override
public void run() {
if (progressDialog == null) {
progressDialog = new ProgressDialog(context);
}
if(progressDialog.isShowing() == true) {
progressDialog.dismiss();
}
if (dialogTitle != null && ! "".equals(dialogTitle.trim())) {
progressDialog.setTitle(dialogTitle);
}
if (dialogMessage != null && ! "".equals(dialogMessage.trim())) {
progressDialog.setMessage(dialogMessage);
}
progressDialog.setCanceledOnTouchOutside(false);
progressDialog.show();
}
});
代码示例来源:origin: multidots/android-app-common-tasks
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.asn_activity_oauth);
View view = findViewById(R.id.progress_container);
view.setVisibility(View.GONE);
Intent intent = getIntent();
APIKEY = intent.getStringExtra("APIKEY");
APISECRET = intent.getStringExtra("APISECRET");
if (TextUtils.isEmpty(APIKEY) || TextUtils.isEmpty(APISECRET)) {
Common.showAlertDialog(this, "Linkedin", "Please pass APIKEY and APISECRET in intent extras", true);
setResult(RESULT_CANCELED);
finish();
} else {
progress = new ProgressDialog(this);
progress.setTitle("Loading...");
progress.setMessage("Please Wait...");
progress.show();
new OauthStart().execute();
}
}
代码示例来源:origin: stackoverflow.com
protected void onPreExecute() {
dialog = new ProgressDialog(baraj_mapa.this);
dialog.setTitle("Calculating...");
dialog.setMessage("Please wait...");
dialog.setIndeterminate(true);
dialog.show();
dialog.dismiss();
String minim = result.get(0);
int min = Integer.parseInt(minim);
代码示例来源:origin: TommyLemon/Android-ZBLibrary
@Override
public void run() {
if (progressDialog == null) {
progressDialog = new ProgressDialog(context);
}
if(progressDialog.isShowing()) {
progressDialog.dismiss();
}
if (StringUtil.isNotEmpty(title, false)) {
progressDialog.setTitle(title);
}
if (StringUtil.isNotEmpty(message, false)) {
progressDialog.setMessage(message);
}
progressDialog.setCanceledOnTouchOutside(false);
progressDialog.show();
}
});
内容来源于网络,如有侵权,请联系作者删除!