Fix format/draw issues with snippets
Bug: 3315171 Change-Id: I8e44c1d64d2f3382fd1e03b35e3e59b048eca31d
This commit is contained in:
parent
1c1bd6a3eb
commit
3d91924c99
@ -266,7 +266,7 @@ public class MessageListItem extends View {
|
||||
for (int i = 0; i < MAX_SUBJECT_SNIPPET_LINES; i++) {
|
||||
int start = layout.getLineStart(i);
|
||||
if (i == MAX_SUBJECT_SNIPPET_LINES - 1) {
|
||||
int end = mText.length() - 1;
|
||||
int end = mText.length();
|
||||
if (start > end) continue;
|
||||
// For the final line, ellipsize the text to our width
|
||||
mSnippetLines[i] = TextUtils.ellipsize(mText.subSequence(start, end), sDefaultPaint,
|
||||
@ -381,7 +381,7 @@ public class MessageListItem extends View {
|
||||
int subjectEnd = (mSubject == null) ? 0 : mSubject.length();
|
||||
int lineStart = 0;
|
||||
TextPaint subjectPaint = mRead ? sDefaultPaint : sBoldPaint;
|
||||
for (int i = 0; i < MAX_SUBJECT_SNIPPET_LINES; i++) {
|
||||
for (int i = 0; i < MAX_SUBJECT_SNIPPET_LINES && i < mSnippetLineCount; i++) {
|
||||
CharSequence line = mSnippetLines[i];
|
||||
int drawX = snippetX;
|
||||
if (line != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user