I am having problems making my TextViews visible from another thread using the method showDisclaimer(). I have used runOnUiThread() to set the visibility of my TextViews. Basically, I want to show these views after importing the csv to the database. Can you take a look and see what I missed?

R u getting any exceptions? or try AsyncTask or Handler in place of Thread.
–
Animesh SinhaJul 30 '12 at 6:40

@Anieeh No exceptions at all... but I noticed that after the call to showDisclaimer (when everything seems to be finished), when I press the back button, the app crashes when supposedly it'll exit the app... I don't know if this observation helps...
–
simplymoodyJul 30 '12 at 6:59

So can u tell me what exception it is printing on the log on pressing back button?
–
Animesh SinhaJul 30 '12 at 7:09

1 Answer
1

simplymoody, do what Chirag Raval suggested by declaring private static TextView homeText1, globally and in your onCreate initialise them. However, you should always update the UI from the main thread. But showDisclaimer() is still running on the background thread, so you could run the showDisclaimer() a couple of different ways. One would be to do what you have done in getUploadDate():

Hi @digiphd, showDisclaimer is always called on the UI thread. I have problems on the call from triggerDownload. It was running on the UI thread. Believe me, I tried declaring them globally, static and not. Still didn't work..
–
simplymoodyJul 30 '12 at 7:31