List of usage examples for android.app ProgressDialog setMessage
@Override public void setMessage(CharSequence message)
From source file:com.coinblesk.client.SendPaymentFragment.java
@Override public View onCreateView(final LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { final View view = super.onCreateView(inflater, container, savedInstanceState); assert view != null; final ProgressDialog dialog = new ProgressDialog(this.getActivity()); dialog.setMessage(getString(R.string.fragment_send_dialog_scanning)); dialog.setOnShowListener(new DialogInterface.OnShowListener() { @Override//from w w w.j a v a2 s. co m public void onShow(DialogInterface dialog) { getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LOCKED); } }); dialog.setOnDismissListener(new DialogInterface.OnDismissListener() { @Override public void onDismiss(DialogInterface dialog) { getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED); LocalBroadcastManager.getInstance(getActivity()) .sendBroadcast(new Intent(Constants.STOP_CLIENTS_ACTION)); } }); /*view.setOnTouchListener(new View.OnTouchListener() { private float startPoint = 0; @Override public boolean onTouch(View v, MotionEvent event) { float heightValue = event.getY(); switch (MotionEventCompat.getActionMasked(event)) { case (MotionEvent.ACTION_DOWN): startPoint = heightValue; return true; case (MotionEvent.ACTION_MOVE): if (heightValue - startPoint > THRESHOLD) { if (!dialog.isShowing()) { dialog.show(); IntentFilter instantPaymentFinishedIntentFilter = new IntentFilter(Constants.INSTANT_PAYMENT_FAILED_ACTION); instantPaymentFinishedIntentFilter.addAction(Constants.INSTANT_PAYMENT_SUCCESSFUL_ACTION); LocalBroadcastManager .getInstance(getContext()) .registerReceiver(new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { LocalBroadcastManager.getInstance(getContext()).unregisterReceiver(this); dialog.dismiss(); } }, instantPaymentFinishedIntentFilter); LocalBroadcastManager .getInstance(getContext()) .sendBroadcast(new Intent(Constants.START_CLIENTS_ACTION)); } } break; } return false; } });*/ return view; }
From source file:com.groupme.sdk.activity.PinEntryActivity.java
@Override protected Dialog onCreateDialog(int id, Bundle args) { switch (id) { case DIALOG_LOADING: ProgressDialog dialog = new ProgressDialog(this); dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); dialog.setMessage(getString(R.string.validation_waiting_message)); return dialog; default:// w w w . j av a 2 s. co m throw new IllegalArgumentException("Unknown dialog id: " + id); } }
From source file:com.softminds.matrixcalculator.OperationFragments.InverseFragment.java
@Override public void onListItemClick(ListView L, View V, int position, long id) { ProgressDialog progressDialog = new ProgressDialog(getContext()); progressDialog.setMessage(getString(R.string.Calculating)); progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); progressDialog.setIndeterminate(false); progressDialog.setCanceledOnTouchOutside(false); progressDialog.show();//from w ww .j a va 2 s.c om progress = progressDialog; if (SquareList.get(position).getJamaMatrix().det() != 0) { if (ENABLED_NO_DECIMAL) RunAndGetDeterminantWithAdjoint(position, progressDialog); else RunNewGetInverse(position, progressDialog); } else { new AlertDialog.Builder(getContext()) .setMessage("The Determinant of the matrix was Zero and Hence its Inverse does not exist") .setTitle("No Inverse Exist") .setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { dialogInterface.dismiss(); } }).show(); progressDialog.dismiss(); } }
From source file:at.bitfire.davdroid.ui.setup.DetectConfigurationFragment.java
@NonNull @Override/*from w w w .j a v a2 s.co m*/ public Dialog onCreateDialog(Bundle savedInstanceState) { ProgressDialog progress = new ProgressDialog(getActivity()); progress.setTitle(R.string.login_configuration_detection); progress.setMessage(getString(R.string.login_querying_server)); progress.setIndeterminate(true); progress.setCanceledOnTouchOutside(false); setCancelable(false); return progress; }
From source file:at.ac.uniklu.mobile.sportal.DashboardLogoutProgressDialogFragment.java
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { ProgressDialog d = new ProgressDialog(getActivity()); d.setIndeterminate(true);//from ww w . ja va2 s . c o m d.setCancelable(false); d.setMessage(getString(R.string.work_logout)); return d; }
From source file:fr.eoit.activity.LocationPricesActivity.java
@Override protected void onResume() { super.onResume(); if (!pricesUpdated) { ProgressDialog waitDialog = new ProgressDialog(this); waitDialog.setCancelable(true);//from w ww . j av a 2 s. co m waitDialog.setMessage(getString(R.string.retreiving_station_prices)); waitDialog.show(); new UpdateFavoriteStationPriceAsyncTask(waitDialog, itemId).execute(this); pricesUpdated = true; } }
From source file:com.wenwen.chatuidemo.activity.RegisterActivity.java
/** * //from w w w .java 2 s . c o m * * @param view */ public void register(View view) { final String username = userNameEditText.getText().toString().trim(); final String pwd = passwordEditText.getText().toString().trim(); String confirm_pwd = confirmPwdEditText.getText().toString().trim(); if (TextUtils.isEmpty(username)) { Toast.makeText(this, "????", Toast.LENGTH_SHORT).show(); userNameEditText.requestFocus(); return; } else if (TextUtils.isEmpty(pwd)) { Toast.makeText(this, "???", Toast.LENGTH_SHORT).show(); passwordEditText.requestFocus(); return; } else if (TextUtils.isEmpty(confirm_pwd)) { Toast.makeText(this, "???", Toast.LENGTH_SHORT).show(); confirmPwdEditText.requestFocus(); return; } else if (!pwd.equals(confirm_pwd)) { Toast.makeText(this, "????", Toast.LENGTH_SHORT).show(); return; } if (!TextUtils.isEmpty(username) && !TextUtils.isEmpty(pwd)) { final ProgressDialog pd = new ProgressDialog(this); pd.setMessage("..."); RequestParams params = new RequestParams(); params.put("username", userNameEditText.getText().toString().trim()); params.put("password", MD5.md5("ys_" + passwordEditText.getText().toString().trim()).toUpperCase()); params.put("type", "1"); HttpClientRequest.post(Urls.REG, params, 3000, new AsyncHttpResponseHandler() { @Override public void onStart() { // TODO Auto-generated method stub super.onStart(); pd.show(); } @Override public void onSuccess(int arg0, Header[] arg1, byte[] arg2) { // TODO Auto-generated method stub try { String res = new String(arg2); DebugLog.i("res", res); JSONObject result = new JSONObject(res); switch (Integer.valueOf(result.getString("ret"))) { case -1: Toast.makeText(RegisterActivity.this, "?", Toast.LENGTH_SHORT).show(); break; case 1: Toast.makeText(RegisterActivity.this, "?", Toast.LENGTH_SHORT).show(); DemoApplication.getInstance().setUserName(userNameEditText.getText().toString().trim()); DemoApplication.getInstance().setUserUid(result.getString("uid")); Intent intent = new Intent(RegisterActivity.this, PersonalData.class); startActivity(intent); finish(); break; case 0: case -2: case -9: Toast.makeText(RegisterActivity.this, "", Toast.LENGTH_SHORT).show(); break; default: break; } } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } } @Override public void onFinish() { // TODO Auto-generated method stub super.onFinish(); pd.dismiss(); } @Override public void onFailure(int arg0, Header[] arg1, byte[] arg2, Throwable arg3) { } }); } }
From source file:com.ntsync.android.sync.activities.VerifyPaymentProgressDialog.java
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { ProgressDialog dialog = new ProgressDialog(getActivity()); dialog.setMessage(getText(R.string.shop_activity_verifyprogress)); dialog.setIndeterminate(true);/*w w w . j a va 2 s .co m*/ return dialog; }
From source file:com.manning.androidhacks.hack023.authenticator.AuthenticatorActivity.java
@Override protected Dialog onCreateDialog(int id) { final ProgressDialog dialog = new ProgressDialog(this); dialog.setMessage("Login in"); dialog.setIndeterminate(true);// w w w .j av a 2 s. co m dialog.setCancelable(true); dialog.setOnCancelListener(new DialogInterface.OnCancelListener() { public void onCancel(DialogInterface dialog) { if (mAuthThread != null) { mAuthThread.interrupt(); finish(); } } }); return dialog; }
From source file:at.bitfire.davdroid.ui.DeleteCollectionFragment.java
@NonNull @Override//from w w w . j a v a 2 s .co m public Dialog onCreateDialog(Bundle savedInstanceState) { ProgressDialog progress = new ProgressDialog(getContext()); progress.setTitle(R.string.delete_collection_deleting_collection); progress.setMessage(getString(R.string.please_wait)); progress.setIndeterminate(true); progress.setCanceledOnTouchOutside(false); setCancelable(false); return progress; }