Reputation:
@Override
protected void onBindViewHolder(@NonNull final Chat.MessagesViewHolder holder, final int position, @NonNull final MessagesHelper model) {
holder.mDisplayText.setBackgroundColor(BackgoundColorSent);
}
I can do that for textColor and size but there is no method for textStyle
. I'm using a firebaseRecyclerAdapter
and wish to change the style
of the item of recyclerView programmatically as the user pleases.
Upvotes: 2
Views: 119
Reputation: 2178
You can use setTypeface
for applying styles to your text
textView.setTypeface(Typeface.BOLD_ITALIC);
Other Typefaces you can use are:
Upvotes: 1
Reputation: 21
It's better to change the texstyle with the command in the xml file "textStyle()"
You need to change it in your layout from your itemview.
I hope I could help you.
Upvotes: 0