-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Image open animation #5287
base: main
Are you sure you want to change the base?
Image open animation #5287
Conversation
return ( | ||
<Animated.View ref={containerRef} style={styles.container}> | ||
{isLoading && ( | ||
<ActivityIndicator size="small" color="#FFF" style={styles.loading} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't figure out how to make this guy work well, but it seems less important now anyway. Figured I'd just remove it. Maybe we can readd with a bit more thinking.
Or we can add some placeholder
.
@@ -143,14 +141,13 @@ const ImageItem = ({ | |||
maximumZoomScale={maxZoomScale} | |||
contentContainerStyle={styles.imageScrollContainer} | |||
onScroll={scrollHandler}> | |||
{(!loaded || !imageDimensions) && <ImageLoading />} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
<ImageViewing | ||
key={props.initialImageIndex} | ||
{...props} | ||
onLoad={() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be too conservative since it'll just get stuck if the network is slow. Maybe worth adding a safeguard timeout. Or it would require a bigger rework to integrate with the slider and dismiss gesture inside.
|
This is not perfect (in particular, there is no corresponding exit) but it kinda works.
Putting this out for initial testing. Needs testing on device!
The animation is disabled if you enable the Reduced Motion system setting.
iOS
ios.mov
Android
android.mov