Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change font in recyclerview #3

Open
tuanth89 opened this issue Aug 11, 2016 · 3 comments
Open

Change font in recyclerview #3

tuanth89 opened this issue Aug 11, 2016 · 3 comments

Comments

@tuanth89
Copy link

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

@GcsSloop
Copy link
Owner

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.

@galuhkirana
Copy link

Thank
use library for root device

Pada tanggal 11 Agt 2016 1.57 PM, "tuanth89" notifications@github.com
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
#3, or mute the thread
https://github.com/notifications/unsubscribe-auth/AQDLWnKohsY55TJ379QHOFRwnSE5-D1Vks5qesfSgaJpZM4Jh2Bc
.

@MohinKhanPathan
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants