List of usage examples for android.app ProgressDialog STYLE_SPINNER
int STYLE_SPINNER
To view the source code for android.app ProgressDialog STYLE_SPINNER.
Click Source Link
From source file:cl.mmoscoso.geocomm.sync.GeoCommCreateRouteAsyncTask.java
public GeoCommCreateRouteAsyncTask(Context context, String hn, String name, String desc, boolean is_public, int id) { this.context = context; this.hostname = hn; this.desc = desc; this.name = name; this.is_public = is_public; this.id_user = id; this.mProgressDialog = new ProgressDialog(context); this.mProgressDialog.setMessage(this.context.getResources().getString(R.string.Loading)); this.mProgressDialog.setIndeterminate(false); this.mProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); this.mProgressDialog.setCancelable(true); }
From source file:cl.mmoscoso.geocomm.sync.GeoCommLogInAsyncTask.java
public GeoCommLogInAsyncTask(Context context, String hn, String name, String pass, GeoCommUser user) { this.context = context; this.hostname = hn; this.pass = pass; this.name = name; this.user = user; this.mProgressDialog = new ProgressDialog(context); this.mProgressDialog.setMessage(this.context.getResources().getString(R.string.Loading)); this.mProgressDialog.setIndeterminate(false); this.mProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); this.mProgressDialog.setCancelable(true); }
From source file:com.example.okano.simpleroutesearch.MapsActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // setContentView(R.layout.activity_maps); setContentView(R.layout.activity_main); t = new TkyJavaLibs(); setUpMapIfNeeded();// w ww . j a va 2 s . c om // progressDialog = new ProgressDialog(this); progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); progressDialog.setMessage(""); progressDialog.hide(); Button showRouteInfoBtn = (Button) findViewById(R.id.routeInfo); showRouteInfoBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { showMapInfo(); } }); Button dismissRouteInfoBtn = (Button) findViewById(R.id.dismissRouteInfo); dismissRouteInfoBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mPopupWindow.dismiss(); } }); }
From source file:org.puder.trs80.InitialSetupDialogFragment.java
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { ProgressDialog progressDialog = new ProgressDialog(getActivity()); progressDialog.setCancelable(false); progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); return progressDialog; }
From source file:cl.mmoscoso.geocomm.sync.GeoCommGetRoutesOwnerAsyncTask.java
/** * /*from w ww .j a va 2 s. co m*/ * @param cont * @param url * @param username * @param password */ public GeoCommGetRoutesOwnerAsyncTask(Context cont, String host, List<GeoCommRoute> routes, ListView listview, int id_user) { this.context = cont; this.list_routes = routes; this.listview = listview; this.hostname = host; this.id_user = id_user; this.mProgressDialog = new ProgressDialog(context); this.mProgressDialog.setMessage(context.getResources().getString(R.string.mssg_loading_routes)); this.mProgressDialog.setIndeterminate(false); this.mProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); this.mProgressDialog.setCancelable(true); }
From source file:cl.mmoscoso.geocomm.sync.GeoCommCreatePointAsyncTask.java
public GeoCommCreatePointAsyncTask(Context context, String hn, String name, String desc, String latitude, String longitude, int id_route) { this.context = context; this.hostname = hn; this.desc = desc; this.name = name; this.id_route = id_route; this.latitude = latitude; this.longitude = longitude; this.mProgressDialog = new ProgressDialog(context); this.mProgressDialog.setMessage(this.context.getResources().getString(R.string.Loading)); this.mProgressDialog.setIndeterminate(false); this.mProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); this.mProgressDialog.setCancelable(true); }
From source file:com.zirconi.huaxiaclient.ScoreActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.score_layout); NUM = this.getIntent().getStringExtra("NUM"); SharedPreferences temp = this.getSharedPreferences("LOGIN", MODE_PRIVATE); lv_score = (ListView) this.findViewById(R.id.score_lv_score); dialog = new ProgressDialog(this); dialog.setTitle(""); dialog.setMessage(""); dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); dialog.show();/*from www.j a v a 2 s. c om*/ ITEM_INFO = new ArrayList<Map<String, String>>(); year = new ArrayList<String>(); term = new ArrayList<String>(); name = new ArrayList<String>(); type = new ArrayList<String>(); teacher = new ArrayList<String>(); test = new ArrayList<String>(); score = new ArrayList<String>(); MKEscore = new ArrayList<String>(); rescore = new ArrayList<String>(); credit = new ArrayList<String>(); if (temp.getBoolean("TEL", true)) { this.SCORE_PAGE = SharedApplication.HTTP_TEL_ADDR; } else { this.SCORE_PAGE = SharedApplication.HTTP_CER_ADDR; } new AsyncScore().execute(SCORE_PAGE); }
From source file:de.baumann.hhsmoodle.helper.helper_webView.java
public static void webView_WebViewClient(final Activity from, final SwipeRefreshLayout swipeRefreshLayout, final WebView webView) { webView.setWebViewClient(new WebViewClient() { ProgressDialog progressDialog;//from w w w .j a v a 2 s .c o m int numb; public void onPageFinished(WebView view, String url) { super.onPageFinished(view, url); ViewPager viewPager = (ViewPager) from.findViewById(R.id.viewpager); SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(from); sharedPref.edit().putString("loadURL", webView.getUrl()).apply(); if (viewPager.getCurrentItem() == 0) { if (url != null) { from.setTitle(webView.getTitle()); } } if (url != null && url.contains("moodle.huebsch.ka.schule-bw.de/moodle/") && url.contains("/login/")) { if (viewPager.getCurrentItem() == 0 && numb != 1) { progressDialog = new ProgressDialog(from); progressDialog.setTitle(from.getString(R.string.login_title)); progressDialog.setMessage(from.getString(R.string.login_text)); progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); progressDialog.setButton(DialogInterface.BUTTON_NEGATIVE, from.getString(R.string.toast_settings), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { helper_main.switchToActivity(from, Activity_settings.class, true); } }); progressDialog.show(); numb = 1; progressDialog.setOnCancelListener(new DialogInterface.OnCancelListener() { @Override public void onCancel(DialogInterface dialog) { numb = 0; } }); } } else if (progressDialog != null && progressDialog.isShowing()) { progressDialog.cancel(); numb = 0; } swipeRefreshLayout.setRefreshing(false); class_SecurePreferences sharedPrefSec = new class_SecurePreferences(from, "sharedPrefSec", "Ywn-YM.XK$b:/:&CsL8;=L,y4", true); String username = sharedPrefSec.getString("username"); String password = sharedPrefSec.getString("password"); final String js = "javascript:" + "document.getElementById('password').value = '" + password + "';" + "document.getElementById('username').value = '" + username + "';" + "var ans = document.getElementsByName('answer');" + "document.getElementById('loginbtn').click()"; if (Build.VERSION.SDK_INT >= 19) { view.evaluateJavascript(js, new ValueCallback<String>() { @Override public void onReceiveValue(String s) { } }); } else { view.loadUrl(js); } } @SuppressWarnings("deprecation") @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { final Uri uri = Uri.parse(url); return handleUri(uri); } @TargetApi(Build.VERSION_CODES.N) @Override public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) { final Uri uri = request.getUrl(); return handleUri(uri); } private boolean handleUri(final Uri uri) { Log.i(TAG, "Uri =" + uri); final String url = uri.toString(); // Based on some condition you need to determine if you are going to load the url // in your web view itself or in a browser. // You can use `host` or `scheme` or any part of the `uri` to decide. if (url.startsWith("http")) return false;//open web links as usual //try to find browse activity to handle uri Uri parsedUri = Uri.parse(url); PackageManager packageManager = from.getPackageManager(); Intent browseIntent = new Intent(Intent.ACTION_VIEW).setData(parsedUri); if (browseIntent.resolveActivity(packageManager) != null) { from.startActivity(browseIntent); return true; } //if not activity found, try to parse intent:// if (url.startsWith("intent:")) { try { Intent intent = Intent.parseUri(url, Intent.URI_INTENT_SCHEME); if (intent.resolveActivity(from.getPackageManager()) != null) { from.startActivity(intent); return true; } //try to find fallback url String fallbackUrl = intent.getStringExtra("browser_fallback_url"); if (fallbackUrl != null) { webView.loadUrl(fallbackUrl); return true; } //invite to install Intent marketIntent = new Intent(Intent.ACTION_VIEW) .setData(Uri.parse("market://details?id=" + intent.getPackage())); if (marketIntent.resolveActivity(packageManager) != null) { from.startActivity(marketIntent); return true; } } catch (URISyntaxException e) { //not an intent uri } } return true;//do nothing in other cases } }); }
From source file:com.ntsync.android.sync.activities.ShowLicensesActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); SystemHelper.initSystem(this); mWebView = new WebView(this); CharSequence title = getText(R.string.license_activity_title); CharSequence msg = getText(R.string.license_activity_loading); ProgressDialog pd = ProgressDialog.show(this, title, msg, true, false); pd.setProgressStyle(ProgressDialog.STYLE_SPINNER); mSpinnerDlg = pd;/* w w w . j a v a 2s . c om*/ getSupportLoaderManager().initLoader(LOADID_LICENSES, null, this); }
From source file:it.scoppelletti.mobilepower.app.ProgressDialogFragment.java
/** * Crea il dialogo.//from w ww . j ava 2 s .co m * * @param savedInstanceState Stato dell’istanza. * @return Dialogo. */ @Override public Dialog onCreateDialog(Bundle savedInstanceState) { int max, resId; ProgressDialog dlg; Bundle args = getArguments(); dlg = new ProgressDialog(getActivity(), AppUtils.getDialogTheme()); resId = args.getInt(ProgressDialogFragment.ARG_TITLEID); dlg.setTitle(getString(resId)); max = args.getInt(ProgressDialogFragment.ARG_MAX, -1); if (max > 0) { dlg.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); dlg.setIndeterminate(false); dlg.setMax(max); } else { dlg.setIndeterminate(true); dlg.setProgressStyle(ProgressDialog.STYLE_SPINNER); } dlg.setCancelable(args.getBoolean(ProgressDialogFragment.ARG_CANCELABLE)); dlg.setCanceledOnTouchOutside(false); return dlg; }