The following is the first few sections of a chapter from The Busy Coder's Guide to Android Development, plus headings for the remaining major sections, to give you an idea about the content of the chapter.

Finding and Eliminating Jank

A user interface is considered “janky” if it stutters or otherwise fails to operate smoothly, particularly during animated effects like scrolling. Finding and eliminating the causes of janky behavior (“jank”) is part science, part art, and part throwing darts at a dartboard.

This chapter will outline some techniques for identifying and removing jank from a user interface. The steps shown here originated in a blog post by Google’s Romain Guy, with a few additional twists and turns due to the different nature of the particular case being studied. Mr. Guy’s blog post is essential reading for all advanced Android developers, and the author is deeply indebted to Mr. Guy for his work in this area.


The only hard prerequisite for this chapter is having read the core chapters and the chapter on finding CPU bottlenecks.

That being said, having read the chapter on animators would help understand portions of this chapter a bit better.

The Case: ThreePaneDemoBC

In the chapter on animators, we examined an implementation of the Gmail-style three-pane layout with animated transitions (a.k.a., “The Three-Fragment Problem”). The implementation shown there originated with a Stack Overflow question with the solution presented in this book offered as an answer.

A commenter on that answer pointed out that he detected some stutter, even on decent hardware.

This chapter reviews the steps that were taken to determine if we really are doing things incorrectly, what specifically we are doing wrong, and what can be done to fix it.

Are We Janky?

The preview of this section is sleeping in.

Finding the Source of the Jank

The preview of this section was fed to a gremlin, after midnight.

Where Things Went Wrong

The preview of this section is [REDACTED].

Removing the Jank

The preview of this section took that left turn at Albuquerque.

Frame Metrics API

The preview of this section is en route to Mars.