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

Support use case where only Emoji Dialog should be shown. #378

Merged
merged 2 commits into from
Sep 24, 2019
Merged

Conversation

vanniktech
Copy link
Owner

No description provided.

@mario
Copy link
Collaborator

mario commented Sep 13, 2019

Ooook.


/** Forces that only Emojis are allowed as input. */
public void forceEmojisOnly(final EmojiPopup emojiPopup) {
setOnFocusChangeListener(new ForceEmojisOnlyFocusChangeListener(emojiPopup));
Copy link
Collaborator

Choose a reason for hiding this comment

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

This doesn't do what the method name suggests, it shows the popup once the EditText is focused instead.

Copy link
Owner Author

Choose a reason for hiding this comment

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

So showsEmojisOnly. With this approach, there's no way to get to the normal keyboard though and insert normal characters.

Copy link
Collaborator

@rubengees rubengees Sep 14, 2019

Choose a reason for hiding this comment

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

Ah now I get what this is supposed to do! I got confused since I thought this method should control if the OnlyEmojisInputFilter should be applied or not, but it's something else.

Maybe a name like disableKeyboardInput or something would be more clear?

Copy link
Collaborator

Choose a reason for hiding this comment

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

If we add this, we may want a method to revert this behavior e.g. remove the OnFocusListener.

import android.text.Spanned;
import androidx.annotation.Nullable;

public final class OnlyEmojisInputFilter implements InputFilter {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is also present in the other PR, did you mix these up?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Seems like it - yeah.

@vanniktech
Copy link
Owner Author

This is ready now @mario & @rubengees

Copy link
Collaborator

@rubengees rubengees left a comment

Choose a reason for hiding this comment

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

Looks very good 👌

@vanniktech
Copy link
Owner Author

Waiting for @mario's review.

@mario mario merged commit 66c29ce into master Sep 24, 2019
@mario mario deleted the ForceEmojis branch September 24, 2019 09:19
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