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

setColor doesn't seem to work for me. #23

Open
Chaseos opened this issue Oct 22, 2017 · 2 comments
Open

setColor doesn't seem to work for me. #23

Chaseos opened this issue Oct 22, 2017 · 2 comments

Comments

@Chaseos
Copy link

Chaseos commented Oct 22, 2017

I'm trying to change the color of the pulses.

When I set the color in XML it works fine, but when I try to set it in Java, it doesn't change anything. If I don't set it in XML it stays default. I've also tried stopping and starting it in-between color changes.
However, if I try to setBackgroundColor, that changes instantly.

Any help is appreciated.

@FisnikIbishi
Copy link

Get the source code and change setColor to:

public void setColor(int color) {
if (color != mColor) {
this.mColor = color;

        if (mPaint != null) {
            mPaint.setColor(color);
            reset();
        }
    }
}

@achojoao
Copy link

achojoao commented May 15, 2019

Workaround:

pulsator.setInterpolator(PulsatorLayout.INTERP_ACCELERATE);
pulsator.setInterpolator(PulsatorLayout.INTERP_LINEAR);

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

3 participants