Web端用了Tower开源的,Android端找了几个都是不能显示pre标签包裹的代码,我就想请教下大家是怎么实现这块的?
下面是测试高亮代码:private void showQuestion(Question data) {
this.question=data;
ImageUtil.show2(getActivity(),(ImageView) iv_user_avatar,data.getUser().getAvatar());
tv_user_nickname.setText(data.getUser().getNickname());
tv_category.setText(getActivity().getString(R.string.category,data.getSubject().getTitle()));
tv_question_title.setText(data.getTitle());
// tv_question_content.setText(data.getContent());
RichText.from(data.getContent()).into(tv_question_content);
tv_time.setText(TimeUtil.date1(data.getCreated_at()));
if (data.getSection() != null) {
tv_section_title.setText(getActivity().getString(R.string.form, data.getSection().getTitle()));
}
}
xml测试代码:
android:name=".activity.WelcomeActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar">
在来一张图片:
.