本文整理汇总了Java中github.ankushsachdeva.emojicon.EmojiconGridView类的典型用法代码示例。如果您正苦于以下问题:Java EmojiconGridView类的具体用法?Java EmojiconGridView怎么用?Java EmojiconGridView使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EmojiconGridView类属于github.ankushsachdeva.emojicon包,在下文中一共展示了EmojiconGridView类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initEmojiPopupWindow
import github.ankushsachdeva.emojicon.EmojiconGridView; //导入依赖的package包/类
/**
* Sets the EmojiPopupWindows of the ChatActivity.
*/
private void initEmojiPopupWindow(){
emojiconsReady = false;
popupEmojiWindow.setOnEmojiconClickedListener(new EmojiconGridView.OnEmojiconClickedListener() {
@Override
public void onEmojiconClicked(Emojicon emojicon) {
mEmojiEditText.append(emojicon.getEmoji());
}
});
popupEmojiWindow.setOnEmojiconBackspaceClickedListener(new EmojiconsPopup.OnEmojiconBackspaceClickedListener() {
@Override
public void onEmojiconBackspaceClicked(View v) {
KeyEvent event = new KeyEvent(
0, 0, 0, KeyEvent.KEYCODE_DEL, 0, 0, 0, 0, KeyEvent.KEYCODE_ENDCALL);
mEmojiEditText.dispatchKeyEvent(event);
}
});
popupEmojiWindow.setOnSoftKeyboardOpenCloseListener(new EmojiconsPopup.OnSoftKeyboardOpenCloseListener() {
@Override
public void onKeyboardOpen(int keyBoardHeight) {
if (!emojiconsReady) {
emojiconsReady = true;
}
}
@Override
public void onKeyboardClose() {
if (popupEmojiWindow.isShowing()) {
popupEmojiWindow.dismiss();
}
}
});
}