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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T07:39:50+00:00 2026-06-07T07:39:50+00:00

try { answerField.setText(Unscrambling…This may take a minute); BufferedInputStream(getAssets().open(wordlist.txt)); BufferedInputStream[] textfile = new BufferedInputStream[28]; for(int

  • 0
try {
    answerField.setText("Unscrambling...This may take a minute");
    BufferedInputStream(getAssets().open("wordlist.txt"));
    BufferedInputStream[] textfile = new BufferedInputStream[28];
    for(int i = 0; i<28; i++){
        textfile[i] = new BufferedInputStream(getAssets().open(i+1+".txt"));
        }
    answerField.setText(Unscramble.go(tField.getText()+"", textfile));

My issue is with the line answerField.setText(“Unscrambling…This may take a minute”);

If the code is as-is, then this line will do nothing, but, if I take away the last line of the code answerField.setText(Unscramble.go(tField.getText()+””, textfile)); it works find and the TextView says “Unscrambling…this may take a minute”

The goal is for it to have that message until the program is done unscrambling, then it will have the results.

Any help would be really greatly appreciated, as I have no clue what I am doing or why this is happening.

  • 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-07T07:39:52+00:00Added an answer on June 7, 2026 at 7:39 am

    The problem is that the UI does not update between the first call to setText and the second. One solution, as @AVD mentioned, is to use Toast.

    The other solution, which I believe is recommended, is to use AsyncTask. The idea here would be to set your text to the “Unscrambling” message in onPreExecute, then run your main task in doInBackground, then finally set the text to the Unscramble.* string in onPostExecute.

    The documentation link I provided above has a great AsyncTask code there, which can be manipulated to handle just about anything.

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

Sidebar

Related Questions

Try this code - import java.io.StringReader; public class StringReaderTest { public static void main(String[]
Try this piece of code - public class WhitespaceTest { public static void main(String[]
try: recursive_function() except RuntimeError e: # is this a max. recursion depth exceeded exception?
Try yourself : as example, try to retrieve the fields of this video :
Try to open my web-page on vds and then get: We're sorry, but something
Try as I might, I cannot get this to work. Here is my latest
Try this: Make a new XCode4 Applescript project. In the delegate, paste this code:
Try this: <div style=float:left><p>LEFT</p></div> <div style=float:right><p>RIGHT</p></div> <div><p> <input type=text style=width:100% /> <input type=submit />
Try this showcase: <!doctype html> <html> <head> <style> html { min-height: 100%; overflow-y: scroll;
Try this: $test = array (2+2); var_dump($test); Then try the same but inside 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.