List of usage examples for android.app ProgressDialog ProgressDialog
public ProgressDialog(Context context)
From source file:com.dmsl.anyplace.tasks.FetchBuildingsTask.java
@Override protected void onPreExecute() { if (showDialog) { dialog = new ProgressDialog(ctx); dialog.setIndeterminate(true);/*from w ww .ja v a 2 s. co m*/ dialog.setTitle("Fetching Buildings"); dialog.setMessage("Please be patient..."); dialog.setCancelable(true); dialog.setCanceledOnTouchOutside(false); dialog.setOnCancelListener(new DialogInterface.OnCancelListener() { @Override public void onCancel(DialogInterface dialog) { FetchBuildingsTask.this.cancel(true); } }); dialog.show(); } }
From source file:com.renren.api.connect.android.view.RenrenDialog.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); progress = new ProgressDialog(getContext()); progress.requestWindowFeature(Window.FEATURE_NO_TITLE); progress.setMessage("Loading..."); content = new LinearLayout(getContext()); content.setOrientation(LinearLayout.VERTICAL); requestWindowFeature(Window.FEATURE_NO_TITLE); if (this.showTitle) { setUpTitle();/*w w w .ja va 2 s. c om*/ } setUpWebView(); Display display = getWindow().getWindowManager().getDefaultDisplay(); float scale = getContext().getResources().getDisplayMetrics().density; float[] dimensions = display.getWidth() < display.getHeight() ? DIMENSIONS_PORTRAIT : DIMENSIONS_LANDSCAPE; addContentView(content, new FrameLayout.LayoutParams((int) (dimensions[0] * scale + 0.5f), (int) (dimensions[1] * scale + 0.5f))); }
From source file:com.iStudy.Study.Renren.View.RenrenDialog.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); progress = new ProgressDialog(getContext()); progress.requestWindowFeature(Window.FEATURE_NO_TITLE); progress.setMessage("Loading..."); content = new LinearLayout(getContext()); content.setOrientation(LinearLayout.VERTICAL); requestWindowFeature(Window.FEATURE_NO_TITLE); if (this.showTitle) { setUpTitle();//from w w w . j av a 2s. c o m } setUpWebView(); Display display = getWindow().getWindowManager().getDefaultDisplay(); float scale = getContext().getResources().getDisplayMetrics().density; @SuppressWarnings("deprecation") float[] dimensions = display.getWidth() < display.getHeight() ? DIMENSIONS_PORTRAIT : DIMENSIONS_LANDSCAPE; addContentView(content, new FrameLayout.LayoutParams((int) (dimensions[0] * scale + 0.5f), (int) (dimensions[1] * scale + 0.5f))); }
From source file:roommateapp.info.net.FileDownloader.java
/** * On pre exectue./*from ww w .j a v a2s .co m*/ */ @Override protected void onPreExecute() { super.onPreExecute(); dialog = null; dialog = new ProgressDialog(((Activity) ac)); dialog.setTitle(this.dialog_pleaseWait); dialog.setMessage(this.dialog_downloading); dialog.setCancelable(false); dialog.show(); }
From source file:org.cvasilak.jboss.mobile.admin.net.UploadToJBossServerTask.java
@Override protected void onPreExecute() { progressDialog = new ProgressDialog(context); progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); progressDialog.setMessage(context.getString(R.string.uploading)); progressDialog.setCancelable(true);//from w w w. j av a2 s.co m progressDialog.show(); }
From source file:com.dmsl.anyplace.tasks.FetchFloorsByBuidTask.java
@Override protected void onPreExecute() { if (showDialog) { dialog = new ProgressDialog(ctx); dialog.setIndeterminate(true);/*ww w . ja va2s .c o m*/ dialog.setTitle("Fetching floors"); dialog.setMessage("Please be patient..."); dialog.setCancelable(true); dialog.setCanceledOnTouchOutside(false); dialog.setOnCancelListener(new DialogInterface.OnCancelListener() { @Override public void onCancel(DialogInterface dialog) { // finishJob(); FetchFloorsByBuidTask.this.cancel(true); } }); dialog.show(); } }
From source file:devbox.com.br.minercompanion.LoginActivity.java
public void createProgressDialog() { progressDialog = new ProgressDialog(this); progressDialog.setMessage("Conectando-se ao servidor!"); progressDialog.setIndeterminate(true); progressDialog.setCancelable(true);//from w ww. j av a 2s. com }
From source file:com.zirconi.huaxiaclient.TableActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.setContentView(R.layout.table_layout); dialog = new ProgressDialog(this); dialog.setTitle(""); dialog.setMessage(""); dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); dialog.show();/*from w ww .j a v a2s . c o m*/ SharedPreferences tmp = this.getSharedPreferences("LOGIN", MODE_PRIVATE); NUM = this.getIntent().getStringExtra("NUM"); T_1 = new String[DAY_PER_WEEK]; T_2 = new String[DAY_PER_WEEK]; T_3 = new String[DAY_PER_WEEK]; T_4 = new String[DAY_PER_WEEK]; item_1 = new ArrayList<Map<String, String>>(); item_2 = new ArrayList<Map<String, String>>(); item_3 = new ArrayList<Map<String, String>>(); item_4 = new ArrayList<Map<String, String>>(); lv = (ListView) this.findViewById(R.id.table_lv_week); ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, WEEK); lv.setAdapter(adapter); if (tmp.getBoolean("TEL", true)) { this.SERVER = SharedApplication.HTTP_TEL_ADDR; } else { this.SERVER = SharedApplication.HTTP_CER_ADDR; } FinalPAGE = SERVER + TABLE_PAGE + SharedApplication.STU_NUM + NUM + EXTRA; Log.d("FINALPAGE", FinalPAGE); TASK = new AsyncTable(); TASK.execute(FinalPAGE); lv.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View view, int position, long id) { Log.d("POSITION", Integer.toString(position)); switch (position) { case 0: Intent intent_1 = new Intent(TableActivity.this, DetailActivity.class); intent_1.putExtra("day", 0); startActivity(intent_1); break; case 1: Intent intent_2 = new Intent(TableActivity.this, DetailActivity.class); intent_2.putExtra("day", 1); startActivity(intent_2); break; case 2: Intent intent_3 = new Intent(TableActivity.this, DetailActivity.class); intent_3.putExtra("day", 2); startActivity(intent_3); break; case 3: Intent intent_4 = new Intent(TableActivity.this, DetailActivity.class); intent_4.putExtra("day", 3); startActivity(intent_4); break; case 4: Intent intent_5 = new Intent(TableActivity.this, DetailActivity.class); intent_5.putExtra("day", 4); startActivity(intent_5); break; case 5: Intent intent_6 = new Intent(TableActivity.this, DetailActivity.class); intent_6.putExtra("day", 5); startActivity(intent_6); break; case 6: Intent intent_7 = new Intent(TableActivity.this, DetailActivity.class); intent_7.putExtra("day", 6); startActivity(intent_7); break; } } }); }
From source file:com.dmsl.anyplace.tasks.UploadRSSLogTask.java
@Override protected void onPreExecute() { dialog = new ProgressDialog(context); dialog.setMax(100);// w w w . j a v a 2 s.co m dialog.setMessage("Uploading file ..."); dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); dialog.setCancelable(true); dialog.setCanceledOnTouchOutside(false); dialog.setOnCancelListener(new DialogInterface.OnCancelListener() { @Override public void onCancel(DialogInterface dialog) { httppost.abort(); } }); dialog.show(); }
From source file:cm.aptoide.pt.webservices.login.Login.java
@Override public void onCreate(Bundle savedInstanceState) { AptoideThemePicker.setAptoideTheme(this); super.onCreate(savedInstanceState); context = this; // getSupportActionBar().setIcon(R.drawable.brand_padding); // getSupportActionBar().setTitle(getString(R.string.my_account)); // getSupportActionBar().setHomeButtonEnabled(true); // getSupportActionBar().setDisplayHomeAsUpEnabled(true); pd = new ProgressDialog(context); if (isLoggedIn(context)) { setContentView(R.layout.form_logout); ((TextView) findViewById(R.id.username)).setText(getUserLogin(this)); } else {//from w ww .j a va 2 s.c om drawLoginForm(); // if (sPref.getString(Configs.LOGIN_USER_LOGIN, null) != null) { // // username = sPref.getString(Configs.LOGIN_USER_LOGIN, null); // password = sPref.getString(Configs.LOGIN_PASSWORD, null); // new CheckUserCredentials().execute(username, password); // pd.show(); // pd.setMessage("Restoring your previous login."); // } } prefEdit = sPref.edit(); }