|
@@ -32,16 +32,16 @@ public class MessageBoxAdapter extends BaseQuickAdapter<SystemMessageBean.RowsBe
|
|
|
@Override
|
|
|
protected void convert(BaseViewHolder helper, SystemMessageBean.RowsBean item) {
|
|
|
ImageView im_type = helper.getView(R.id.im_type);
|
|
|
- TextView tv_title=helper.getView(R.id.tv_title);
|
|
|
+ TextView tv_title = helper.getView(R.id.tv_title);
|
|
|
tv_title.setText(item.title);
|
|
|
- TextView tv_content=helper.getView(R.id.tv_content);
|
|
|
+ TextView tv_content = helper.getView(R.id.tv_content);
|
|
|
tv_content.setText(item.content);
|
|
|
- TextView tv_date=helper.getView(R.id.tv_date);
|
|
|
- tv_date.setText(TimeUtils.date2String(TimeUtils.string2Date(item.sendTime),"yyyy-MM-dd"));
|
|
|
- View view_unread=helper.getView(R.id.view_unread);
|
|
|
- if (item.readStatus==0){
|
|
|
+ TextView tv_date = helper.getView(R.id.tv_date);
|
|
|
+ tv_date.setText(TimeUtils.date2String(TimeUtils.string2Date(item.sendTime), "yyyy-MM-dd"));
|
|
|
+ View view_unread = helper.getView(R.id.view_unread);
|
|
|
+ if (item.readStatus == 0) {
|
|
|
view_unread.setVisibility(View.VISIBLE);
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
view_unread.setVisibility(View.GONE);
|
|
|
}
|
|
|
switch (item.subType) {
|
|
@@ -93,12 +93,15 @@ public class MessageBoxAdapter extends BaseQuickAdapter<SystemMessageBean.RowsBe
|
|
|
//会员
|
|
|
im_type.setBackgroundResource(R.drawable.icon_message_vip);
|
|
|
break;
|
|
|
- case "NOTICE":
|
|
|
+ case "PIANO_ROOM":
|
|
|
+ im_type.setBackgroundResource(R.drawable.icon_message_piano);
|
|
|
+ break;
|
|
|
+ case "STYLE":
|
|
|
+ im_type.setBackgroundResource(R.drawable.icon_message_piano);
|
|
|
+ break;
|
|
|
default:
|
|
|
//公告
|
|
|
-// im_type.setBackgroundResource(R.drawable.icon_message_notice);
|
|
|
- //TODO 还差公告的图
|
|
|
- im_type.setBackgroundResource(R.drawable.icon_message_vip);
|
|
|
+ im_type.setBackgroundResource(R.drawable.icon_message_other);
|
|
|
break;
|
|
|
}
|
|
|
}
|