| | |
| | | private final int TYPE_BANNER = 1; |
| | | private final int TYPE_CIRCLE_CONTENT = 2; |
| | | private Integer maxImgHeight = null; |
| | | private TextViewUtil.URLClickListener mUrlClickListener; |
| | | |
| | | private DisplayImageOptions options; |
| | | |
| | |
| | | }; |
| | | |
| | | |
| | | public SendCircleAdapter(Activity activity, List<HomeBanner> mBannerList, List<SendCircleContent> mContentList, AdapterEventActionListener actionListener) { |
| | | public SendCircleAdapter(Activity activity, List<HomeBanner> mBannerList, List<SendCircleContent> mContentList, AdapterEventActionListener actionListener, TextViewUtil.URLClickListener urlClickListener) { |
| | | this.mContext = activity; |
| | | this.mBannerList = mBannerList; |
| | | this.mContentList = mContentList; |
| | | this.mUrlClickListener = urlClickListener; |
| | | inflater = LayoutInflater.from(mContext); |
| | | this.adapterEventActionListener = actionListener; |
| | | this.options = new DisplayImageOptions.Builder() |
| | |
| | | } |
| | | }); |
| | | |
| | | circleContentHolder.tv_recommend.setMaxLines(8); |
| | | |
| | | circleContentHolder.tv_recommend.setText(TextViewUtil.getClickableHtml(Html.fromHtml(circleContent.getTitle(), imageGetter, null), mContext, Color.parseColor("#586b95"))); |
| | | circleContentHolder.tv_recommend.setMaxLines(6); |
| | | circleContentHolder.tv_recommend.setMovementMethod(LinkMovementMethod.getInstance()); |
| | | circleContentHolder.tv_recommend.setText(TextViewUtil.getClickableHtml(Html.fromHtml(circleContent.getTitle(), imageGetter, null), mContext, Color.parseColor("#586b95"), mUrlClickListener)); |
| | | |
| | | |
| | | circleContentHolder.tv_recommend.post(new Runnable() { |
| | |
| | | if (l != null) { |
| | | int lines = l.getLineCount(); |
| | | if (lines > 0) { |
| | | if (l.getEllipsisCount(lines - 1) > 0) { |
| | | if (lines > circleContentHolder.tv_recommend.getMaxLines()) { |
| | | circleContentHolder.iv_recommend_more.setVisibility(View.VISIBLE); |
| | | } else { |
| | | circleContentHolder.iv_recommend_more.setVisibility(View.GONE); |
| | |
| | | } else { |
| | | holder.ll_content.setVisibility(View.VISIBLE); |
| | | String content = comment.getContent(); |
| | | content += "<img src='icon_common_emoji_link' /> <a href='test:http://www.baidu.com'>这是个可以点击的链接</a> 测试12312312123"; |
| | | holder.tv_content.setText(TextViewUtil.getClickableHtml(Html.fromHtml(content, imageGetter, null), context, Color.parseColor("#586b95"))); |
| | | |
| | | holder.tv_content.setMovementMethod(LinkMovementMethod.getInstance()); |
| | | holder.tv_content.setFocusable(false); |
| | | holder.tv_content.setClickable(false); |
| | | holder.tv_content.setLongClickable(false); |
| | | holder.tv_content.setText(TextViewUtil.getClickableHtml(Html.fromHtml(content, imageGetter, null), context, Color.parseColor("#586b95"), mUrlClickListener)); |
| | | } |
| | | |
| | | holder.tv_content.setMaxLines(6); |
| | |
| | | if (l != null) { |
| | | int lines = l.getLineCount(); |
| | | if (lines > 0) { |
| | | if (l.getEllipsisCount(lines - 1) > 0) { |
| | | if (lines > holder.tv_content.getMaxLines()) { |
| | | holder.iv_comment_more.setVisibility(View.VISIBLE); |
| | | |
| | | } else { |