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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:11:33+00:00 2026-06-05T18:11:33+00:00

When my app is loading data in an AsyncTask , it shows a splash

  • 0

When my app is loading data in an AsyncTask, it shows a splash screen. Sometimes this data loading takes under a second and sometimes it takes much longer. However I want to ensure that the splash is up for at least 2 seconds if the data loading finished first, or otherwise wait until the data was done.

My first solution was to use a Countdown Timer, and two boolean values. When the processes would start, their booleans would be set to true. When the process was done, it would set it’s boolean false. Then it would check if the other’s boolean was false, and if it was dismiss the splash.

While this works, I feel like it is overly complicated and was hoping to find a more efficient or better solution.

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

    I want to ensure that the splash is up for at least 2 seconds if the
    data loading finished first, or otherwise wait until the data was
    done.

    You can asyncronously start a Thread(Splash) and AsyncTask for Loading data and call the new Activity on onPostExecute() of you AsyncTask.

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

Sidebar

Related Questions

How can I delay the app loading to show the splash screen for longer?
My App starts with a splash screen loading background data from remote server. After
I want to get data while the app is loading and use this in
With ember-data I'm loading all records of a model with: App.adapter = DS.Adapter.create({ findAll:
My app is crashing after loading thumbnails. On this line the code is downloading
I am loading a web page in my iPhone app. However the page is
I have an ipad app that is loading data remotely into core data, I
I am using an AsyncTask to get the data and then loading it into
I have this WPF application using NHibernate and lazy data loading. I also use
I am loading some JSON data in an AsyncTask, as I want to show

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.