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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T19:52:21+00:00 2026-06-07T19:52:21+00:00

my application keeps force closing. But Eclipse shows no error or warnings package com.example.pkg;

  • 0

my application keeps force closing. But Eclipse shows no error or warnings

package com.example.pkg;

import android.os.Bundle;
import android.widget.TextView;
import android.app.Activity;

public class subActivity extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_sub);
        Thread r = new Thread(new Runnable(){

                      public void run()
                      {   final TextView tv=(TextView)findViewById(R.id.rline1);
                          String s=(String)tv.getText();
                          tv.setText(s+"Works !");
                      }
        });
        r.start();
    }

}

Another Activity calls this Activity. That one has the TextView displayed. All I want to do is to change this string resource called R.string.rline1 that is being displayed on the TextView. Please tell me how to do this if there is another way

  • 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-07T19:52:22+00:00Added an answer on June 7, 2026 at 7:52 pm

    First thing, you must need to update GUI stuffs inside UI thread else it will never work. Second thing you know how many times you are creating the instance of your text view and setting it again again, you are inside the thread and you havn’t set any flag to stop your thread once you are done. E.g for UI thread :

            Runnable update_gui = new Runnable() {
                @Override
                public void run() {
                  final TextView tv=(TextView)findViewById(R.id.rline1);
                  String s=(String)tv.getText();
                  tv.setText(s+"Works !");
    
                }
            };runOnUiThread(update_gui);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Whenever I start the application it keeps force closing citing the log below. Is
I'm trying to load values into a SQLite table on android. My application keeps
i have written an application, but for some reason it keeps peaking at 100%.
The application shows force close only at reboot of emulator/phone. It has two broadcast
My application keeps running into Timeout Expired SqlExceptions. The thing is that this query
An application keeps track of hundreds of variables. Users are able to create conditions
My Connection to my test application keeps terminating in the same place without any
I have written an application that keeps erasing my shared preference. It was always
I'm trying to run a Java Jetty application and I keep seeing this error:
I keep getting this error with my Play 2.0 application: play.core.ActionInvoker$$anonfun$receive$1$$anon$1: Execution exception [[MatchError:

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.