-
-
Notifications
You must be signed in to change notification settings - Fork 290
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
Conversation
Ooook. |
|
||
/** Forces that only Emojis are allowed as input. */ | ||
public void forceEmojisOnly(final EmojiPopup emojiPopup) { | ||
setOnFocusChangeListener(new ForceEmojisOnlyFocusChangeListener(emojiPopup)); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like it - yeah.
108aef0
to
0ed1735
Compare
0ed1735
to
bef7399
Compare
This is ready now @mario & @rubengees |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good 👌
Waiting for @mario's review. |
No description provided.