I have an activity that contains many UI views. In its onCreate method, I found single line of setContentView takes 8-12 seconds to be complete. So I want to show my logo image while it's loading. I tried many things but without any success. I suspect main reason might be that before finishing setContentView, nothing can be shown.
Any help would be appreciated.
UPDATE:
I think many people do not know that you cannot show any dialog before finishing setContentView. So using another splash activity does not help me at all.
UPDATE2
I forgot to update this question after I found cause of the problem. Please refer to following question: setContentView taking long time (10-15 seconds) to execute
use AsyncTask
put splash in onPreExecute()
and do your work in doInBackground()
and close splash in onPostExecute()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With