ListView – Part 2

In part 1 of this series we got a simple ListView working. In this part we’ll look at how we handle clicks on items within the ListView and also look at managing things if we can’t extend ListActivity for any reason.

ListView – Part 1

In previous articles we have looked at the various layout types that Android provides us. In this series of articles we’re going to have a look at a slightly more complex widget: ListView. ListView is somewhat different from the basic layouts because whereas the simple layout types offer basic layout capabilities, ListView goes further because…

Scrolling Table – Part 3

In Scrolling Table – Part 2 we looked at a technique for getting a scrolling table with a static header row by using a custom control to link the column widths of two tables, but there was no support for cells which span multiple columns. In this final part we’ll add column spanning.

Scrolling Table – Part 1

I recently had a requirement to create a table layout which had a header row at the top. On the face of it this is relatively easy using TableLayout, but there was a further requirement: The header row should remain static while the data rows scroll. The problem here is that the standard TableLayout does…

ViewPager – Part 3

Important note: There is a more recent article which covers a newer version of ViewPagerIndicator. Please refer to this in conjunction with this article At the end of part 2 of this series, we had added ListView controls to each of our ViewPager views, but we lost the scroll position when we moved away from…

ViewPager – Part 2

Important note: There is a more recent article which covers a newer version of ViewPagerIndicator. Please refer to this in conjunction with this article In the part 1 we got a simple ViewPager working with a TitlePageIndictor. This gave us some pretty impressive results for a relatively small amount of effort. But, given that this…

ViewPager – Part 1

Important note: There is a more recent article which covers a newer version of ViewPagerIndicator. Please refer to this in conjunction with this article Richard Hyndman recently wrote on his personal blog and the Android Developers blog about the ViewPager functionality which has been added to the Android Compatibility Library. Jake Wharton has published his…

Layout Types Part 4: FrameLayout

In the previous articles in this series we have looked at LinearLayout, TableLayout, and RelativeLayout. In this concluding part, we’ll look at FrameLayout, which is arguable the simplest of the basic layout types, but can be extremely useful.