FontsManager icon indicating copy to clipboard operation
FontsManager copied to clipboard

Change font in recyclerview

Open tuanth89 opened this issue 9 years ago • 3 comments

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

tuanth89 avatar Aug 11 '16 06:08 tuanth89

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.

GcsSloop avatar Aug 13 '16 06:08 GcsSloop

Thank use library for root device

Pada tanggal 11 Agt 2016 1.57 PM, "tuanth89" [email protected] menulis:

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

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/GcsSloop/FontsManager/issues/3, or mute the thread https://github.com/notifications/unsubscribe-auth/AQDLWnKohsY55TJ379QHOFRwnSE5-D1Vks5qesfSgaJpZM4Jh2Bc .

galuhkirana avatar Aug 25 '16 01:08 galuhkirana

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.

MohinKhanPathan avatar Jul 13 '22 06:07 MohinKhanPathan