com.vanniktech.emoji.EmojiImageView Java Examples

The following examples show how to use com.vanniktech.emoji.EmojiImageView. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ProfileEditActivity.java    From FaceT with Mozilla Public License 2.0 5 votes vote down vote up
private void setUpEmojiPopup() {
    emojiPopup = EmojiPopup.Builder.fromRootView(rootView)
            .setOnEmojiBackspaceClickListener(new OnEmojiBackspaceClickListener() {
                @Override public void onEmojiBackspaceClick(final View v) {
                    Log.d(TAG, "Clicked on Backspace");
                }
            })
            .setOnEmojiClickListener(new OnEmojiClickListener() {
                @Override public void onEmojiClick(@NonNull final EmojiImageView imageView, @NonNull final Emoji emoji) {
                    Log.d(TAG, "Clicked on emoji");
                }
            })
            .setOnEmojiPopupShownListener(new OnEmojiPopupShownListener() {
                @Override
                public void onEmojiPopupShown() {
                    emojiButton.setImageResource(R.drawable.ic_keyboard);
                }
            })
            .setOnSoftKeyboardOpenListener(new OnSoftKeyboardOpenListener() {
                @Override
                public void onKeyboardOpen(final int keyBoardHeight) {
                    Log.d(TAG, "Opened soft keyboard");
                }
            })
            .setOnEmojiPopupDismissListener(new OnEmojiPopupDismissListener() {
                @Override
                public void onEmojiPopupDismiss() {
                    emojiPopup.dismiss();
                    emojiButton.setImageResource(R.drawable.emoji_one_category_people);
                }
            })
            .setOnSoftKeyboardCloseListener(new OnSoftKeyboardCloseListener() {
                @Override
                public void onKeyboardClose() {
                    emojiPopup.dismiss();
                    Log.d(TAG, "Closed soft keyboard");
                }
            })
            .build(aboutMeEdittext);
}
 
Example #2
Source File: ProductDetailActivity.java    From FaceT with Mozilla Public License 2.0 5 votes vote down vote up
private void setUpEmojiPopup() {
    emojiPopup = EmojiPopup.Builder.fromRootView(activity_product_detail_layout)
            .setOnEmojiBackspaceClickListener(new OnEmojiBackspaceClickListener() {
                @Override public void onEmojiBackspaceClick(final View v) {
                    Log.d(TAG, "Clicked on Backspace");
                }
            })
            .setOnEmojiClickListener(new OnEmojiClickListener() {
                @Override public void onEmojiClick(@NonNull final EmojiImageView imageView, @NonNull final Emoji emoji) {
                    Log.d(TAG, "Clicked on emoji");
                }
            })
            .setOnEmojiPopupShownListener(new OnEmojiPopupShownListener() {
                @Override
                public void onEmojiPopupShown() {
                    emojiButton.setBackground(ContextCompat.getDrawable(ProductDetailActivity.this, R.drawable.ic_keyboard));
                }
            })
            .setOnSoftKeyboardOpenListener(new OnSoftKeyboardOpenListener() {
                @Override
                public void onKeyboardOpen(final int keyBoardHeight) {
                    Log.d(TAG, "Opened soft keyboard");
                }
            })
            .setOnEmojiPopupDismissListener(new OnEmojiPopupDismissListener() {
                @Override
                public void onEmojiPopupDismiss() {
                    emojiButton.setBackground(ContextCompat.getDrawable(ProductDetailActivity.this, R.drawable.emoji_one_category_people));
                }
            })
            .setOnSoftKeyboardCloseListener(new OnSoftKeyboardCloseListener() {
                @Override
                public void onKeyboardClose() {
                    emojiPopup.dismiss();
                    Log.d(TAG, "Closed soft keyboard");
                }
            })
            .build(commentEmojiconEditText);
}
 
Example #3
Source File: MessageListActivity.java    From chat21-android-sdk with GNU Affero General Public License v3.0 4 votes vote down vote up
private void setUpEmojiPopup() {
        emojiPopup = EmojiPopup.Builder.fromRootView(rootView)
                .setOnEmojiBackspaceClickListener(new OnEmojiBackspaceClickListener() {
                    @Override
                    public void onEmojiBackspaceClick(final View v) {
                        Log.d(TAG, "Clicked on Backspace");
                    }
                })
                .setOnEmojiClickListener(new OnEmojiClickListener() {
                    @Override
                    public void onEmojiClick(@NonNull final EmojiImageView imageView, @NonNull final Emoji emoji) {
                        Log.d(TAG, "Clicked on emoji");
                    }
                })
                .setOnEmojiPopupShownListener(new OnEmojiPopupShownListener() {
                    @Override
                    public void onEmojiPopupShown() {
                        emojiButton.setImageResource(R.drawable.ic_keyboard_24dp);
                    }
                })
                .setOnSoftKeyboardOpenListener(new OnSoftKeyboardOpenListener() {
                    @Override
                    public void onKeyboardOpen(@Px final int keyBoardHeight) {
                        Log.d(TAG, "Opened soft keyboard");
                    }
                })
//                .setOnEmojiPopupDismissListener(new OnEmojiPopupDismissListener() {
//                    @Override
//                    public void onEmojiPopupDismiss() {
//                        emojiButton.setImageResource(R.drawable.emoji_ios_category_people);
//                    }
//                })

                .setOnEmojiPopupDismissListener(new OnEmojiPopupDismissListener() {
                    @Override
                    public void onEmojiPopupDismiss() {
                        emojiButton.setImageResource(R.drawable.emoji_ios_category_people);
                    }
                })
                .setOnSoftKeyboardCloseListener(new OnSoftKeyboardCloseListener() {
                    @Override
                    public void onKeyboardClose() {
                        Log.d(TAG, "Closed soft keyboard");
                    }
                })
                .build(editText);
    }
 
Example #4
Source File: OnEmojiClickListener.java    From Emoji with Apache License 2.0 votes vote down vote up
void onEmojiClick(@NonNull EmojiImageView emoji, @NonNull Emoji imageView); 
Example #5
Source File: OnEmojiLongClickListener.java    From Emoji with Apache License 2.0 votes vote down vote up
void onEmojiLongClick(@NonNull EmojiImageView view, @NonNull Emoji emoji);