Skip to content Skip to sidebar Skip to footer

Why Doesn't My Toast Show Up?

My toast doesn't show up until after the file has completed downloading (I commented the download function). Any ideas why? public void onCreate(Bundle savedInstanceState) { su

Solution 1:

I think when you do toast.show() you are requesting that the UI thread display a toast message. It doesn't necessarily execute immediatley. You are then performing a long running operation in the UI thread by doing a file download. This will block the UI until it completes. I would move your file download into an AsyncTask so that it does not hang the UI.


Post a Comment for "Why Doesn't My Toast Show Up?"