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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:12:47+00:00 2026-05-31T05:12:47+00:00

My application performs a number of UI updates in close proximity, for example: User

  • 0

My application performs a number of UI updates in close proximity, for example:

  1. User takes a turn, and all gridview tiles are updated
  2. AI takes a turn, and all gridview tiles are updated
  3. AI takes another turn and all gridview tiles are updated

To get each of these updates to be visible to the user, I added each of these update tasks to a Handler on a non-UI thread. These Adapter’s notifyDataSetChanged() tasks are then added to the UI thread’s handler.

However, the only way I can get each update to be clearly visible is to specify a Thread.sleep() after I invoke the update. Even with this sleep, sometimes 2 & 3 are merged together and the user will only see 3.

As well as this, when 3 is performed sometimes it will take an extra split-second to update the entire grid. So rather than there being 3 clean updates of the grid, the user will seee 4.

As far as I can see, I am performing the Handler functionality as recommended by the programming guide. Therefore, I am wondering what else can I do to get better control of when the UI updates? Is there anything I can do?

  • 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-31T05:12:47+00:00Added an answer on May 31, 2026 at 5:12 am

    This has been answered by dmon above.
    Solution involved posting a Runnable to GridView.post() after I called notifyDataSetChanged in my adapter.
    Game runs a little slower than before, but at least all UI operations render correctly.

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

Sidebar

Related Questions

I am building a Zend Framework application that performs jobs submitted by the user.
Hello I have a Java application that takes an input number of operations to
My application performs time consuming work independently on several files. I created a BackgroundWorker
We have an application that performs comparisons on data objects to determine if one
I have an application which performs 30 independent tasks simultaneously using multithreading, each task
We have a desktop application that performs a pretty rigorous set of calculations in
I am running creating an iPhone application which performs a costly operation and I
I am trying to write an application that performs operations on a grid of
I'm currently trying to make a small application that performs different duties. Right now
I'm writing an application that on some stage performs low-level disk operations in Linux

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.