Fix bug 14276128 Clipping at bottom of TextView

Avoid applying "extra" linespacing to the last line of a layout, because
when that is negative, it causes clipping.

Change-Id: I4cc8792fd3444e4118604cc3d0f816d59dfc1e74
This commit is contained in:
Raph Levien
2014-04-23 15:52:55 -07:00
parent 32117212fc
commit 936df68016

View File

@@ -654,7 +654,7 @@ public class StaticLayout extends Layout {
int extra;
if (needMultiply) {
if (needMultiply && end != bufEnd) {
double ex = (below - above) * (spacingmult - 1) + spacingadd;
if (ex >= 0) {
extra = (int)(ex + EXTRA_ROUNDING);