elippsize the end, not the beginning of the note

pull/14/head
Tim Su 13 years ago
parent f1d8fae6b2
commit f9a1b49727

@ -64,8 +64,7 @@ public class NotesDetailExposer extends BroadcastReceiver {
if(!TextUtils.isEmpty(notes)) { if(!TextUtils.isEmpty(notes)) {
if(notes.length() > NOTE_MAX) { if(notes.length() > NOTE_MAX) {
int lastSpace = notes.lastIndexOf(' ', NOTE_MAX); int lastSpace = notes.lastIndexOf(' ', NOTE_MAX);
notes = notes.substring(0, Math.max(lastSpace, NOTE_MAX - 20)); notes = notes.substring(0, Math.max(lastSpace, NOTE_MAX - 20)) + "...";
notesBuilder.append("...");
} }
notesBuilder.append(notes); notesBuilder.append(notes);
} }

Loading…
Cancel
Save