当前位置: 首页>>代码示例>>Java>>正文


Java HtmlHttpImageGetter类代码示例

本文整理汇总了Java中org.sufficientlysecure.htmltextview.HtmlHttpImageGetter的典型用法代码示例。如果您正苦于以下问题:Java HtmlHttpImageGetter类的具体用法?Java HtmlHttpImageGetter怎么用?Java HtmlHttpImageGetter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


HtmlHttpImageGetter类属于org.sufficientlysecure.htmltextview包,在下文中一共展示了HtmlHttpImageGetter类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onBindViewHolder

import org.sufficientlysecure.htmltextview.HtmlHttpImageGetter; //导入依赖的package包/类
@Override
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
    if (holder instanceof TopViewHolder) {
        TopViewHolder topHolder = ((TopViewHolder) holder);
        if (mTopBean == null) {
            return;
        }
        ImageLoader.load(mContext, VtexPresenter.parseImg(mTopBean.getMember().getavatar_normal()), topHolder.ivRepliesTopFace);
        topHolder.tvRepliesTopContent.setHtml(mTopBean.getContent_rendered(), new HtmlHttpImageGetter(topHolder.tvRepliesTopContent));
        topHolder.tvRepliesTopName.setText(mTopBean.getMember().getUsername());
        topHolder.tvRepliesTopTitle.setText(mTopBean.getTitle());
        topHolder.tvRepliesTopNum.setText(String.format("%s,   共%s条回复", DateUtil.formatTime2String(mTopBean.getCreated()), mTopBean.getReplies()));
    } else {
        ViewHolder contentHolder = ((ViewHolder) holder);
        RepliesListBean bean = mList.get(position - 1);
        if (bean == null)
            return;
        ImageLoader.load(mContext, VtexPresenter.parseImg(bean.getMember().getavatar_normal()), contentHolder.ivRepliesFace);
        contentHolder.tvRepliesName.setText(bean.getMember().getUsername());
        contentHolder.tvRepliesTips.setText(String.format("%d楼 %s", position, DateUtil.formatTime2String(bean.getCreated())));
        contentHolder.tvRepliesContent.setHtml(bean.getContent_rendered(), new HtmlHttpImageGetter(contentHolder.tvRepliesContent));
    }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:24,代码来源:RepliesAdapter.java

示例2: initialize

import org.sufficientlysecure.htmltextview.HtmlHttpImageGetter; //导入依赖的package包/类
@Override
public void initialize(ViewHolder holder, int position) {
    CourseDetailModel model = list.get(position);
    holder.title.setText(model.title);

    if (TextUtils.isEmpty(model.summary)) {
        holder.summary.setVisibility(HtmlTextView.GONE);
    } else {
        holder.summary.setVisibility(HtmlTextView.VISIBLE);
        holder.summary.setHtml(model.summary, new HtmlHttpImageGetter(holder.summary));
    }

    RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(holder.itemView.getContext());
    holder.content.setLayoutManager(layoutManager);
    holder.content.setItemAnimator(new DefaultItemAnimator());
    holder.content.setAdapter(new CourseDetailInnerRecyclerViewAdapter(model.courseDetailInnerModels()));
}
 
开发者ID:mgilangjanuar,项目名称:GoSCELE,代码行数:18,代码来源:CourseDetailRecyclerViewAdapter.java

示例3: initialize

import org.sufficientlysecure.htmltextview.HtmlHttpImageGetter; //导入依赖的package包/类
@Override
public void initialize(ViewHolder holder, int position) {
    final CourseDetailInnerModel model = list.get(position);

    if (!model.title.equals("")) {
        holder.title.setVisibility(TextView.VISIBLE);
        holder.title.setText(model.title);
        holder.title.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(v.getContext(), BrowserActivity.class);
                intent.putExtra(Constant.URL, model.url);
                v.getContext().startActivity(intent);
            }
        });
    }

    if (!model.comment.equals("")) {
        holder.layoutComment.setVisibility(TextView.VISIBLE);
        holder.comment.setHtml(model.comment, new HtmlHttpImageGetter(holder.comment));
    }
}
 
开发者ID:mgilangjanuar,项目名称:GoSCELE,代码行数:23,代码来源:CourseDetailInnerRecyclerViewAdapter.java

示例4: showNews

