Esempio n. 1
0
 @OnClick(R.id.cardview)
 public void cardViewOnClick() {
   Context context = tvMessage.getContext();
   Intent intent = new Intent(context, WorkOrderDetailActivity.class);
   WorkOrderWarn workOrderWarn = workOrderWarnList.get(getAdapterPosition());
   intent.putExtra("workOrderId", workOrderWarn.getWorkOrderId());
   context.startActivity(intent);
 }
Esempio n. 2
0
 @Override
 public void onBindViewHolder(ViewHolder viewHolder, final int position) {
   WorkOrderWarn workOrderWarn = workOrderWarnList.get(position);
   viewHolder.tvMessage.setText(workOrderWarn.getMessage());
   viewHolder.tvMessage.setTextColor(
       ContextCompat.getColor(viewHolder.tvMessage.getContext(), R.color.md_red_400));
   viewHolder.tvCreateTime.setText(
       new DateTime(workOrderWarn.getCreateTime()).toString("yyyy-MM-dd HH:mm:ss"));
 }