Search in sources :

Example 1 with EaseEmojiconMenuListener

use of com.hyphenate.easeui.widget.emojicon.EaseEmojiconMenuBase.EaseEmojiconMenuListener in project SmartCampus by Vegen.

the class EaseChatInputMenu method processChatMenu.

protected void processChatMenu() {
    // send message button
    chatPrimaryMenu.setChatPrimaryMenuListener(new EaseChatPrimaryMenuListener() {

        @Override
        public void onSendBtnClicked(String content) {
            if (listener != null)
                listener.onSendMessage(content);
        }

        @Override
        public void onToggleVoiceBtnClicked() {
            hideExtendMenuContainer();
        }

        @Override
        public void onToggleExtendClicked() {
            toggleMore();
        }

        @Override
        public void onToggleEmojiconClicked() {
            toggleEmojicon();
        }

        @Override
        public void onEditTextClicked() {
            hideExtendMenuContainer();
        }

        @Override
        public boolean onPressToSpeakBtnTouch(View v, MotionEvent event) {
            if (listener != null) {
                return listener.onPressToSpeakBtnTouch(v, event);
            }
            return false;
        }
    });
    // emojicon menu
    emojiconMenu.setEmojiconMenuListener(new EaseEmojiconMenuListener() {

        @Override
        public void onExpressionClicked(EaseEmojicon emojicon) {
            if (emojicon.getType() != EaseEmojicon.Type.BIG_EXPRESSION) {
                if (emojicon.getEmojiText() != null) {
                    chatPrimaryMenu.onEmojiconInputEvent(EaseSmileUtils.getSmiledText(context, emojicon.getEmojiText()));
                }
            } else {
                if (listener != null) {
                    listener.onBigExpressionClicked(emojicon);
                }
            }
        }

        @Override
        public void onDeleteImageClicked() {
            chatPrimaryMenu.onEmojiconDeleteEvent();
        }
    });
}
Also used : EaseEmojiconMenuListener(com.hyphenate.easeui.widget.emojicon.EaseEmojiconMenuBase.EaseEmojiconMenuListener) EaseEmojicon(com.hyphenate.easeui.domain.EaseEmojicon) EaseChatPrimaryMenuListener(com.hyphenate.easeui.widget.EaseChatPrimaryMenuBase.EaseChatPrimaryMenuListener) View(android.view.View) MotionEvent(android.view.MotionEvent)

Aggregations

MotionEvent (android.view.MotionEvent)1 View (android.view.View)1 EaseEmojicon (com.hyphenate.easeui.domain.EaseEmojicon)1 EaseChatPrimaryMenuListener (com.hyphenate.easeui.widget.EaseChatPrimaryMenuBase.EaseChatPrimaryMenuListener)1 EaseEmojiconMenuListener (com.hyphenate.easeui.widget.emojicon.EaseEmojiconMenuBase.EaseEmojiconMenuListener)1