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

  • Home
  • SEARCH
  • 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 6122151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:51:55+00:00 2026-05-23T15:51:55+00:00

My application has a ViewFlipper with 3 ViewGroups in it. Each ViewGroup interaction is

  • 0

My application has a ViewFlipper with 3 ViewGroups in it. Each ViewGroup interaction is dependent on data from a database. I’m using an AsyncTask to read from a database and return a Cursor when it’s done. Before the AsyncTask is executed, I just want to display a single View in the ViewFlipper saying “Loading data, please wait.”, is this possible somehow?

  • 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-05-23T15:51:56+00:00Added an answer on May 23, 2026 at 3:51 pm

    Show the progress dialog in your onPreExecute() and dismiss it in the onPostExecute(). Something like this,

    private class MyAsyncTask extends AsyncTask<Integer, Integer, Integer[]> {
        private ProgressDialog myWait = null;
    
        // This is on the UI thread itself
        protected void onPreExecute() {
            myWait  = new ProgressDialog(MainActivity.this);
            myWait.setMessage("Loading data, please wait");
            myWait.setCancelable(false);
            myWait.show();
        }
    
        // Separate worker thread is used here 
        protected Integer[] doInBackground(Integer...params) {
            //do the database loading
            return <your result - goes to onPostExecute>;
        }
    
        // This is on the UI thread itself
        protected void onPostExecute(Integer[] resultCell) {
            if (myWait  != null) {
                myWait.dismiss();
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My application has to connect and receive data from RFID reader for every 2
I am using viewflipper in an android applicatiion. My application has tabhost within tabhost.
My application has a need to let the user choose a date from a
My application has a command line interface, and I'm thinking about using the GNU
My application has a homebrew logging class that I'm migrating to using log4j under
My application has one table called 'events' and each event has approx 30 standard
My application has to poll a server for a maximum of 10 minutes (using
My application has multiple view controllers. In my VehicleListController I am saving the data
my application has the following database structure: Transactions: - TransactionID (PK, Identity) - Type
My application has to deal with large amounts of data, usual select size is

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.