Created
August 19, 2020 20:19
-
-
Save yuriyskulskiy/42dbe859990058fbd3f040c2cfe9ad63 to your computer and use it in GitHub Desktop.
AnimatedLayout part 5: update LinearLayout with parallaxValue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void applyParallax(float translateValue) { | |
mBackgroundImg.setTranslationY(translateValue - this.getHeight() / 8f); | |
mTitleTV.setTranslationY(+translateValue * 2); | |
mProfileCircleIV.setTranslationY(translateValue * 2); | |
mWeatherIcon.setTranslationY(translateValue * 2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment