Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowed to use EmojiconTextView.setText(CharSequence, ...) with null argument. #40

Merged
merged 2 commits into from
Nov 9, 2014

Conversation

praetoriandroid
Copy link
Contributor

TextView allows to call setText() with null argument. It replaces that null argument by the empty string. It would be expected to reproduce this behavior in EmojiconTextView.

@@ -62,6 +62,9 @@ private void init(AttributeSet attrs) {

@Override
public void setText(CharSequence text, BufferType type) {
if (text == null) {
text = "";
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You want to probably skip the rest of the EmojiconHandler code (even if it's an empty string, it's an optimization).

@praetoriandroid
Copy link
Contributor Author

Something like this?

rockerhieu added a commit that referenced this pull request Nov 9, 2014
Allowed to use EmojiconTextView.setText(CharSequence, ...) with null argument.
@rockerhieu rockerhieu merged commit e39c8bf into rockerhieu:master Nov 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants