本文整理汇总了Java中android.app.ProgressDialog.setMessage方法的典型用法代码示例。如果您正苦于以下问题:Java ProgressDialog.setMessage方法的具体用法?Java ProgressDialog.setMessage怎么用?Java ProgressDialog.setMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.app.ProgressDialog
的用法示例。
在下文中一共展示了ProgressDialog.setMessage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//初始化ProgressDialog
final ProgressDialog dialog = new ProgressDialog(this);
dialog.setMessage(getResources().getString(R.string.str_loading));
dialog.setCanceledOnTouchOutside(false);
dlg = dialog;
}
示例2: onCreate
import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
tv = (TextView) findViewById(R.id.label);
handler = new Handler(getMainLooper());
progressDialog = new ProgressDialog(this);
progressDialog.setMessage("Downloading MP3...");
progressDialog.setIndeterminate(true);
progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
progressDialog.setCancelable(true);
if(!requestPermissions()){
handleIntent();
}
}
示例3: onStart
import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
public void onStart() {
super.onStart();
mProgress = new ProgressDialog(getContext());
mProgress.setCanceledOnTouchOutside(false);
mProgress.setMessage("Calling Drive API ...");
String accountName = PreferencesUtils.getAccountName(getContext());
if (!ConnectivityUtils.isGooglePlayServicesAvailable(getContext())) {
acquireGooglePlayServices();
} else {
mCredential.setSelectedAccountName(accountName);
showRemoveButton = true;
mAccountName.setText(accountName);
mSyncStatus.setText(R.string.googleDrive_cannot_connect);
checkPermissions();
}
}
示例4: showProgress
import android.app.ProgressDialog; //导入方法依赖的package包/类
public static ProgressDialog showProgress(Context context, CharSequence title, CharSequence message, boolean indeterminate, boolean cancelable) {
ProgressDialog dialog = new ProgressDialog(context);
dialog.setTitle(title);
dialog.setMessage(message);
dialog.setIndeterminate(indeterminate);
dialog.setCancelable(false);
try {
dialog.show();
} catch (Exception e) {
}
return dialog;
}
示例5: deleteContact
import android.app.ProgressDialog; //导入方法依赖的package包/类
/**
* delete contact
*/
public void deleteContact(final EaseUser tobeDeleteUser) {
String st1 = getResources().getString(R.string.deleting);
final String st2 = getResources().getString(R.string.Delete_failed);
final ProgressDialog pd = new ProgressDialog(getActivity());
pd.setMessage(st1);
pd.setCanceledOnTouchOutside(false);
pd.show();
new Thread(new Runnable() {
public void run() {
try {
EMClient.getInstance().contactManager().deleteContact(tobeDeleteUser.getUsername());
// remove user from memory and database
UserDao dao = new UserDao(getActivity());
dao.deleteContact(tobeDeleteUser.getUsername());
DemoHelper.getInstance().getContactList().remove(tobeDeleteUser.getUsername());
getActivity().runOnUiThread(new Runnable() {
public void run() {
pd.dismiss();
contactList.remove(tobeDeleteUser);
contactListLayout.refresh();
}
});
} catch (final Exception e) {
getActivity().runOnUiThread(new Runnable() {
public void run() {
pd.dismiss();
Toast.makeText(getActivity(), st2 + e.getMessage(), Toast.LENGTH_LONG).show();
}
});
}
}
}).start();
}
示例6: initProgressDialog
import android.app.ProgressDialog; //导入方法依赖的package包/类
private void initProgressDialog() {
mProgressDialog = new ProgressDialog(this);
mProgressDialog.setIndeterminate(true);
mProgressDialog.setTitle("提示");
mProgressDialog.setMessage("正在加载...");
mProgressDialog.setCanceledOnTouchOutside(false);
mProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
}
示例7: onCreateDialog
import android.app.ProgressDialog; //导入方法依赖的package包/类
protected Dialog onCreateDialog(int id) {
prgDialog = new ProgressDialog(context);
prgDialog.setMessage(context.getResources().getString(R.string.updating));
prgDialog.setMax(100);
prgDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
prgDialog.show();
return prgDialog;
}
示例8: loginToFoursquare
import android.app.ProgressDialog; //导入方法依赖的package包/类
public void loginToFoursquare() {
ProgressDialog prog = new ProgressDialog(activity);
prog.setMessage(activity.getString(R.string.foursquare_please_wait));
prog.setCancelable(false);
prog.show();
foursquare = new Foursquare(
ApiObjects.foursquare.get("client_key"),
ApiObjects.foursquare.get("client_secret"),
redirectUrl);
foursquare.authorize(getActivity(),
new FoursquareAuthenDialogListener());
prog.cancel();
}
示例9: onPreExecute
import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected void onPreExecute() {
super.onPreExecute();
progDailog = new ProgressDialog(context);
progDailog.setMessage(context.getResources().getString(R.string.loading));
progDailog.setIndeterminate(false);
progDailog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
progDailog.setCancelable(false);
progDailog.show();
}
示例10: showProgressDialog
import android.app.ProgressDialog; //导入方法依赖的package包/类
public static void showProgressDialog(Context context) {
dialog = new ProgressDialog(context);
dialog.setIcon(R.mipmap.ic_launcher);
dialog.setTitle(R.string.app_name);
dialog.setMessage("请等候,数据加载中……");
dialog.show();
}
示例11: onPreExecute
import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected void onPreExecute() {
super.onPreExecute();
pDialog = new ProgressDialog(Log_in.this);
pDialog.setMessage("Loging in....");
pDialog.setIndeterminate(false);
pDialog.setCancelable(false);
pDialog.show();
}
示例12: onPreExecute
import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected void onPreExecute() {
super.onPreExecute();
// hack to get theme applied (which is not automatically applied due to activity's Theme.NoDisplay
ContextThemeWrapper theme = new ContextThemeWrapper(InstallExtensionDialogActivity.this,
FDroidApp.getCurThemeResId());
progressDialog = new ProgressDialog(theme);
progressDialog.setMessage(InstallExtension.create(getApplicationContext()).getInstallingString());
progressDialog.setIndeterminate(true);
progressDialog.setCancelable(false);
progressDialog.show();
}
示例13: onCreateDialog
import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
ProgressDialog pd = new ProgressDialog(getActivity());
pd.setMessage(getString(R.string.dialog_subloader_copying));
pd.setIndeterminate(true);
pd.setCancelable(true);
return pd;
}
示例14: initView
import android.app.ProgressDialog; //导入方法依赖的package包/类
private void initView() {
mRegister = (Button) findViewById(R.id.btn_register);
mRegister.setOnClickListener(this);
mUserName = (EditText) findViewById(R.id.user_name);
mPassword = (EditText) findViewById(R.id.pass);
mLogin = (Button) findViewById(R.id.btn_login);
mLogin.setOnClickListener(this);
mKeepPass = (CheckBox) findViewById(R.id.keep_pass);
mForgetPassword = (TextView) findViewById(R.id.forget_pass_word);
mForgetPassword.setOnClickListener(this);
appLabel = (TextView) findViewById(R.id.label);
UtilTools.setFont(this, appLabel);
setAppLabel(appLabel);
//设置选中状态
boolean isChecked = ShareUtil.getBoolean(this, StaticClass.KEEP_PASS, false);
mKeepPass.setChecked(isChecked);
if (isChecked) {
//显示用户名和密码
mUserName.setText(ShareUtil.getString(this, "name", ""));
mPassword.setText(ShareUtil.getString(this, "password", ""));
mUserName.setSelection(mUserName.length());
}
// mCustomDialog = new CustomDialog(this, 400, 400, R.layout.dialog_loading, R.style
// .Theme_dialog, Gravity.CENTER);
mProgressDialog = new ProgressDialog(this);
//屏幕外点击无效
//mCustomDialog.setCancelable(false);
mProgressDialog.setCancelable(false);
mProgressDialog.setMessage("正在登陆......");
//mProgressBar = (ProgressBar) findViewById(R.id.before_login);
}
示例15: onPreExecute
import android.app.ProgressDialog; //导入方法依赖的package包/类
@Override
protected void onPreExecute() {
super.onPreExecute();
mProgressDialog = new ProgressDialog(mContext);
mProgressDialog.setTitle(mContext.getString(R.string.a_005));
mProgressDialog.setMessage(mContext.getString(R.string.f_011));
mProgressDialog.setCancelable(false);
mProgressDialog.show();
}