Archive for March, 2012

Memory Cache – Part 2

Friday, March 30th, 2012

In the previous article we looked at the theory behind weak references. In this article we’ll look at one use-case where a simple memory cache may speed things up.
(more…)

Memory Cache – Part 1

Friday, March 23rd, 2012

Previously on Styling Android we have discussed how important it is to make your app as fast as possible because making your user wait for things to happen is a sure way to drive them away from your app. Also, you have to be quite careful when it comes to using images within your app because images tend to be relatively large and even minor inefficiencies in image handling can have a major impact on your app. In this series of articles we’re going to look at a technique of using a memory cache for images to avoid having to hold multiple copies of the same image in memory when that image is used multiple times in your layout.
(more…)

Background Tasks – Part 6

Friday, March 16th, 2012

In the previous article we discussed the Android Service architecture and looked at how to properly implement your Service to both behave well and avoid being killed by the OS or a TaskKiller. In this concluding article in this series well look at IntentService and look at ways that we can trigger UI updates from a Service.
(more…)

Background Tasks – Part 5

Friday, March 9th, 2012

Previously in this series we have looked at various ways of moving slow, intensive, or blocking tasks off of the UI thread in order to keep our app responsive. The final mechanism that we’ll look at is Android services.
(more…)

Background Tasks – Part 4

Friday, March 2nd, 2012

In the previous article we had a look at AsyncTask as saw how it simplified the process of performing background tasks, but saw some potential pitfalls to the newbie, and also saw how it leaves the potential to leak a Context. In Honeycomb Loader was introduced and in this article we’ll have a look at what this offers us.
(more…)