Created
May 28, 2019 05:02
-
-
Save rutvikbhatt9/1462b45d2ada81a5c32b39ee2bd13627 to your computer and use it in GitHub Desktop.
Setting value of Intepolate to Animated.Image
This file contains hidden or 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
render() { | |
const profileImageLeft = this._getImageLeftPosition(); | |
const profileImageTop = this._getImageTopPosition(); | |
const profileImageWidth = this._getImageWidth(); | |
const profileImageHeight = this._getImageHeight(); | |
return( | |
<Animated.Image | |
style={ | |
[styles.profileImage, { | |
borderRadius: (ThemeUtils.APPBAR_HEIGHT - 20) / 2, | |
height: profileImageHeight, | |
width: profileImageWidth, | |
transform: [ | |
{translateY: profileImageTop}, | |
{translateX: profileImageLeft} | |
] | |
}]} | |
source={profileImage} | |
/> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment