List of usage examples for android.app ProgressDialog setMessage
@Override public void setMessage(CharSequence message)
From source file:com.wenwen.chatuidemo.activity.PersonFragment.java
void logout() { final ProgressDialog pd = new ProgressDialog(getActivity()); pd.setMessage(".."); pd.setCanceledOnTouchOutside(false); pd.show();/*www. ja va 2 s . c o m*/ DemoApplication.getInstance().logout(new EMCallBack() { @Override public void onSuccess() { getActivity().runOnUiThread(new Runnable() { public void run() { pd.dismiss(); // ?? ((MainActivity) getActivity()).finish(); startActivity(new Intent(getActivity(), LoginActivity.class)); } }); } @Override public void onProgress(int progress, String status) { } @Override public void onError(int code, String message) { } }); }
From source file:com.runye.express.chat.activity.ContactlistFragment.java
/** * ?/*from w w w .j a v a2s.com*/ * * @param toDeleteUser */ public void deleteContact(final User tobeDeleteUser) { final ProgressDialog pd = new ProgressDialog(getActivity()); pd.setMessage("..."); pd.setCanceledOnTouchOutside(false); pd.show(); new Thread(new Runnable() { @Override public void run() { try { EMContactManager.getInstance().deleteContact(tobeDeleteUser.getUsername()); // db? UserDao dao = new UserDao(getActivity()); dao.deleteContact(tobeDeleteUser.getUsername()); MyApplication.getInstance().getContactList().remove(tobeDeleteUser.getUsername()); getActivity().runOnUiThread(new Runnable() { @Override public void run() { pd.dismiss(); adapter.remove(tobeDeleteUser); adapter.notifyDataSetChanged(); } }); } catch (final Exception e) { getActivity().runOnUiThread(new Runnable() { @Override public void run() { pd.dismiss(); Toast.makeText(getActivity(), ": " + e.getMessage(), 1).show(); } }); } } }).start(); }
From source file:com.groupme.sdk.activity.GroupCreateActivity.java
@Override protected Dialog onCreateDialog(int id, Bundle args) { switch (id) { case DIALOG_CREATING: ProgressDialog dialog = new ProgressDialog(this); dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); dialog.setMessage(getString(R.string.dialog_creating_group)); return dialog; default:/* ww w .j ava 2 s.c om*/ throw new IllegalArgumentException("Unknown dialog id: " + id); } }
From source file:com.aidigame.hisun.imengstar.huanxin.SettingsActivity.java
void logout() { final ProgressDialog pd = new ProgressDialog(this); pd.setMessage(".."); pd.setCanceledOnTouchOutside(false); pd.show();/* w ww .jav a 2 s. c o m*/ }
From source file:com.google.android.gms.samples.wallet.LoginFragment.java
private ProgressDialog initializeProgressDialog() { ProgressDialog dialog = new ProgressDialog(getActivity()); dialog.setIndeterminate(true);//w w w. j a v a 2 s.c o m dialog.setMessage(getString(R.string.loading)); return dialog; }
From source file:com.bestjoy.app.haierwarrantycard.ui.SettingsPreferenceActivity.java
@Override public Dialog onCreateDialog(int id) { switch (id) { //add by chenkai, 20131201, add network check case DIALOG_DATA_NOT_CONNECTED: return ComConnectivityManager.getInstance().onCreateNoNetworkDialog(this); case DIALOG_PROGRESS: ProgressDialog progressDialog = new ProgressDialog(this); progressDialog.setMessage(getString(R.string.msg_progressdialog_wait)); progressDialog.setCancelable(false); return progressDialog; }//from ww w . j a v a 2s . com return super.onCreateDialog(id); }
From source file:com.xuejian.client.lxp.module.toolbox.im.ContactlistFragment.java
/** * user???/*ww w. jav a 2s .co m*/ */ private void moveToBlacklist(final String username) { final ProgressDialog pd = new ProgressDialog(getActivity()); pd.setMessage("???..."); pd.setCanceledOnTouchOutside(false); pd.show(); new Thread(new Runnable() { public void run() { try { //??? EMContactManager.getInstance().addUserToBlackList(username, true); if (isAdded()) getActivity().runOnUiThread(new Runnable() { public void run() { pd.dismiss(); // Toast.makeText(getActivity(), "????", Toast.LENGTH_SHORT).show(); ToastUtil.getInstance(getActivity()).showToast("?"); } }); } catch (EaseMobException e) { e.printStackTrace(); if (isAdded()) getActivity().runOnUiThread(new Runnable() { public void run() { pd.dismiss(); // Toast.makeText(getActivity(), "???", Toast.LENGTH_SHORT).show(); ToastUtil.getInstance(getActivity()).showToast("~??"); } }); } } }).start(); }
From source file:com.pansapiens.occyd.NewPost.java
@Override protected Dialog onCreateDialog(int id) { switch (id) { case DIALOG_POSTING: { ProgressDialog dialog = new ProgressDialog(this); dialog.setTitle("Posting ..."); dialog.setMessage("Posting ..."); dialog.setIndeterminate(true);/*from w w w . ja v a2s . c om*/ dialog.setCancelable(false); return dialog; } } return null; }
From source file:com.easemob.ui.ContactlistFragment.java
/** * ?// ww w .ja v a 2 s. c o m * @param toDeleteUser */ public void deleteContact(final User tobeDeleteUser) { final ProgressDialog pd = new ProgressDialog(getActivity()); pd.setMessage("..."); pd.setCanceledOnTouchOutside(false); pd.show(); new Thread(new Runnable() { public void run() { try { EMContactManager.getInstance().deleteContact(tobeDeleteUser.getUsername()); //db? UserDao dao = new UserDao(getActivity()); dao.deleteContact(tobeDeleteUser.getUsername()); MyApplication.getInstance().getContactList().remove(tobeDeleteUser.getUsername()); getActivity().runOnUiThread(new Runnable() { public void run() { pd.dismiss(); adapter.remove(tobeDeleteUser); adapter.notifyDataSetChanged(); } }); } catch (final Exception e) { getActivity().runOnUiThread(new Runnable() { public void run() { pd.dismiss(); Toast.makeText(getActivity(), ": " + e.getMessage(), 1).show(); } }); } } }).start(); }
From source file:org.dash.wallet.integration.uphold.ui.UpholdAccountActivity.java
private void loadUserBalance() { final ProgressDialog loadingDialog = new ProgressDialog(this); loadingDialog.setIndeterminate(true); loadingDialog.setCancelable(false);//from w w w . j a v a2 s. c o m loadingDialog.setMessage(getString(R.string.loading)); loadingDialog.show(); UpholdClient.getInstance().getDashBalance(new UpholdClient.Callback<BigDecimal>() { @Override public void onSuccess(BigDecimal data) { balance = data; balanceView.setAmount(Coin.parseCoin(balance.toString())); loadingDialog.cancel(); } @Override public void onError(Exception e, boolean otpRequired) { loadingDialog.cancel(); showErrorAlert(); } }); }