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();
}
});
}
Aggregations