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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:37:09+00:00 2026-05-28T03:37:09+00:00

I sent Scores Activity to doinbackground then run a function on Scores Activity but

  • 0

I sent “Scores Activity” to doinbackground then run a function on Scores Activity but getting
“Only the original thread that created a view hierarchy can touch its views.” on “birinci.setText(txt);” line.

what am I missing here looks using same context?

Scores Activity
{
Object[] stuff = {this.dhn, Scores.this};
ConnectXML runXML = new ConnectXML();
runXML.execute(stuff);
}

public void setScoreListUpdate(String txt)
{
birinci.setText(txt);
}



private Scores myScores;
protected String doInBackground(Object... arguments) {

myScores = (Scores)stuff[1];
myScores.setScoreListUpdate(result);

}
  • 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-28T03:37:09+00:00Added an answer on May 28, 2026 at 3:37 am

    The error message already gives the answer: you can’t touch (edit/modify/update/etc.) any views from a thread that did not create them. Since anything that is executed in the doInBackgrund(...) of an AsyncTask is done by a separate thread, you can’t do any direct view manipulations in there.

    The solution is quite simple: override the other methods an AsyncTask provides, depending on your needs. If you’re trying to update a view after all work is done, simply override onPostExecute(...). If you want to indicate some sort of progress while the work is being done in the background, use onProgressUpdate(...). Everything in there is being executed by the main UI thread (which created all views).

    Please have read through the documentation on AsyncTask, since that describes the different steps and possibilities quite clearly.

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

Sidebar

Related Questions

The request I sent is accept gzip but the response is not compressed, instead,
A user has sent me some information that they posted to one of my
i have been sent a directory tree of source code that i want to
I am being sent text files saved in ISO 88591-1 format that contain accented
I currently have a large form that gets sent to our payment authorizer (done
I'm an inch away from getting my Create form working. My problem is that
I programmed a simple WCF service that stores messages sent by users and sends
I'm trying to fix my code but I have no idea why I'm getting
Can't work this out, [UIViewController hash] is being sent to a view controller which
I sent a text via GET method to decode html entities ( w =

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.