vanniktech / emoji Goto Github PK
View Code? Open in Web Editor NEWA library to add Emoji support to your Android / iOS / JVM Application
License: Apache License 2.0
A library to add Emoji support to your Android / iOS / JVM Application
License: Apache License 2.0
It's useless and mostly blocks the emoji on the right side
A lot are missing and so far I haven't figured out which ones exactly.
version 0.3.0
If you call the method "dismiss ()", without closing the keyboard, then the keyboard when you close, "isKeyboardOpen" variable is "true". Accordingly, the call "toggle ()" will:
if (isKeyboardOpen) {
// If keyboard is visible, simply show the emoji popup
this.showAtBottom();
}
but no screen keyboard
P.S. sorry for my english
When changing the skin tone of an Emoji in a Category the Emoji Icon in the list should be updated.
If we do this we should no longer then display ๐ & ๐๐ป in the recent Emojis. Instead just display the one that was used last.
The problem appears in the Qabel-android client in versionn 0.12.0 and 0.12.1: https://github.com/Qabel/qabel-android/releases/tag/0.12.1-beta.3
To reproduce:
Expected behavior:
The soft keyboard hides and the emoji popup appears
Actual behavior:
The emoji-button changes the drawable to the keyboard drawable and the emoji popup does not appear, the keyboard stays visible. Clicking the emoji button again has no effect.
When I close the keyboard with the hardware button and then press the emoji button again, the emoji popup opens and everything works fine.
I also tried to bind the emoji popup on the root of the activities layout, but that had no effect.
Can be implemented once #77 is done.
First of all thank you very much for your work @rubengees in #77.
There are a few things that I still want to talk about and hence a new issue since that PR is already way too long to get an overview about things.
destroy
method be called of the EmojiManager?Some more stuff might get added to the list as we tackle it down.
How can I make emojiPopup dismiss() when soft keyboard is hidden, by example, by backpressed?
There's no way to do this in Builder, because while Builder isn't built, the popup instance isn't initialized and its dismiss() isn't accessible.
Builder is a private class, I can't create an instance of it and maybe build the thing twice as a workaround.
What could you suggest? When soft keyboard is hidden, emoji popup stays on, covering the input field with toggle button and I have no way to remove it from the screen.
i got an emoji library from here https://github.com/vanniktech/Emoji
i am trying to add emoji library to my android project but when i compile below line it gives me error which is shown in screen shot.
if anyone use this library and getting same then please help.
Thanks in advance.
compile 'com.vanniktech:emoji:0.4.0'
compile 'com.vanniktech:emoji:0.4.0-SNAPSHOT
my android studio version is 2.1.2
I have a dialog box in which user can enter text and emoji.
But when i open emoji panel it shows above the keyboard instead of top of the keyboard.
I have given root view of the dialog box custom xml root view
Hello, when EmojiPopup is visible and I press back button on device, then Softkeyboard is dismissed, but Emoji Popup is not dismissed.
I have a fragment containing several linear layouts with on linear layout at the bottom containing the EmojEditText and some buttons. I use the button to toggle the EmojPopup visibility.
Sometimes (let's say one in 10 times or 15 times) the emoj popup opens but the linear layout above it just disappears when I click the button. If I choose an emoj the popup disappears and the linear layout is visible again.
I cannot trigger this on purpose, seems like a race condition of some kind? Could it be related to wrong root view? I'm using view.getRootView() (view is the inflated view for the fragment).
I found the error like this:
java.lang.IllegalStateException: Please install an EmojiProvider through the install method first.
Could you help me? previously it was worked.
On android 6 emoji not averlays keyboard, emoji appear above the keyboard.
Tested on Nexus 7.
PNGs are quite heavy for all of the emojis.
Possible solutions:
Hi Niklas,
First off, thank you for a great lib. I have used it in a library before and I am using it again for my current project. It is great.
Second, using 'compile 'com.vanniktech:emoji-ios:0.4.0'' results in IosEmojiProvider class not found. Basically, the whole ios package is not available. For now I imported the project as a module but would be helpful if you could please have a look into it.
Thanks,
Jean Marie
Thank you for filing an issue. If this is a bug that you want to report, please take the time to provide some information:
Screenshot(s) showing the issue and reprodution steps are appreciated.
Let's add Night Theme Support to the sample and also see whether we need to change something in the library to support it properly or not.
Hello. Thanks for so good lib.
Help me to resolve this problem (as here: #28 ), please:
Board with smiles opening good, but I want to switch smiles board to keybord by second tap to button.
So, smiles board opened, I tap on button, where this code:
if (main.globals_.emojiPopup.isShowing()){
//ะทะฐะบัััั ัะผะพัะธะธ
//main.globals_.emojiPopup.dismiss();
//ะฟะพะบะฐะทะฐัั ะบะปะฐะฒะธะฐัััั
InputMethodManager imm = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
}else{
//ะพัะบัััั ัะผะพัะธะธ
main.globals_.emojiPopup.toggle();
}
and I see momental keyboard blink, closing keyboard and smiles board was closed.
If I delete the code for showing keyboard and uncomment main.globals_.emojiPopup.dismiss(); , I will see good changing from smiles to keboard and back. BUT, when I close keyboard or smiles by pressing "back" and trying to show smiles by button, I will see the bug as on screen from issue #28. What me do? How to set rootView again?
Sorry for my Russian English.
Even though integrated physical keyboard are not popular anymore, there are high profile devices with them (eg: Blackberry Priv).
Have been reported in quite a few issues.
A lot of them are missing:
๐ฆ๐ซ๐ฆ๐ฝ๐ฆ๐ฑ๐ฉ๐ฟ๐ฆ๐ธ๐ฆ๐ฉ๐ฆ๐ด๐ฆ๐ฎ๐ฆ๐ถ๐ฆ๐ฌ๐ฆ๐ท๐ฆ๐ฒ๐ฆ๐ผ๐ฆ๐บ๐ฆ๐น๐ฆ๐ฟ๐ง๐ธ๐ง๐ญ๐ง๐ฉ๐ง๐ง๐ง๐พ๐ง๐ช๐ง๐ฟ๐ง๐ฏ๐ง๐ฒ๐ง๐น๐ง๐ด๐ง๐ถ๐ง๐ฆ๐ง๐ผ๐ง๐ท๐ฎ๐ด๐ป๐ฌ๐ง๐ณ๐ง๐ฌ๐ง๐ซ๐ง๐ฎ๐จ๐ป๐ฐ๐ญ๐จ๐ฒ๐จ๐ฆ๐ฎ๐จ๐ฐ๐พ๐จ๐ซ๐น๐ฉ๐จ๐ฑ๐จ๐ณ๐จ๐ฝ๐จ๐จ๐จ๐ด๐ฐ๐ฒ๐จ๐ฌ๐จ๐ฉ๐จ๐ฐ๐จ๐ท๐ญ๐ท๐จ๐บ๐จ๐ผ๐จ๐พ๐จ๐ฟ๐ฉ๐ฐ๐ฉ๐ฏ๐ฉ๐ฒ๐ฉ๐ด๐ช๐จ๐ช๐ฌ๐ธ๐ป๐ฌ๐ถ๐ช๐ท๐ช๐ช๐ช๐น๐ช๐บ๐ซ๐ฐ๐ซ๐ด๐ซ๐ฏ๐ซ๐ฎ๐ซ๐ท๐ฌ๐ซ๐ต๐ซ๐น๐ซ๐ฌ๐ฆ๐ฌ๐ฒ๐ฌ๐ช๐ฉ๐ช๐ฌ๐ญ๐ฌ๐ฎ๐ฌ๐ท๐ฌ๐ฑ๐ฌ๐ฉ๐ฌ๐ต๐ฌ๐บ๐ฌ๐น๐ฌ๐ฌ๐ฌ๐ณ๐ฌ๐ผ๐ฌ๐พ๐ญ๐น๐ญ๐ณ๐ญ๐ฐ๐ญ๐บ๐ฎ๐ธ๐ฎ๐ณ๐ฎ๐ฉ๐ฎ๐ท๐ฎ๐ถ๐ฎ๐ช๐ฎ๐ฒ๐ฎ๐ฑ๐ฎ๐น๐จ๐ฎ๐ฏ๐ฒ๐ฏ๐ต๐ฏ๐ช๐ฏ๐ด๐ฐ๐ฟ๐ฐ๐ช๐ฐ๐ฎ๐ฝ๐ฐ๐ฐ๐ผ๐ฐ๐ฌ๐ฑ๐ฆ๐ฑ๐ป๐ฑ๐ง๐ฑ๐ธ๐ฑ๐ท๐ฑ๐พ๐ฑ๐ฎ๐ฑ๐น๐ฑ๐บ๐ฒ๐ด๐ฒ๐ฐ๐ฒ๐ฌ๐ฒ๐ผ๐ฒ๐พ๐ฒ๐ป๐ฒ๐ฑ๐ฒ๐น๐ฒ๐ญ๐ฒ๐ถ๐ฒ๐ท๐ฒ๐บ๐พ๐น๐ฒ๐ฝ๐ซ๐ฒ๐ฒ๐ฉ๐ฒ๐จ๐ฒ๐ณ๐ฒ๐ช๐ฒ๐ธ๐ฒ๐ฆ๐ฒ๐ฟ๐ฒ๐ฒ๐ณ๐ฆ๐ณ๐ท๐ณ๐ต๐ณ๐ฑ๐ณ๐จ๐ณ๐ฟ๐ณ๐ฎ๐ณ๐ช๐ณ๐ฌ๐ณ๐บ๐ณ๐ซ๐ฒ๐ต๐ฐ๐ต๐ณ๐ด๐ด๐ฒ๐ต๐ฐ๐ต๐ผ๐ต๐ธ๐ต๐ฆ๐ต๐ฌ๐ต๐พ๐ต๐ช๐ต๐ญ๐ต๐ณ๐ต๐ฑ๐ต๐น๐ต๐ท๐ถ๐ฆ๐ท๐ช๐ท๐ด๐ท๐บ๐ท๐ผ๐ง๐ฑ๐ธ๐ญ๐ฐ๐ณ๐ฑ๐จ๐ต๐ฒ๐ป๐จ๐ผ๐ธ๐ธ๐ฒ๐ธ๐น๐ธ๐ฆ๐ธ๐ณ๐ท๐ธ๐ธ๐จ๐ธ๐ฑ๐ธ๐ฌ๐ธ๐ฝ๐ธ๐ฐ๐ธ๐ฎ๐ธ๐ง๐ธ๐ด๐ฟ๐ฆ๐ฌ๐ธ๐ฐ๐ท๐ธ๐ธ๐ช๐ธ๐ฑ๐ฐ๐ธ๐ฉ๐ธ๐ท๐ธ๐ฟ๐ธ๐ช๐จ๐ญ๐ธ๐พ๐น๐ผ๐น๐ฏ๐น๐ฟ๐น๐ญ๐น๐ฑ๐น๐ฌ๐น๐ฐ๐น๐ด๐น๐น๐น๐ณ๐น๐ท๐น๐ฒ๐น๐จ๐น๐ป๐บ๐ฌ๐บ๐ฆ๐ฆ๐ช๐ฌ๐ง๐บ๐ธ๐ป๐ฎ๐บ๐พ๐บ๐ฟ๐ป๐บ๐ป๐ฆ๐ป๐ช๐ป๐ณ๐ผ๐ซ๐ช๐ญ๐พ๐ช๐ฟ๐ฒ๐ฟ๐ผ๐ฝ๐ช
It would be cool to be able to search for an Emoji using Text. Searching for punch yields for instance ๐. I don't know whether Emojis have associated tags or not and whether they are only in English or also other languages.
Basically reflect the search functionality from Github / Slack in the Library.
First, thanks for your awesome module.
I used it in my app, and it works very well.
But it may cause performance issues on some devices, in my case, Moto X Style with CM 13 (Android 6.0.1), but not with my Galaxy S4 (Android 4.4), LG G2 (Android 5.0).
And many users reported too, mostly Android 6.0.
The issue:
I have some fragments with EmojiPopup instance, after start and exit those fragments couple times, ListView scrolling skipped a lot, also with SwipeRefreshLayout pull to refresh action.
I checked setSizeForSoftKeyboard function, and found OnGlobalLayoutListener was attached to rootView but never removed. So rootView could be attached multiple listeners, cause performance degrade.
https://github.com/vanniktech/Emoji/blob/master/library/src/main/java/com/vanniktech/emoji/EmojiPopup.java#L142
So I hacked a little, remove OnGlobalLayoutListener on fragment destory.
Which solved my problem.
But I don't think it's a clean way to do it.
Maybe OnGlobalLayoutListener should be removed when measure is done?
Thanks.
Whenever i open the emoticons with button and change to keybord and hide it (call method dismiss();) i lost focus to rootView so then i can open emoticonsSelect but i no have a the rootView
This open:
private void showEmoticon() {
imageEmoticonButton.setOnClickListener(new View.OnClickListener() {
@OverRide
public void onClick(View v) {
emojiPopup.toggle();
}
});
}
i setup on OnCreateView (fragment)
private void setUpEmojiPopup() {
emojiPopup = EmojiPopup.Builder.fromRootView(sendPanel).setOnEmojiBackspaceClickListener(new OnEmojiBackspaceClickListener() {
@OverRide
public void onEmojiBackspaceClicked(final View v) {
}
}).setOnEmojiClickedListener(new OnEmojiClickedListener() {
@OverRide
public void onEmojiClicked(final Emoji emoji) {
}
}).setOnEmojiPopupShownListener(new OnEmojiPopupShownListener() {
@OverRide
public void onEmojiPopupShown() {
// imageEmoticonButton.setEnabled(false);
}
}).setOnSoftKeyboardOpenListener(new OnSoftKeyboardOpenListener() {
@OverRide
public void onKeyboardOpen(final int keyBoardHeight) {
// emojiPopup.dismiss();
}
}).setOnEmojiPopupDismissListener(new OnEmojiPopupDismissListener() {
@OverRide
public void onEmojiPopupDismiss() {
}
}).setOnSoftKeyboardCloseListener(new OnSoftKeyboardCloseListener() {
@OverRide
public void onKeyboardClose() {
emojiPopup.dismiss();
}
}).build(messageBox);
}
The current logic for showing the picker itself and the skin tone popup have some problems.
This includes:
OnGlobalLayoutListener
does not get called (#31).Activity
is paused, or orientation is changed. Other pickers like this do remain openMIN_KEYBOARD_HEIGHT
is hardcoded to 100 pixels. I doubt that there are keyboards smaller than that, but it is still risky.status_bar_height
, which could change or disappear in future versions.I tested around a bit, but couldn't really get to anything. One notable thing though is the following:
To make a popup window behave properly (Like I described above for the skin tone popup), one can set:
popupWindow.setFocusable(true);
popupWindow.setOutsideTouchable(true);
This resulted in this weird behaviour though:
I don't really know how to approach this. Do you know something @vanniktech? I will further investigate this though.
Now we can only subclass EmojiTextView
to create emoji text views, because EmojiHandler
class is package-only. However, this is not possible to pass custom emoji size, except using attributes.
Please, make EmojiHandler
class public or provide function to override for EmojiTextView
to provide default value for emojiSize.
Thank you for filing an issue. If this is a bug that you want to report, please take the time to provide some information:
Screenshot(s) showing the issue and reprodution steps are appreciated.
I was using emoji for edittext in DialogFragment. But when i toggle, keyboard still display. Please check this issue. Thanks.
How to reproduce:
[Emoji]EditText
emojiPopup.toggle()
Expected result:
The emoji popup is shown
Actual result:
Nothing happens. The soft keyboard stays open.
Thank you for filing an issue. If this is a bug that you want to report, please take the time to provide some information:
Screenshot(s) showing the issue and reprodution steps are appreciated.
This is a proposal for a large change in the library.
I think about switching to the emoji of EmojiOne. It is regularly updated, contains all of the latest emoji, has a friendly licence (creative commons) and provides mapping files for somewhat easy generation of mapping classes.
.java
files which map to correct values. This has the advantage that we could just rerun the script when files of EmojiOne have changed and simply copy the changes to the library.What do you think about this? I would happily submit a PR for that (in fact I'm already working on it, the script is nearly ready).
Need Data Binding support for EmojiTextView.Java
. In my Chat application, I am using Data Binding and EmojiTextView need to be bindable for Chat Messages.
Will need to enable data binding in build.gradle
. I can make PR if you guys are ok with binding support.
In your library you are storing emojis as separate files. And in total they make about 1000 image files. I am curious is there is performance issue to store and access emojis as separate files.
For example Telegram stores their emojis in sprites.
Right now if you long press on an Emoji with a Skin Tone modifier you're still able to swipe, which means you can swipe to another category while the Skin Tone PopupWindow is still open. Another thing that works is scrolling up and down and then you're at a different position that you started with.
Telegram does a nice thing. If you select a skin tone, swipe gestures for categories are blocked and when you swipe you actually preselect the skin tone modifier. Once you release the swipe the selected skin tone is the one that will be applied.
Screenshots for clarification:
Hi,Thanks for sharing.
Failed to resolve: com.vanniktech:emoji:0.4.0-SNAPSHOT
This proplem how do solved?
i have an problem when i sent the image drawable as R.drawable.emoji_people then the smiley or everything works when i change the drawable to my own type image as of the imageview click then the smiley or default keyboard is not working properly
i am triying to put the new version and i get
failed to resolve com.vanniktech:emoji-ios:0.4.0
i am following the instructions of here
https://github.com/vanniktech/Emoji/tree/readme
Emoji's appear perfectly on edittext and textview. But when i do getText() on edittext, it returns " ๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝ testing emoji ", instead of unique codes for each emojis added.
I need to send obtained text to server when i send above text to server an entry has been created in database but nothing is saved on corresponding text column.
Please suggest any solution. Thanks.
I can help you with adding skin tones. Do you have ideas how to map them? Since skin toned emoji has two unicode characters (0x1f4aa 0x1f3fb) I am not sure how it can be handled.
EMOJIS_MAP.put(0x1f4aa, R.drawable.emoji_1f4aa_1f3fb);
Those are missing:
๐๐ฉโโค๏ธโ๐ฉ๐จโโค๏ธโ๐จ๐๐ฉโโค๏ธโ๐โ๐ฉ๐จโโค๏ธโ๐โ๐จ๐ช๐จโ๐ฉโ๐ง๐จโ๐ฉโ๐งโ๐ฆ๐จโ๐ฉโ๐ฆโ๐ฆ๐จโ๐ฉโ๐งโ๐ง๐ฉโ๐ฉโ๐ฆ๐ฉโ๐ฉโ๐ง๐ฉโ๐ฉโ๐งโ๐ฆ๐ฉโ๐ฉโ๐ฆโ๐ฆ๐ฉโ๐ฉโ๐งโ๐ง๐จโ๐จโ๐ฆ๐จโ๐จโ๐ง๐จโ๐จโ๐งโ๐ฆ๐จโ๐จโ๐ฆโ๐ฆ๐จโ๐จโ๐งโ๐ง
The emoji keyboard works perfectly yesterday when I started using it in my application except the landscape malfunctioning, but this morning another thing surface, the prompt is now showing above the soft keyboard without modifying anything.
The version used is:
compile 'com.vanniktech:emoji:0.3.0'
compile 'com.vanniktech:emoji:0.4.0
Thank you for filing an issue. If this is a bug that you want to report, please take the time to provide some information:
problem is I am getting this, I imported the jar and the aar file.
Could not initialize class com.vanniktech.emoji.EmojiHandler
Screenshot(s) showing the issue and reprodution steps are appreciated.
I'm trying to compile code that was working a few days ago. Right now, the compile issue I get is
Error:(151, 26) No resource found that matches the given name (at 'src' with value '@drawable/emoji_people').
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.