import org.sufficientlysecure.htmltextview.HtmlHttpImageGetter; //导入依赖的package包/类
@Override
    public void showNews(String detailNews) {
        //判断图片url是否为null
        if (mUrls[1] != null) {
            ImageLoaderUtil.loadImage(getApplicationContext(), mUrls[1], mImageView);
        } else {
            //为空显示JJ图片
            mImageView.setImageResource(R.drawable.jj);
        }
        mHtmlTextView.setHtml(detailNews, new HtmlHttpImageGetter(mHtmlTextView, null, true));
        mFooter.setVisibility(View.VISIBLE);
//        mWebView.getSettings().setLoadsImagesAutomatically(true);
//        mWebView.getSettings().setJavaScriptEnabled(true);
//        mWebView.setWebViewClient(new NoAdWebViewClient(this, mUrls[0]));

    }
 
开发者ID:distancelin,项目名称:iNews,代码行数:17,代码来源:NewsDetailActivity.java

示例5: initialize

import org.sufficientlysecure.htmltextview.HtmlHttpImageGetter; //导入依赖的package包/类
@Override
public void initialize(ViewHolder holder, int position) {
    ScheduleDeadlineModel model = list.get(position);
    holder.title.setText(model.title);
    holder.subTitle.setText(model.courseModel.name);
    holder.time.setText(model.time);

    if (TextUtils.isEmpty(model.description)) {
        holder.description.setVisibility(TextView.GONE);
    } else {
        holder.description.setVisibility(TextView.VISIBLE);
        holder.description.setHtml(model.description, new HtmlHttpImageGetter(holder.description));
    }
}
 
开发者ID:mgilangjanuar,项目名称:GoSCELE,代码行数:15,代码来源:ScheduleDeadlineRecyclerViewAdapter.java

示例6: onBindViewHolder

import org.sufficientlysecure.htmltextview.HtmlHttpImageGetter; //导入依赖的package包/类
@Override
public void onBindViewHolder(final AnnouncementHolder holder, final int position) {
    Announcement.Announcements announcement = mAnnouncements.get(position);
    holder.title.setText(announcement.title);

    holder.showFullPost = false;

    holder.time.setText(DateUtils.getRelativeTimeSpanString(
            announcement.newsTime.getTime(), new Date().getTime(),
            DateUtils.FORMAT_ABBREV_ALL));

    if (REDApplication.get(holder.announcementImage.getContext()).getComponent().dataManager().getPreferencesHelper().getLoadImages()) {
        String firstImageUrl = ImageHelper.getFirstImageLink(announcement.body);
        if (firstImageUrl.length() > 0) {
            Glide.with(holder.announcementImage.getContext()).load(firstImageUrl).asBitmap().fitCenter().into(holder.announcementImage);
        }
    }

    holder.fullText = announcement.body;
    holder.body.setLinkTextColor(ContextCompat.getColor(holder.body.getContext(), R.color.primary));
    if (announcement.body.length() > 25000) {
        holder.body.setText(holder.body.getContext().getString(R.string.post_too_long));
    } else {
        holder.body.setHtml(announcement.body,
                new HtmlHttpImageGetter(holder.body));
    }

    holder.body.setMaxLines(COLLAPSED_POST_LINES);

}
 
开发者ID:stuxo,项目名称:REDAndroid,代码行数:31,代码来源:AnnouncementAdapter.java

示例7: toggleView

import org.sufficientlysecure.htmltextview.HtmlHttpImageGetter; //导入依赖的package包/类
private void toggleView() {
    showFullPost = !showFullPost;
    if (showFullPost) {
        body.setLines(COLLAPSED_POST_LINES);
        body.setHtml(fullText,
                new HtmlHttpImageGetter(body));
        readMore.setText(readMore.getContext().getString(R.string.show_all));
    } else {
        readMore.setText(readMore.getContext().getString(R.string.show_less));
        body.setMaxLines(Integer.MAX_VALUE);
    }
}
 
开发者ID:stuxo,项目名称:REDAndroid,代码行数:13,代码来源:AnnouncementAdapter.java

示例8: showUserDescription

import org.sufficientlysecure.htmltextview.HtmlHttpImageGetter; //导入依赖的package包/类
@Override public void showUserDescription(String description) {
	userProfileText.setHtml(description, new HtmlHttpImageGetter(userProfileText));
}
 
开发者ID:stuxo,项目名称:REDAndroid,代码行数:4,代码来源:ProfileActivity.java

示例9: ViewHolder

import org.sufficientlysecure.htmltextview.HtmlHttpImageGetter; //导入依赖的package包/类
public ViewHolder(View view) {
    super(view);
    ButterKnife.bind(this, view);
    imageGetter = new HtmlHttpImageGetter(body);
    body.setMovementMethod(new HtmlTextViewLinkMovementMethod());
}
 
开发者ID:grundleborg,项目名称:matterdroid,代码行数:7,代码来源:PostBasicTopItem.java


注:本文中的org.sufficientlysecure.htmltextview.HtmlHttpImageGetter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。