Fancy ListViews, Part Three

In our last episode, we saw how we could save processing time — and, hence, battery life — by recycling existing row views in our fancy lists, simply by checking and reusing the convertView parameter passed into our getView(). In his comment to this series’ initial post, ...

Read More

Fancy ListViews, Part Two

In our last episode, we saw how to create Android ListViews that contain more than just a simple list of strings. In particular, we saw the ultimate form of customization: subclassing an Adapter class, overriding getView(), and returning our own View for each row, perhaps based on our own ...

Read More

Fancy ListViews, Part One

The classic Android ListView is a plain list of text — solid but uninspiring. This is the first in a series of posts where we will see how to create a ListView with a bit more pizazz. Today, in particular, we will see two techniques for creating a ListView whose rows contain icons, in ...

Read More

Inflation is a Good Thing

Before diving into the topic of creating fancy lists in Android, we need to take a short detour into some background material. If you have written activities for Android, you are used to calling setContentView() with the resource ID of some XML layout you specified. Let’s take a peek at ...

Read More

Gettin’ On The (Message) Bus, Part Two

In our last episode, we discussed how the Android Intent systems functions, in effect, like a message bus, and how one can set up an IntentReceiver to serve as a consumer of bus messages. Today, let’s complete the picture, creating both a message consumer and producer, as two separate ...

Read More

Gettin’ On The (Message) Bus, Part One

The message bus is a tried-and-true model in application development. Whether it is the humble Win32 message loop or full-fledged publish/subscribe message-oriented middleware solution, software components have long been publishing messages that other components receive, either by explicitly ...

Read More

Handling Multiple Resource Sets, Part Two

In the last episode of “Building ‘Droids”, we covered how to handle a simple, one-criterion choice between two resource sets: whether we show English or Spanish strings. In that case, having two res/ subdirectories (res/values-en/ and res/values-es/), each with their own set ...

Read More

Handling Multiple Resource Sets, Part One

Welcome to the new “Building ‘Droids” section of AndroidGuys! This column looks at Android from the developer’s perspective, poking around dusty corners of the Android SDK, and showing how you can create interesting and effective Android applications. Today, we’ll talk about how to ...

Read More