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 8176265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:05:56+00:00 2026-06-06T23:05:56+00:00

I am working on android project in which I have to apply loading screen

  • 0

I am working on android project in which I have to apply loading screen until the data loads from database. I know that how to start proegressBar but I need to know how can I stop the loading screen as data loaded from database.If u can please give me one simple example from which I can understand that how can I do this because I am new to android.

  • 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-06T23:05:58+00:00Added an answer on June 6, 2026 at 11:05 pm

    Since you are getting data from a database you should do it asynchronously.
    The best way to do it would be using an AsyncTask.

    class GetDataTask extends AsyncTask<Void, Void, Void>{
        ProgressDialog dialog;
    
        @Override
        protected void onPreExecute() {
            super.onPreExecute();
            dialog = new ProgressDialog(YourActivity.this);
            dialog.setMessage("Loading...");
            dialog.setIndeterminate(true);
            dialog.show();
    
        }
    
        @Override
        protected Void doInBackground(Void... params) {
            //get data from DB here
            return null;
        }
    
        @Override
        protected void onPostExecute(Void result) {
            super.onPostExecute(result);
            dialog.dismiss();
        }       
    }
    

    And to make it execute: new GetDataTask().execute();

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

Sidebar

Related Questions

I'm currently working on an Android project, where I have to collect data from
I have an Android project in eclipse IDE which was working. After some imports
I have an Android project that uses a library project (all of which I
I am currently working on a php/javascript project which retrieves information from a database
I am working on an Android app that displays photos which are downloaded from
I am working on an android sms gateway project which receives sms from client
I am working on android project. I have 3 pages in which each page
I have an Android project, which I'm working on in Eclipse. There are no
I am working on an Android project which relies on the unique UID of
I am currently working on an android project which lists all of the apps

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.