This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private boolean truncated = false; | |
private int numLines = 0; | |
private static final String mEllipsis = "\u2026"; | |
/** | |
* Truncate a string to fit within a TextView in a certain number of lines. | |
*/ | |
protected String truncate(String original, TextView tv, int maxLines) { | |
StringBuffer buffer = new StringBuffer(); | |
numLines = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.util; | |
import android.content.Context; | |
import android.text.Spannable; | |
import android.text.SpannableString; | |
import android.text.TextPaint; | |
import android.text.style.ClickableSpan; | |
import android.text.style.ForegroundColorSpan; | |
import android.text.style.StyleSpan; | |
import android.view.View; |