Overview

When you use the Android TV you might notice that when you focus on a card, the title area expands so you can read everything. However, if you use the ImageCardView this functionality does come baked in. So I will show you how to set up the OnFocusChangeListener to mimic this functionality.

Gist with Required Code

Feel free to adjust the amount of lines to display. This utilizes using a wrap content layout so it automatically expands when a layout parameter changes. If you really want to go a step farther and make it fancier I’m sure you could use a ValueAnimator to use an Interpolator to slide it open and have it use requestLayout(). If you do go that route you will need to render the content manually to get the bounds so you know how much to slide open.

Example in action

Title Expand

Animating Toolbar Titles

When you change a title in a toolbar, it just flashes to a new value. I'm going to show you how to create an animation for transitioning between values. Continue reading

Separate your Release and Debug only code

Published on October 16, 2015

Using The Design Library's CoordinatedLayout

Published on October 07, 2015