Transition of an element inside a scrollView creat FOC
See original GitHub issueI’m having FOC of the animated elements when inside a scrollable view (note that the banana flashes too for a moment, no idea why). If you have a boilerplate I can happily reproduce it there as my code might be overly complicated, but conceptually:
// Manifest of possible screens
const PrimaryNav = FluidNavigator({
LaunchScreen: { screen: LaunchScreen },
Level: { screen: Level }
}, {
transitionConfig: {
duration: 3500,
timing: Animated.timing,
easing: Easing.easing
},
navigationOptions: { gesturesEnabled: true },
})
Tile on the main screen
<ScrollView
ref={ref=>{this.scrollview = ref}}
style={{ flex: 1 }}
contentContainerStyle={{ width: STEP * BOARD, height: STEP * BOARD }}
maximumZoomScale={1}
minimumZoomScale={1}
directionalLockEnabled={false}
onScrollBeginDrag={() => {
this.background.animate()
}}
>
//...map
<Tile
key={id}
transitionShared={`tile-${id}`}
inline
color={bg}
isSolved={isSolved}
x={x}
y={y}
step={STEP}
onPress={() => {
this.props.navigation.navigate('Level', {id})
}}
/>
</ScrollView>
Expanded tile
<Transition shared={`tile-${id}`} >
<View
style={{
width: Dimensions.get('window').width,
height: Dimensions.get('window').height,
backgroundColor: bg,
position: 'absolute',
top: -10,
left: 0,
zIndex: -1
}}
/>
</Transition>
The banana in an issue with Image, it’s fixed by moving to FastImage
Gif of the happy path(user didn’t scroll) and unhappy path(user did scroll)
Issue Analytics
- State:
- Created 5 years ago
- Comments:6
Top Results From Across the Web
ScrollView - Android Developers
To add multiple views within the scroll view, make the direct child you add a ... android:animateLayoutChanges, Defines whether changes in layout (caused...
Read more >SingleChildScrollView class - widgets - Flutter - Dart API docs
A box in which a single widget can be scrolled. This widget is useful when you have a single box that will normally...
Read more >Building scrolling experiences in Flutter | Workshop - YouTube
Learn how to build rich scrolling experiences in Flutter. We explore slivers and how they're different from other widgets in the framework.
Read more >UIScrollView within a UIScrollView, how to keep a smooth ...
Place a scrollview that fills the bounds of the root view (i.e. also fills the screen) above all the other scrollview and image...
Read more >ScrollView - React Native
Component that wraps platform ScrollView while providing integration with touch locking "responder" system.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@obiwankenoobi I don’t think there’s something similar, I just made nice entering animations for now and maybe one day I’ll go back to this. On IOs everything worked really nicely but on Android it was impossible
@obsidianart sorry to hear! 😦 Have you moved to something similar which you can recommend?