|
@@ -2,9 +2,11 @@ package com.ynstkz.shitu.android.adapter;
|
|
|
|
|
|
import android.annotation.SuppressLint;
|
|
|
import android.content.Context;
|
|
|
+import android.content.Intent;
|
|
|
import android.support.v4.content.ContextCompat;
|
|
|
import android.view.View;
|
|
|
import android.widget.ImageView;
|
|
|
+import android.widget.LinearLayout;
|
|
|
import android.widget.TextView;
|
|
|
|
|
|
import com.bumptech.glide.Glide;
|
|
@@ -14,6 +16,7 @@ import com.common.library.utils.DateUtil;
|
|
|
import com.github.vipulasri.timelineview.TimelineView;
|
|
|
import com.ynstkz.shitu.android.R;
|
|
|
import com.ynstkz.shitu.android.activity.OrgCommentItemBean;
|
|
|
+import com.ynstkz.shitu.android.activity.OrgDetailActivity;
|
|
|
import com.ynstkz.shitu.android.utils.VectorDrawableUtils;
|
|
|
|
|
|
import java.util.Date;
|
|
@@ -52,6 +55,7 @@ public class MineCommentItemAdapter extends CCListAdapter{
|
|
|
TextView tvOrgName;
|
|
|
ImageView ivOrgIcon;
|
|
|
TextView tvAddress;
|
|
|
+ LinearLayout llOrgMain;
|
|
|
|
|
|
@Override
|
|
|
public int getResource() {
|
|
@@ -67,13 +71,14 @@ public class MineCommentItemAdapter extends CCListAdapter{
|
|
|
tvOrgName = convertView.findViewById(R.id.tv_org_name);
|
|
|
ivOrgIcon = convertView.findViewById(R.id.iv_org_icon);
|
|
|
tvAddress = convertView.findViewById(R.id.tv_address);
|
|
|
+ llOrgMain = convertView.findViewById(R.id.ll_org_main);
|
|
|
}
|
|
|
|
|
|
@SuppressLint("SetTextI18n")
|
|
|
@Override
|
|
|
public void updateView(Object content, int position) {
|
|
|
|
|
|
- OrgCommentItemBean orgCommentItemBean = adapterContent.get(position);
|
|
|
+ final OrgCommentItemBean orgCommentItemBean = adapterContent.get(position);
|
|
|
if(position == 0){
|
|
|
timeMarker.setMarker(VectorDrawableUtils.getDrawable(context, R.drawable.ic_marker_inactive, R.color.main_color));
|
|
|
tvDate.setText(DateUtil.format(new Date(orgCommentItemBean.getCreateTime()), "yyyy") + "\n" +
|
|
@@ -90,6 +95,15 @@ public class MineCommentItemAdapter extends CCListAdapter{
|
|
|
tvOrgName.setText(orgCommentItemBean.getMemberName());
|
|
|
Glide.with(context).load(orgCommentItemBean.getHeadPic()).into(ivOrgIcon);
|
|
|
tvAddress.setText(orgCommentItemBean.getAddress());
|
|
|
+
|
|
|
+ llOrgMain.setOnClickListener(new View.OnClickListener() {
|
|
|
+ @Override
|
|
|
+ public void onClick(View view) {
|
|
|
+ Intent intent = new Intent(context, OrgDetailActivity.class);
|
|
|
+ intent.putExtra("memberId", orgCommentItemBean.getMemberId());
|
|
|
+ context.startActivity(intent);
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
};
|
|
|
}
|