List of usage examples for android.app ProgressDialog show
public static ProgressDialog show(Context context, CharSequence title, CharSequence message)
From source file:org.service.TaskGetEdifice.java
/** * Antes de comenzar la tarea muestra el progressDialog * *///from w w w. ja v a2 s . com @Override protected void onPreExecute() { super.onPreExecute(); progressDialog = ProgressDialog.show(context, "Por favor espere", "Procesando..."); }
From source file:com.example.jarida.PayPalLoginActivity.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); webView = new WebView(this); webView.getSettings().setJavaScriptEnabled(true); webView.setWebViewClient(new PPWebViewClient()); setContentView(webView);//from www . j a va2 s. c om helper = AccessHelperConnect.init(CLIENT_ID, CLIENT_SECRET); progress = ProgressDialog.show(PayPalLoginActivity.this, getString(R.string.progress_loading_title), getString(R.string.progress_loading_msg)); webView.loadUrl(helper.getAuthUrl()); }
From source file:com.shanet.relayremote.Background.java
public Background(Context context, final char op, boolean isWidget) { this.context = context; this.op = op; this.isWidget = isWidget; // If a widget, don't show any dialogs if (isWidget) return;/*from w ww. j a va2 s . co m*/ dialog = new ProgressDialog(context); // Show a dialog if the bg thread runs longer than the time specified in onPreExecute() below timer = new Timer(); tt = new TimerTask() { @Override public void run() { Looper.prepare(); ((Activity) Background.this.context).runOnUiThread(new Runnable() { public void run() { dialog = ProgressDialog.show(Background.this.context, "", Background.this.context.getString( (op == Constants.OP_SET) ? R.string.connServer : R.string.gettingStates)); } }); } }; }
From source file:com.paypal.example.android.ppaccess.LoginActivity.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); webView = new WebView(this); webView.getSettings().setJavaScriptEnabled(true); webView.setWebViewClient(new PPWebViewClient()); setContentView(webView);/*w ww . jav a 2 s . c o m*/ helper = AccessHelperConnect.init(CLIENT_ID, CLIENT_SECRET); progress = ProgressDialog.show(LoginActivity.this, getString(R.string.progress_loading_title), getString(R.string.progress_loading_msg)); webView.loadUrl(helper.getAuthUrl()); }
From source file:it.uniroma2.foundme.studente.Connection.java
@Override protected void onPreExecute() { if (enProgressDialog) caricamento = ProgressDialog.show(context, Variables_it.WAIT, ProgressDialogMessage); }
From source file:com.pandoroid.PandoroidStationSelect.java
@Override protected void onResume() { super.onResume(); if (m_is_bound) { startup();/*from w w w .j a v a2s . c o m*/ } else { m_waiting = ProgressDialog.show(PandoroidStationSelect.this, "", getString(R.string.loading)); } }
From source file:asia.covisoft.goom.IntroActivity.java
private void checkConnection() { NetworkClient.checkInternetConnection(5, new NetworkClient.OnConnectedListener() { @Override//from w w w . ja va2s .co m public void onPreConnect() { progressDialog = ProgressDialog.show(mContext, null, getString(R.string.dialog_connecting)); } @Override public void onConnected() { progressDialog.dismiss(); registerGCM(); } @Override public void onFail() { progressDialog.dismiss(); new AlertDialog.Builder(mContext).setCancelable(false) .setTitle(getString(R.string.dialog_connectionfailed_title)) .setMessage(getString(R.string.dialog_connectionfailed_message)).setPositiveButton( getString(R.string.lowcase_tryagain), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { checkConnection(); } }) .show(); } }); }
From source file:com.normalexception.app.rx8club.task.ProfileTask.java
@Override protected void onPreExecute() { mProgressDialog = ProgressDialog.show(sourceFragment.getActivity(), "Updating...", "Updating Profile..."); }
From source file:cn.newgxu.android.notty.ui.LoginBoxFragment.java
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { View v = LayoutInflater.from(getActivity()).inflate(R.layout.login, null); final EditText account = (EditText) v.findViewById(R.id.account); final EditText pwd = (EditText) v.findViewById(R.id.password); return new AlertDialog.Builder(getActivity()).setCancelable(false).setTitle(R.string.login_box) .setIcon(StyleUtils.getThemeDependentAttr(getActivity().getTheme(), R.attr.user_icon)).setView(v) .setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() { @Override/*w w w . java 2 s. co m*/ public void onClick(DialogInterface dialog, int which) { progressDialog = ProgressDialog.show(getActivity(), "login...", "login..."); new Handler().post(new Runnable() { @Override public void run() { String _account = account.getEditableText().toString(); String _pwd = pwd.getEditableText().toString(); NottyApplication app = NottyApplication.getApp(); SharedPreferences prefs = app.getPrefs(); try { JSONObject result = RESTMethod .get(C.DOMAIN + "/info/login?account=" + _account + "&pwd=" + _pwd); if (result.getInt(C.STATUS) == C.OK) { // put the account and pwd to the app' s context. SharedPreferences.Editor editor = NottyApplication.getApp().getPrefs() .edit(); editor.putString(C.ACCOUNT, _account); editor.putString(C.PWD, _pwd); JSONObject u = result.getJSONObject(C.USER); editor.putLong(C._ID, u.getLong(C.ID)); editor.putString(C.user.AUTHED_NAME, u.getString(C.user.AUTHED_NAME)); editor.commit(); Toast.makeText(getActivity(), R.string.login_ok, Toast.LENGTH_SHORT).show(); Intent intent = new Intent(getActivity(), UserServiceActivity.class); startActivity(intent); } else { Toast.makeText(getActivity(), getString(R.string.login_no) + ": " + result.getString(C.MSG), Toast.LENGTH_SHORT).show(); } } catch (Exception e) { L.wtf(TAG, "error when try to login in the thread.", e); } } }); progressDialog.dismiss(); // new Thread(new Runnable() { // @Override // public void run() { // try { // Thread.sleep(3000); // JSONObject result = RESTMethod.get(C.DOMAIN // + "/info/login?account=" + _account + "&pwd=" + _pwd); // if (result.getInt(C.STATUS) == C.OK) { //// put the account and pwd to the app' s context. // SharedPreferences.Editor editor = NottyApplication.getApp().getPrefs().edit(); // editor.putString(C.ACCOUNT, _account); // editor.putString(C.PWD, _pwd); // editor.commit(); // Toast.makeText(getActivity(), R.string.login_ok, Toast.LENGTH_SHORT).show(); // } else { // Toast.makeText(getActivity(), R.string.login_no + ": " // + result.getString(C.MSG), Toast.LENGTH_SHORT).show(); // } // } catch (Exception e) { // L.wtf(TAG, "error when try to login in the thread.", e); // } finally { // progressDialog.dismiss(); // } // } // }).start(); } }).setNegativeButton(R.string.no, null).create(); }
From source file:com.normalexception.app.rx8club.task.PmTask.java
@Override protected void onPreExecute() { mProgressDialog = ProgressDialog.show(sourceFragment.getActivity(), "Sending...", "Sending PM..."); }