Search in sources :

Example 1 with EmojiconPagerAdapter

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);
    }
}
Also used : EmojiconPagerAdapter(com.hyphenate.easeui.adapter.EmojiconPagerAdapter) EaseEmojiconGroupEntity(com.hyphenate.easeui.domain.EaseEmojiconGroupEntity) EaseEmojicon(com.hyphenate.easeui.domain.EaseEmojicon) GridView(android.widget.GridView) View(android.view.View) AdapterView(android.widget.AdapterView)

Aggregations

View (android.view.View)1 AdapterView (android.widget.AdapterView)1 GridView (android.widget.GridView)1 EmojiconPagerAdapter (com.hyphenate.easeui.adapter.EmojiconPagerAdapter)1 EaseEmojicon (com.hyphenate.easeui.domain.EaseEmojicon)1 EaseEmojiconGroupEntity (com.hyphenate.easeui.domain.EaseEmojiconGroupEntity)1