use of com.hyphenate.easeui.domain.EaseEmojiconGroupEntity in project SmartCampus by Vegen.
the class EaseEmojiconPagerView method init.
public void init(List<EaseEmojiconGroupEntity> emojiconGroupList, int emijiconColumns, int bigEmojiconColumns) {
if (emojiconGroupList == null) {
throw new RuntimeException("emojiconGroupList is null");
}
this.groupEntities = emojiconGroupList;
this.emojiconColumns = emijiconColumns;
this.bigEmojiconColumns = bigEmojiconColumns;
viewpages = new ArrayList<View>();
for (int i = 0; i < groupEntities.size(); i++) {
EaseEmojiconGroupEntity group = groupEntities.get(i);
List<EaseEmojicon> groupEmojicons = group.getEmojiconList();
List<View> gridViews = getGroupGridViews(group);
if (i == 0) {
firstGroupPageSize = gridViews.size();
}
maxPageCount = Math.max(gridViews.size(), maxPageCount);
viewpages.addAll(gridViews);
}
pagerAdapter = new EmojiconPagerAdapter(viewpages);
setAdapter(pagerAdapter);
setOnPageChangeListener(new EmojiPagerChangeListener());
if (pagerViewListener != null) {
pagerViewListener.onPagerViewInited(maxPageCount, firstGroupPageSize);
}
}
use of com.hyphenate.easeui.domain.EaseEmojiconGroupEntity in project SmartCampus by Vegen.
the class EaseEmojiconMenu method init.
public void init(List<EaseEmojiconGroupEntity> groupEntities) {
if (groupEntities == null || groupEntities.size() == 0) {
return;
}
for (EaseEmojiconGroupEntity groupEntity : groupEntities) {
emojiconGroupList.add(groupEntity);
tabBar.addTab(groupEntity.getIcon());
}
pagerView.setPagerViewListener(new EmojiconPagerViewListener());
pagerView.init(emojiconGroupList, emojiconColumns, bigEmojiconColumns);
tabBar.setTabBarItemClickListener(new EaseScrollTabBarItemClickListener() {
@Override
public void onItemClick(int position) {
pagerView.setGroupPostion(position);
}
});
}
use of com.hyphenate.easeui.domain.EaseEmojiconGroupEntity in project SmartCampus by Vegen.
the class EaseEmojiconMenu method addEmojiconGroup.
/**
* add emojicon group list
* @param groupEntitieList
*/
public void addEmojiconGroup(List<EaseEmojiconGroupEntity> groupEntitieList) {
for (int i = 0; i < groupEntitieList.size(); i++) {
EaseEmojiconGroupEntity groupEntity = groupEntitieList.get(i);
emojiconGroupList.add(groupEntity);
pagerView.addEmojiconGroup(groupEntity, i == groupEntitieList.size() - 1 ? true : false);
tabBar.addTab(groupEntity.getIcon());
}
}
use of com.hyphenate.easeui.domain.EaseEmojiconGroupEntity 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;
}
Aggregations