java - Set TextView value inside a thread in android -


i getting crash under fllowing circumstances. running thread in following way:

thread t = new thread(){     public void run() {                 text.settext("hello");         } }; t.start; 

the crash occurs if try set value of textview in xml, (the reference text available).

am doing fundamentally wrong? kindly point out going wrong.

you can access user interface components ui thread.

android has few things make easy, such method runonuithread , class asynctask.

for more reading see painless threading , processes , threads in android documentation.


Comments

Popular posts from this blog

sql - text truncated using perl DBI insert -

c++ - Is it possible to compile a VST on linux? -

php - Pass object by reference or value -