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:com.angelhack.person2person.AbstractGetNameTask.java
@Override protected void onPreExecute() { // TODO Auto-generated method stub super.onPreExecute(); dialog = new ProgressDialog(mActivity, R.style.StyledDialog); dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); dialog.setMessage(" Connecting with your account , Please Wait...."); dialog.setIndeterminate(true);//w w w . j a v a 2 s. c o m dialog.setCanceledOnTouchOutside(false); dialog.show(); }
From source file:com.gigathinking.simpleapplock.ResetUnlockMethod.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.layout_reset); getActionBar().setDisplayHomeAsUpEnabled(true); mDialog = new ProgressDialog(this, ProgressDialog.STYLE_SPINNER); mDialog.setIndeterminate(true);//from w w w. j a v a 2 s. c o m prefs = PreferenceManager.getDefaultSharedPreferences(this); mResetReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { prefs.edit().putString(AppLockApplication.LOCKTYPE, AppLockApplication.LOCKTYPE_PIN).commit(); prefs.edit() .putString(AppLockApplication.PASSWORD, intent.getStringExtra(AppLockApplication.PASSWORD)) .commit(); Toast.makeText(context, getString(R.string.pin_reset), Toast.LENGTH_LONG).show(); startActivity(new Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_HOME) .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)); //startActivity(new Intent(ResetUnlockMethod.this,UnlockWithPIN.class).putExtra("test","test")); finish(); } }; LocalBroadcastManager.getInstance(this).registerReceiver(mResetReceiver, new IntentFilter(AppLockApplication.RESET_UNLOCK)); if (!PreferenceManager.getDefaultSharedPreferences(this).getBoolean(getString(R.string.register_complete), false)) { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage(getString(R.string.reset_register_device)); builder.setTitle(getString(R.string.info)); builder.setPositiveButton(getString(R.string.register), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { new Register().execute(); if (mDialog != null) { mDialog.setMessage(getString(R.string.register_ongoing)); mDialog.show(); } dialog.dismiss(); } }); builder.setNegativeButton(getString(R.string.cancel), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); finish(); Intent intent = new Intent(Intent.ACTION_MAIN); intent.addCategory(Intent.CATEGORY_HOME); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); } }); builder.create().show(); } else { if (mDialog != null) { mDialog.setMessage(getString(R.string.connect_to_server)); mDialog.show(); } new DoRequestReset().execute(); } }
From source file:com.wms.opensource.images3android.task.LoadImagePlantTask.java
protected void onPreExecute() { if (!shouldAutoRun) { progressDialog = DialogUtil.showWaitingProgressDialog(context, ProgressDialog.STYLE_SPINNER, context.getString(R.string.loadingImages), false); }//from w ww.jav a2 s. co m }
From source file:com.example.b1013029.myapplication.MapsActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_maps); ///*w ww .ja va2s.com*/ progressDialog = new ProgressDialog(this); progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); progressDialog.setMessage("??......"); progressDialog.hide(); //? markerPoints = new ArrayList<LatLng>(); final SupportMapFragment mapfragment = (SupportMapFragment) getSupportFragmentManager() .findFragmentById(R.id.map); gMap = mapfragment.getMap(); //?? LatLng location = new LatLng(34.802556297454004, 135.53884506225586); gMap.moveCamera(CameraUpdateFactory.newLatLngZoom(location, 17)); if (gMap != null) { gMap.setMyLocationEnabled(true); // gMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() { @Override public void onMapClick(LatLng point) { //3?? if (markerPoints.size() > 1) { markerPoints.clear(); gMap.clear(); } markerPoints.add(point); options = new MarkerOptions(); options.position(point); if (markerPoints.size() == 1) { options.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE)); options.title("A"); } else if (markerPoints.size() == 2) { options.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN)); options.title("B"); } gMap.addMarker(options); gMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() { @Override public boolean onMarkerClick(Marker marker) { // TODO Auto-generated method stub String title = marker.getTitle(); if (title.equals("A")) { marker.setSnippet(info_A); } else if (title.equals("B")) { marker.setSnippet(info_B); } return false; } }); if (markerPoints.size() == 2) { // routeSearch(); } } }); } setUpMapIfNeeded(); initMap(); }
From source file:cn.zhangls.android.weibo.common.BaseActivity.java
/** * ?/* w ww . j ava 2 s. co m*/ */ protected void showProgressDialog() { mProgressDialog = new ProgressDialog(this); mProgressDialog.setCancelable(false); mProgressDialog.setMessage("loading..."); mProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); if (!mProgressDialog.isShowing()) { mProgressDialog.show(); } }
From source file:org.liberty.android.fantastischmemo.ui.loader.MultipleLoaderManager.java
/** * @param forceReload if it is true, all loader will be reloaded, if not, the * loader will only be reloadeed if it is registered with reloadOnStart = true. */// ww w . j a va 2 s . c om public void startLoading(boolean forceReload) { progressDialog = new ProgressDialog(activity); progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); progressDialog.setTitle(R.string.loading_please_wait); progressDialog.setMessage(activity.getString(R.string.loading_database)); progressDialog.setCancelable(false); progressDialog.show(); LoaderManager.enableDebugLogging(true); LoaderManager loaderManager = activity.getSupportLoaderManager(); for (int id : loaderCallbackMap.keySet()) { if (loaderReloadOnStartMap.get(id) || forceReload) { loaderManager.restartLoader(id, null, loaderCallbackMap.get(id)); } else { loaderManager.initLoader(id, null, loaderCallbackMap.get(id)); } runningLoaderCount++; } // runningLoaderCount = loaderCallbackMap.size(); }
From source file:weavebytes.com.futureerp.activities.DashBoardActivity.java
public void JsonParsing() { new AsyncTask<Void, Void, String>() { @Override//from w ww . ja va 2s . co m protected void onPreExecute() { super.onPreExecute(); progress.setMessage("Please Wait.."); progress.setProgressStyle(ProgressDialog.STYLE_SPINNER); progress.setCancelable(true); progress.show(); } @Override protected String doInBackground(Void... params) { if (isOnline()) { HttpClient httpClient = new DefaultHttpClient(); HttpGet httpget = new HttpGet(Config.URL + Config.U_ID); HttpResponse response = null; try { response = httpClient.execute(httpget); //Converting Response To JsonString return ConvertResponse_TO_JSON.entityToString(response.getEntity()); } catch (ClientProtocolException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return "Bad Network"; } else { return "Check Your Connection"; } } @Override protected void onPostExecute(String JasonString) { try { progress.dismiss(); try { JSONArray JArray; JArray = new JSONArray(JasonString); for (int i = 0; i < JArray.length(); i++) { JSONObject obj = JArray.optJSONObject(i); String name = obj.optString("name").toString(); arrayList.add(name); } } catch (Exception e) { e.printStackTrace(); } MyAdapter myAdapter = new MyAdapter(DashBoardActivity.this, arrayList, Config.IMG_ID); list = (ListView) (findViewById(R.id.list)); list.setAdapter(myAdapter); } catch (Exception e) { e.printStackTrace(); } } }.execute(); }
From source file:com.wms.opensource.images3android.task.LoadImagesTask.java
protected void onPreExecute() { progressDialog = DialogUtil.showWaitingProgressDialog(context, ProgressDialog.STYLE_SPINNER, context.getString(R.string.loadingImages), false); }
From source file:org.sufficientlysecure.keychain.service.ServiceProgressHandler.java
public void showProgressDialog() { showProgressDialog("", ProgressDialog.STYLE_SPINNER, false); }
From source file:com.nothingoneday.feature.base.api.sync.AsyncTaskActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.async_task); Logger.getInstance().clearCache(); mImageView = (ImageView) findViewById(R.id.image); mButton = (Button) findViewById(R.id.button); mButton.setOnClickListener(new OnClickListener() { public void onClick(View v) { new LoadAsyncTask().execute(IMAGE_PATH); }/*from w ww.ja va 2 s.c o m*/ }); mTextView = (TextView) findViewById(R.id.callback); mProgressDialog = new ProgressDialog(this); mProgressDialog.setTitle("?"); mProgressDialog.setMessage("??...."); mProgressDialog.setCancelable(false); mProgressDialog.setProgress(ProgressDialog.STYLE_SPINNER); }