Run code on main/UI thread on android
Android’s UI components are not thread safe so one may need to update Views or other UI components from a secondary thread when returning from an asynchronous database query or a web service call. If you run the code from a secondary thread you might see that the code crashes almost on each try. Below […]