Skip to content

Commit

Permalink
Allowed to use EmojiconTextView.setText(CharSequence, ...) with null …
Browse files Browse the repository at this point in the history
…argument as does android.widget.TextView.
  • Loading branch information
praetoriandroid committed Oct 31, 2014
1 parent be7de4f commit 9a2e87c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ private void init(AttributeSet attrs) {

@Override
public void setText(CharSequence text, BufferType type) {
if (text == null) {
text = "";
}
SpannableStringBuilder builder = new SpannableStringBuilder(text);
EmojiconHandler.addEmojis(getContext(), builder, mEmojiconSize, mTextStart, mTextLength, mUseSystemDefault);
super.setText(builder, type);
Expand Down

0 comments on commit 9a2e87c

Please sign in to comment.