您好我在recyclerview应用程序中创建了一个适配器。所以我在我的textview中显示我的字符串文件,但当我尝试设置我的适配器以显示我的字符串文件"描述"兼容html代码,然后我的文字消失了。那么你能帮我解决什么问题吗?非常感谢。
@Override
public void onBindViewHolder(final FlowerViewHolder holder, int position) {
holder.mImage.setImageResource(mFlowerList.get(position).getFlowerImage());
holder.mTitle.setText(mFlowerList.get(position).getFlowerName());
holder.mCardView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent mIntent = new Intent(mContext, DetailActivity.class);
mIntent.putExtra("Title", mFlowerList.get(holder.getAdapterPosition()).getFlowerName());
mIntent.putExtra("Description", showHtml (mFlowerList.get(holder.getAdapterPosition()).getFlowerDescription()));
mIntent.putExtra("Image", mFlowerList.get(holder.getAdapterPosition()).getFlowerImage());
mContext.startActivity(mIntent);
}
private String showHtml(String description) {
return null;
}
});
}
@Override
public int getItemCount() {
return mFlowerList.size();
}
}