@Override protected int calcPageCount(EmotionData emotionData) { // 判断unique item 是否存在 存在就是-1 不存在就不处理 int count = super.calcPageCount(emotionData); if (emotionData.getUniqueItem() != null) count = count - 1; return count; }
private void initData(EmotionData data) { List<Emoticon> emojiList = data.getEmotionList(); mPageEmoticon = new Emoticon[this.mCount][mRow * mColumn]; for (int i = 0; i < this.mCount; i++) { for (int j = 0; (j < mPageCount) && (i * mPageCount + j < emojiList.size()); j++) { Emoticon emoji = emojiList.get(i * mPageCount + j); mPageEmoticon[i][j] = emoji; } } rate = (viewPageWidth / (mColumn * 10 + 3)); item_length = (this.rate * 9); }