I have taken over an Android project from a past employee and am wondering if there is an easy tool to use for profiling an Android application. I have a LinearLayout with a ProgressBar spinner inside of it. Now I am running a network call on a different thread while that spinner is showing. I use a translate animation to show the entire LinearLayout and when the network call returns on the other thread I hide the LinearLayout. Now this works great but I see that the spinner kind of stops spinning while it is showing. Now it kind of looks like if I interact with the screen, such as trying to scroll, the spinner will continue to spin. For a standard ProgressBar spinner do I need to set some command on the spinner to keep it spinning? Any information on this would be great.
Thanks
Assuming that rt is a Thread , just check rt. isAlive() . Alternatively, just use a boolean flag and set it to true right before you start your thread.
When the user launches your app, Android creates a new Linux process along with an execution thread. This main thread, also known as the UI thread, is responsible for everything that happens onscreen. Understanding how it works can help you design your app to use the main thread for the best possible performance.
You could use StrictMode to detect expensive calls that are being done on the UI Thread.
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