The retained fragment trick

The first tough problem a new Android developer faces is how to manage work in the background. Spawning a new Thread is easy, but once UI objects need to be notified with the result, the situation becomes tricky: the UI objects might have been replaced by the system because of a configuration change. In this post we explore how to bind and rebind to the new UI objects with a retained Fragment. Continue reading