yzycjg.zip

  • 8y85Q2
    了解作者
  • PLC
    开发工具
  • 2KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 0
    下载次数
  • 2018-10-15 22:10
    上传日期
本系统主要是针对用户和学生的,用户的信息是直接在注册的时候保存到数据库中的。
yzycjg.zip
  • SplashPresentComponent.java
    593B
  • Title.java
    682B
  • MessageAdapter.java
    3KB
  • UserApiImp.java
    2.8KB
  • PipeEvent.java
    320B
内容介绍
package com.caij.emore.ui.adapter; import android.content.Context; import android.view.View; import android.widget.TextView; import com.caij.emore.R; import com.caij.emore.bean.wrap.DirectMessageWrap; import com.caij.emore.database.bean.DirectMessage; import com.caij.emore.ui.adapter.delegate.MessageDelegateProvider; import com.caij.emore.utils.DateUtil; import com.caij.lib.widget.recyclerview.OnItemPartViewClickListener; import com.caij.rvadapter.BaseViewHolder; import com.caij.rvadapter.adapter.MultiItemTypeAdapter; import java.util.Map; /** * Created by Caij on 2016/7/10. */ public class MessageAdapter extends MultiItemTypeAdapter<DirectMessageWrap> { private Map<String, DirectMessage> mShowTimeMessageMap; public MessageAdapter(Context context, OnItemPartViewClickListener onItemPartViewClickListener) { super(context); MessageDelegateProvider.OutMessageDelegate outMessageDelegate = new MessageDelegateProvider.OutMessageDelegate(onItemPartViewClickListener) { @Override public int getItemViewLayoutId() { return 0; } @Override public boolean isForViewType(DirectMessageWrap directMessageWrap, int i) { return false; } }; MessageDelegateProvider.ReceiveImageMessageDelegate receiveImageMessageDelegate = new MessageDelegateProvider.ReceiveImageMessageDelegate(onItemPartViewClickListener); MessageDelegateProvider.ReceiveTextMessageDelegate receiveTextMessageDelegate = new MessageDelegateProvider.ReceiveTextMessageDelegate(onItemPartViewClickListener); MessageDelegateProvider.OutImageMessageDelegate outImageMessageDelegate = new MessageDelegateProvider.OutImageMessageDelegate(onItemPartViewClickListener, receiveImageMessageDelegate, outMessageDelegate); MessageDelegateProvider.OutTextMessageDelegate outTextMessageDelegate = new MessageDelegateProvider.OutTextMessageDelegate(onItemPartViewClickListener, receiveTextMessageDelegate, outMessageDelegate); addItemViewDelegate(receiveImageMessageDelegate); addItemViewDelegate(receiveTextMessageDelegate); addItemViewDelegate(outImageMessageDelegate); addItemViewDelegate(outTextMessageDelegate); } @Override public void onBindViewHolder(BaseViewHolder holder, int position) { super.onBindViewHolder(holder, position); DirectMessage directMessage = getItem(position).directMessage; TextView tvTime = holder.getView(R.id.tv_send_time); if (mShowTimeMessageMap != null && mShowTimeMessageMap.get(directMessage.getIdstr()) != null) { tvTime.setText(DateUtil.formatMessageDate(mContext, directMessage.getCreated_at().getTime())); tvTime.setVisibility(View.VISIBLE); }else { tvTime.setVisibility(View.GONE); } } public void setShowTimeMessageMap(Map<String, DirectMessage> showTimeMessageMap) { mShowTimeMessageMap = showTimeMessageMap; } }
评论
    相关推荐