Search in sources :

Example 1 with EaseEmojiconMenu

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

the class EaseChatInputMenu method init.

/**
 * init view
 *
 * This method should be called after registerExtendMenuItem(), setCustomEmojiconMenu() and setCustomPrimaryMenu().
 * @param emojiconGroupList --will use default if null
 */
@SuppressLint("InflateParams")
public void init(List<EaseEmojiconGroupEntity> emojiconGroupList) {
    if (inited) {
        return;
    }
    // primary menu, use default if no customized one
    if (chatPrimaryMenu == null) {
        chatPrimaryMenu = (EaseChatPrimaryMenu) layoutInflater.inflate(R.layout.ease_layout_chat_primary_menu, null);
    }
    primaryMenuContainer.addView(chatPrimaryMenu);
    // emojicon menu, use default if no customized one
    if (emojiconMenu == null) {
        emojiconMenu = (EaseEmojiconMenu) layoutInflater.inflate(R.layout.ease_layout_emojicon_menu, null);
        if (emojiconGroupList == null) {
            emojiconGroupList = new ArrayList<EaseEmojiconGroupEntity>();
            emojiconGroupList.add(new EaseEmojiconGroupEntity(R.drawable.ee_1, Arrays.asList(EaseDefaultEmojiconDatas.getData())));
        }
        ((EaseEmojiconMenu) emojiconMenu).init(emojiconGroupList);
    }
    emojiconMenuContainer.addView(emojiconMenu);
    processChatMenu();
    chatExtendMenu.init();
    inited = true;
}
Also used : EaseEmojiconGroupEntity(com.hyphenate.easeui.domain.EaseEmojiconGroupEntity) EaseEmojiconMenu(com.hyphenate.easeui.widget.emojicon.EaseEmojiconMenu) SuppressLint(android.annotation.SuppressLint)

Aggregations

SuppressLint (android.annotation.SuppressLint)1 EaseEmojiconGroupEntity (com.hyphenate.easeui.domain.EaseEmojiconGroupEntity)1 EaseEmojiconMenu (com.hyphenate.easeui.widget.emojicon.EaseEmojiconMenu)1