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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:36:09+00:00 2026-06-05T23:36:09+00:00

I need some advice. I’m building an app that has a sequence of 4

  • 0

I need some advice. I’m building an app that has a sequence of 4 actions that will occur when the user presses a button. As soon as the user presses GO, that button must become un-enabled, and some visual cues in the interface must show which of the 4 actions is taking place. (Changing the visibility of ImageView, for example) The GUI must change immediately to keep in sync with sounds that are playing.

After each of the 4 actions, the GUI must change to reflect which of the actions is currently happening.

Current attempts – I can’t get the GUI to change before the first action starts (sound is playing), and at the appropriate times in between the actions. The actions are to play 4 different sounds. Currently, I’m using the MediaPlayer.

I haven’t had any luck trying to force the GUI to update when I want to. I have used AsyncTask, and tried all combinations of setEnabled(), invalidate(), forceLayout(), refreshDrawableState() to try to force things to happen in the gui when I want them to – corresponding to the 4 sounds playing in sequence.

My problem seems to be that I’m trying to do 4 things in one onClick handler. I have been really struggling with validate() calling reDraw at “sometime in the future.”

I don’t know what design pattern would be best suited to providing a visual cue to the 4 things that are happening in sequence.

I’m just starting to look at Handlers. Is this the way to go? I thought it would be easy. Any advice?

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

    If I remember correctly the onPreExecute and onPostExecute methods of the AsyncTask execute on the GUI thread. Doesn’t updating the GUI from these methods work?

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

Sidebar

Related Questions

I need some advice in building a Java server that handles multiple clients at
I need some advice from experts :) I will develop a website using PHP
I'm building a web-based productivity application that has to deal with modest user concurrency,
I am building an application at work and need some advice. I have a
I am building an Android App that will communicate over TCP with a server.
I need some advice on how to successfully update mutiple rows in my database
I need some advice regarding which database I should use. I want to create
I need some advice of how to setup my tables I currently have a
I need some advice for a design which I have to implement in application.
I need some advice on which Swing Components to choose in order to achieve

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.