Android ListView Adapter to hide items

This is an abstract class I wrote that derives from BaseAdapter that can be extended to easily allowing hiding and restoring of items in a ListView. You might want to use it with some cool animations for a really nice effect, like swiping items out and so on. I wanted to create an Adapter to presents a different view of the same data structure to the BaseAdapter. That is, if you have an array of [a, b, c, d] and hide the second item, as far as the BaseAdapter is concerned, it is dealing with an array of [a, c, d].

Continue reading

Google building-blocks style ListView for Android

The default ListView on Android with no styling applied is pretty vanilla and boring. Google have provided some guidelines on how to provide more stylish lists here:

http://developer.android.com/design/building-blocks/lists.html

but unfortunately do not provide any code to achieve this. It isn’t difficult, but I put a version together for a project I was working on and thought I would create a standalone project showing one way to do it. It’s mainly xml and styling with various dimensions but this should produce that style of list and works on pre Ice Cream Sandwich devices too. For the purposes of a demo I went with Fr. Ted themed data 🙂 The buttons on the right are for that sort of master + detail + navigation style list that you can see in Google Drive.

The code can be found here:

https://github.com/steprobe/ListDemo

list