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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T05:40:53+00:00 2026-06-15T05:40:53+00:00

When my quiz app starts for the first time it needs to add questions

  • 0

When my quiz app starts for the first time it needs to add questions to a database and a few other things and this takes a few seconds. I want to display a indeterminate progressbar whilst this occurs. Once the questions are added, the class calls finish() and moves on to the main screen. The problem is that the layout isn’t drawn unless finish isn’t called. I assume it doesn’t draw the XML layout until after the oncreate and onstart are called. So how do I get around this?

  • 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-15T05:40:54+00:00Added an answer on June 15, 2026 at 5:40 am

    The reason, the UI isn’t shown while you’re filling your DB is probably that you’re doing that in the UI-Thread – the main thread of your application. As the thread is busy filling your DB, there is no time to show the UI, animate the progress indicator or react to user actions.

    Thus you should always run time-consuming tasks in a separate thread. See this excellent entry in the android devloper’s blog about painless threading for more information and to do it right:

    • http://android-developers.blogspot.co.at/2009/05/painless-threading.html
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a quiz app which populates a sqlite database with questions of around
I'm creating quiz app of sorts for Android. The questions shall be posed in
I'm developing an Android app which is a quiz. On the other hand, I'm
This is my first app. It doesn't crash the simulator just brings you back
I have been working on the app engine for some time, and this problem
This question relates to a RoR quiz app. I am looking to display the
I am making a quiz app for Android. The user has 30 seconds to
I am trying to write an online programming quiz app. So, many questions might
i am designing a app for some quiz. i need an activity that starts
Just a bit about my app first. Its a quiz app. It has a

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.