use of com.hyphenate.easeui.adapter.EmojiconPagerAdapter 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);
}
}
Aggregations