apradanas / simple-linkable-text

Simple way to create linked text, such as @username or #hashtag, in Android TextView and EditText
Other
74 stars 13 forks source link

Text is not displayed #11

Open vsoftphuong opened 7 years ago

vsoftphuong commented 7 years ago

Text is not displayed. If text = "abcdef" it will not show. How to fix it, please?

vsoftphuong commented 7 years ago

I fixed by: In class LinkModifier change:

public void build() { if (mViewType == ViewType.EDIT_TEXT) { mText = mSpannable.toString(); removePreviousSpans(); } else { mSpannable = SpannableString.valueOf(mText); // mSpannable = null; }

    convertPatternsToLinks();
    validateTextLinks();

    for (Link link : mFoundLinks) {
        addLinkToSpan(link);
    }
}

Cheese!