grantland/android-autofittextview — pull request #7 by drbild (2014-03-17 16:06:12+00:00)
Title: Add height support (and upgrade to gradle plugin 0.9)

Here's an attempt at supporting both maxlines and width/height (as determined by the view layout system) using a StaticLayout.

Like the previous version, this fails if the line spacing multiplier and addition are set to anything other than 1.0 and 0.0. (The constructor does not use the setter and the getters weren't added until API 16, so retrieving the initial values in a supported fashion is "impossible".)

This works for me, but isn't heavily tested. And you may have some other ideas about how to handle height.