View wenziView(View v, ChatBean bean) { ImageViews imgview1; if (bean.userAccount.equals(contactAccount)) { v = layout.inflate(R.layout.list_say_he_item, null); imgview1 = (ImageViews) v.findViewById(R.id.photo); if (num < beans.size()) { num = beans.size(); warn.player(); } if (Sources.CURRENTIC.contactAccount.equals("1988")) { imgview1.setImageResource(R.drawable.kefu); } else { imgview1.DisplayImage(Sources.CURRENTIC.contactPhoto, false); } } else { v = layout.inflate(R.layout.list_say_me_item, null); imgview1 = (ImageViews) v.findViewById(R.id.photo); // imgview1.DisplayImage(sp.getString("pic", ""), false); } TextView talk_time = (TextView) v.findViewById(R.id.time); TextView messagedetail_row_text = (TextView) v.findViewById(R.id.text); talk_time.setText(bean.chatTime); messagedetail_row_text.setText(PM.getbiaoqian2(mContext, bean.chatContent)); return v; }
View image(View v, ChatBean bean) { ImageViews imgview1; if (bean.userAccount.equals(contactAccount)) { v = layout.inflate(R.layout.list_say_he_image, null); imgview1 = (ImageViews) v.findViewById(R.id.photo); if (num < beans.size()) { num = beans.size(); warn.player(); } if (Sources.CURRENTIC.contactAccount.equals("1988")) { imgview1.setImageResource(R.drawable.kefu); } else { imgview1.DisplayImage(Sources.CURRENTIC.contactPhoto, false); } } else { v = layout.inflate(R.layout.list_say_me_image, null); imgview1 = (ImageViews) v.findViewById(R.id.photo); // imgview1.DisplayImage(sp.getString("pic", ""), false); } TextView talk_time = (TextView) v.findViewById(R.id.time); talk_time.setText(bean.chatTime); ImageViews messagegedetail_images = (ImageViews) v.findViewById(R.id.img); final String name = bean.chatContent.substring(4, bean.chatContent.length() - 1); messagegedetail_images.DisplayImage(Sources.IMAGEURL + name, false); messagegedetail_images.setOnClickListener( new OnClickListener() { @Override public void onClick(View v) { idialog.mInitShow(Sources.IMAGEURL + name); } }); return v; }
View audio(View v, ChatBean bean) { ImageViews imgview1; if (bean.userAccount.equals(contactAccount)) { v = layout.inflate(R.layout.list_say_he_voice, null); imgview1 = (ImageViews) v.findViewById(R.id.photo); if (num < beans.size()) { num = beans.size(); warn.player(); } if (Sources.CURRENTIC.contactAccount.equals("1988")) { imgview1.setImageResource(R.drawable.kefu); } else { imgview1.DisplayImage(Sources.CURRENTIC.contactPhoto, false); } } else { v = layout.inflate(R.layout.list_say_me_voice, null); imgview1 = (ImageViews) v.findViewById(R.id.photo); // imgview1.DisplayImage(sp.getString("pic", ""), false); } TextView talk_time = (TextView) v.findViewById(R.id.time); talk_time.setText(bean.chatTime); ImageTextButton btn = (ImageTextButton) v.findViewById(R.id.button); btn.initView(mContext, bean.chatContent.substring(6, bean.chatContent.length() - 1)); return v; }