Building A RecyclerView LayoutManager – Redux

This post is the capstone in our series. Here are links to Part 1, Part 2, and Part 3 as well.

While writing what was intended to be the final post of this series, a discussion of predictive animations, I ran into a number of interesting challenges that I thought warranted their own discussion. This series began as an investigation into whether RecyclerView could easily handle a layout structure that could scroll in both the horizontal and vertical axes, and how difficult it would be for the developer to build their own LayoutManager. I chose a basic grid of uniform items as the structure, thinking it would be the most straightforward to implement.


Building a RecyclerView LayoutManager – Part 3

This article is Part 3 in our series. Here are links to Part 1 and Part 2 as well.

In the previous post, we discussed adding proper support for data set changes and targeted scrolling. In this installment of the series, we will focus on properly supporting animations in your fancy new LayoutManager.

In case you’ve forgotten, the code samples are on GitHub.


Keeping Styles in Scope

Styles and Themes are a great thing. They allow us to abstract common view properties into a single location, making the look and feel of our application UI more consistent and easier to maintain. If you look at Google’s UI guide for Styles and Themes, it mentions the motivation behind this as a separation between design logic and content.

However, as with any abstraction API, it can be easy to take things a bit too far. Android does not restrict which attributes one can abstract into a style. Any attribute you can put on a view element, you can place in a style. But just because you can put something in a style doesn’t mean you should.


Building a RecyclerView LayoutManager – Part 2

This article is Part 2 in our series. Here are links to Part 1 and Part 3 as well.

In the last post,  we walked through the core functionality necessary for building a RecyclerView LayoutManager. In this post, we are going to add support for a few additional features that the average adapter-based view is expected to have.

A reminder that the entire sample application can be found here on GitHub.


Building a RecyclerView LayoutManager – Part 1

This article is Part 1 in our series. Here are links to Part 2 and Part 3 as well.

By now, if you’re an Android developer paying any attention, you’ve at least heard of RecyclerView; a new component that will be added to the support library to facilitate custom implementations of high-performance view collections by facilitating view recycling. Others have already done a remarkable job describing the basics of how to use RecyclerView with the built-in pieces already provided, including item animations. So rather than dive into all that again, here are some resources to get you up to speed:

In this series of posts, we will be focused on the low-level details involved in building your own LayoutManager implementation, to do something a bit more complex than a simple vertical or horizontal scrolling list.


Accessory Developers, Meet iOS 8

WWDC 2014 was packed with new features for developers to take advantage of in iOS 8.

Among them were technologies that present new opportunities for accessory manufacturers, but often the technical side of that development doesn’t get the coverage it deserves. What follows is a discussion of what accessory manufacturers should be excited about (we certainly are!) as we look forward to the iOS 8 release.

Effects of Android Application Termination

Digging into ActivityManagerService reveals a bit about how applications are killed.

Between process management of the system at large and user behavior, there are a handful of methods through which your Android application process may terminate. The additional effects on your application code (based on the method) may have consequences for you as a developer.

Intents and Extensions

I have been focused primarily on the Android platform for about 5 years, so the Intents framework is pretty much a part of my DNA at this point. When Twitter went aflame with “iOS has Intents! #WWDC” tweets during last week’s keynote, I sat up and took notice. Could it be? What follows are the things I have observed about what the two frameworks now have in common, and where they divide. … 

On the Edge of the Sandbox: External Storage Permissions

Much has been said lately about Android’s external storage in the tech press. I’ll be the first to admit that what we have now seems like a bit of a mess at first.

With all the interest focused on the subject, I felt it an opportune time to take a moment and explain in detail exactly how external storage permissions work, both in the past framework versions and today in KitKat.

Android Source Diving – Video Tutorial

The skill that separates good Android developers from great ones is the ability to understand how the platform works through an ability to efficiently navigate through the source.

Say what you will about open vs. closed systems and their associated pros and cons, but one of the most instructive tools that you have at your fingertips as an Android developer is the fact that the source code for the framework you are interacting with is readily available. You need look no further to answer the question “I wonder how they did that?”