Since I cannot access the TextView from another thread,
You can use another Thread and still access the TextView . Not knowing your code is hard to give a good example, but you can use runOnUiThread
or
you can use AsyncTask . By doing this this way, you can do everything you need in doInBackground() and set the text to onPostExecute()
Although, I'm not sure how long your line will take several seconds to load. If you do a lot of work to assemble a string, I would suggest using AsyncTask
source share