use of cn.bingoogolapple.badgeview.BGABadgeLinearLayout in project BGABadgeView-Android by bingoogolapple.
the class MessageAdapter method fillData.
@Override
protected void fillData(BGAViewHolderHelper holderHelper, final int position, final MessageModel message) {
holderHelper.setText(R.id.tv_item_message_title, message.title);
holderHelper.setText(R.id.tv_item_message_detail, message.detail);
BGABadgeLinearLayout rootView = (BGABadgeLinearLayout) holderHelper.getConvertView();
if (message.newMsgCount > 0) {
rootView.showTextBadge("" + message.newMsgCount);
rootView.setDragDismissDelegage(new BGADragDismissDelegate() {
@Override
public void onDismiss(BGABadgeable badgeable) {
message.newMsgCount = 0;
ToastUtil.show(message.title + "的徽章消失");
}
});
} else {
rootView.hiddenBadge();
}
}
Aggregations