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

Added Support for changing parallaxFactor programatically #127

Merged
merged 2 commits into from
Sep 5, 2016

Conversation

iampkhan
Copy link
Contributor

@iampkhan iampkhan commented Sep 4, 2016

While doing one of my projects I wanted to add some child views to the ParallaxLinearLayout dynamically from java source, but to add parallax effect to them programatically these changes are necessary.

@janheinrichmerker
Copy link
Owner

You should change pFactor to parallaxFactor

@iampkhan
Copy link
Contributor Author

iampkhan commented Sep 4, 2016

The class already contains a field with the same name

@janheinrichmerker
Copy link
Owner

Didn't you know the this keyword?
Just rename the method parameter and then assign the variable like this:

this.parallaxFactor = parallaxFactor;

@iampkhan
Copy link
Contributor Author

iampkhan commented Sep 5, 2016

I completely forgot about the this keyword, my mistake, updated the code

@janheinrichmerker janheinrichmerker merged commit 7d371cc into janheinrichmerker:master Sep 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants