Merge "Vertically center text in chips." into jb-dev
diff --git a/chips/src/com/android/ex/chips/RecipientEditTextView.java b/chips/src/com/android/ex/chips/RecipientEditTextView.java
index 882ad86..46ac2e7 100644
--- a/chips/src/com/android/ex/chips/RecipientEditTextView.java
+++ b/chips/src/com/android/ex/chips/RecipientEditTextView.java
@@ -573,8 +573,8 @@
private float getTextYOffset(String text, TextPaint paint, int height) {
Rect bounds = new Rect();
paint.getTextBounds(text, 0, text.length(), bounds);
- int textHeight = bounds.bottom - bounds.top - (int)paint.descent();
- return height - ((height - textHeight) / 2);
+ int textHeight = bounds.bottom - bounds.top ;
+ return height - ((height - textHeight) / 2) - (int)paint.descent();
}
private RecipientChip constructChipSpan(RecipientEntry contact, int offset, boolean pressed)