Search Results

Search found 2 results on 1 pages for 'geltrude'.

Page 1/1 | 1 

  • ProgressDialog won't show, even in onPreExecute of AsyncTask

    - by Geltrude
    In my class, Main extends Activity, I've this: @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); switch (requestCode) { case ... case CREDENTIAL_VIEW: new SetStatusProgressBar(this).execute(); And there is this nested class: private class SetStatusProgressBar extends AsyncTask<String, Void, Boolean> { private ProgressDialog dialog; private Main ctx; public SetStatusProgressBar(Main ctx) { this.ctx = ctx; dialog = new ProgressDialog(ctx); } // progress dialog to show user that contacting server. protected void onPreExecute() { this.dialog = ProgressDialog.show(ctx, null, "Refreshing data from server...", true, false); } @Override protected void onPostExecute(final Boolean success) { //... //statements that refresh UI //... if (dialog.isShowing()) { dialog.dismiss(); timerProgressBarStop(); } } protected Boolean doInBackground(final String... args) { //... //statements to download data from server //... return true; } } In the Main class I open a second Activity, in this way: Intent myIntent = new Intent(Main.this, Credentials.class); startActivityForResult(myIntent, CREDENTIAL_VIEW); That second Activity returns to the Main activity in this way: Intent intent = new Intent(); setResult(RESULT_OK, intent); finish(); I don't understand why when I navigate from the second Activity to the Main, the ProgressDialog will show ONLY AFTER that the UI refreshes... In this way the Progress Dialog stays on the screen only for half second... and then hides! :( I'd like to see the ProgressDialog on top during all the download time! Help, please. Thank you all

    Read the article

  • Free icons for mobile applications. Where?

    - by Geltrude
    I know that in the sdk folders I can find some (not very well grouped, imho) icon. But, there is a site online specialized that let you download free icons useful for mobile app? Ie world flags, up, down... save, revert..., next..., play, stop..., etc. It would be more appriciated also if you can find these sets in many different colors, and in 2 or 3 sizes (32x32, 64x64, etc.). Have a nice day (ot. Especially my mom - her 62 birthday :-) Edit: those are all good sites, but to green-check the answer I need a small set with the common icons (I think moreabout 50-70 icons), in many different colors and in 2 or 3 different sizes (for lo-mid-hi definition devices). - If a so done site exists for free :-)

    Read the article

1