Change font in recyclerview

#3 · open · 3 comments

View on GitHub ↗

tuanth89

Hi! thank for library! I use method changefont, but when i scroll recyclerview, some textview not change completely, it use old font. which way to resolve with recyclerview ??? Thank

Comments

GcsSloop

if you want change the RecyclerView or ListView, you should use it in adapter's ViewHolder, like this: ``` public static class NormalTextViewHolder extends RecyclerView.ViewHolder { TextView mTextView; NormalTextViewHolder(View view) { super(view); FontsManager.changeFonts(view); // <------------- this mTextView = (TextView) view.findViewById(R.id.text_view); view.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Log.d("NormalTextViewHolder", "onClick--> position = " + getPosition()); } }); } } ``` but, if you just change the RecyclervView `FontsManager.changeFonts(mRecyclerView);` , when you scroll it, the ChildView will be change, and new ChildView use the old font.

MohinKhanPathan

hii , i am making FONT Style app. having issu in it. when enter text for input that time i set recycler view have diffrent fonts, but when i copy or send that text . text will be default font.