mirror of
https://github.com/nuclearfog/Shitter.git
synced 2025-02-03 12:37:33 +01:00
added Regex class
This commit is contained in:
parent
2353535311
commit
dd15da2255
@ -11,16 +11,12 @@ import android.view.View;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class Tagger {
|
||||
public abstract class Tagger {
|
||||
|
||||
private static final String PATTERN = "[@#][^\\s@#\\.\\,]+";
|
||||
private static final int MODE = Spanned.SPAN_EXCLUSIVE_EXCLUSIVE;
|
||||
|
||||
|
||||
private Tagger() {
|
||||
}
|
||||
|
||||
|
||||
public static Spannable makeText(final String text, final int color, final OnTagClickListener l) {
|
||||
SpannableStringBuilder sText = new SpannableStringBuilder(text);
|
||||
Pattern p = Pattern.compile(PATTERN);
|
||||
|
Loading…
x
Reference in New Issue
Block a user