@Override
protected void onBindViewHolder(@NonNull final Chat.MessagesViewHolder holder, final int position, @NonNull final MessagesHelper model) {
holder.mDisplayText.setBackgroundColor(BackgoundColorSent);
}对于textColor和size,我可以这样做,但是textStyle没有任何方法。我正在使用firebaseRecyclerAdapter,并希望根据用户的意愿以编程方式更改recyclerView项的style。
发布于 2018-11-07 06:10:42
您可以使用setTypeface对文本应用样式。
textView.setTypeface(Typeface.BOLD_ITALIC);您可以使用的其他类型有:
发布于 2018-11-07 06:07:08
最好用xml文件"textStyle()“中的命令更改文本样式。
您需要从项目视图中更改布局中的内容。
我希望我能帮你。

https://stackoverflow.com/questions/53184248
复制相似问题