Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8428983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:12:29+00:00 2026-06-10T05:12:29+00:00

protected void showSpinner() { dialogSpin = ProgressDialog.show(activity, , Loading. Please wait…, true); Thread t

  • 0
protected void showSpinner() {
    dialogSpin = ProgressDialog.show(activity, "", 
            "Loading. Please wait...", true);

    Thread t = new Thread(new Runnable(){

        @Override
        public void run() {
            activity.runOnUiThread(new Runnable() {
                @Override
                public void run() {


                    EverydayNotesAndroid3Activity.importAllCalendar();
                }
            });
        }

    });
    t.start();
}

I want to show the spinner while the thread is running. This way, I can show how my import of calendar is going to the user while I’m importing it.

Problem : my Spinner dialog will only show when the import is done. I don’t know what I’m doing wrong, because according to my code it should show the dialog and then run the import (which takes 30 seconds), but once more, the dialog wait the end of the import to show up.

Thanks for paying attention, ask for more info.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T05:12:31+00:00Added an answer on June 10, 2026 at 5:12 am

    I would use an AsyncTask to import the calendar. AsyncTask has three methods that can be overridden. You overwrite doInBackground and do all the stuff that is done in the background thread there. You can call publishProgress from your background task every time something should change in the UI. The AsyncTask will then call onProgressUpdate in the UI-Thread to allow you to show the progress to the user.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

protected void getNews() { using (SPWeb web = getWeb(InternalNews)) { fetchNewsFromWeb(ref dtNews,true,English,new string[] {
@Override protected void onStop() { super.onStop(); AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage(Test message) .setCancelable(true)
protected void LoginCheck() { if (Session["Login_Status"] == null || Session["Login_Status"] == "false") { MessageBoxShow("Please
protected void Button1_Click(object sender, EventArgs e) { System.Collections.ArrayList list = new System.Collections.ArrayList(); list.Add(abc); list.Add(xyz);
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { URL url = new
Then: protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { CheckBoxList1.Items.Add(new ListItem(item1)); CheckBoxList1.Items.Add(new
protected void displayNotification(String response) { Intent intent = new Intent(context, testActivity.class); PendingIntent pendingIntent =
protected void Button2_Click(object sender, EventArgs e) { SqlConnection conn = new SqlConnection(Data Source=KING;Initial Catalog=semasinter;Integrated
protected void Button1_Click(object sender, EventArgs e) { TableRow tb = new TableRow(); TableCell tc
This protected void Page_Load(object sender, EventArgs e) { RadioButtonList1.Items.Add(new ListItem(London,1)); RadioButtonList1.Items.Add(new ListItem(Paris, 2)); }

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.