スクロール時に凡例が隠れてしまうバグを修正

This commit is contained in:
harukin-expo-dev-env 2024-03-13 12:55:52 +00:00
parent f2aed4b945
commit e750b73f55

View File

@ -47,7 +47,23 @@ export const DynamicHeaderScrollView = (props) => {
backgroundColor: "#0099CC", backgroundColor: "#0099CC",
margin: 0, margin: 0,
top: 0, top: 0,
opacity: 1, opacity: 0,
},
};
const StickyStyle = {
on: {
position: "absolute",
width: "100%",
flex: 1,
top: Max_Header_Height,
zIndex: 1,
},
off: {
position: "absolute",
width: "100%",
flex: 1,
top: Min_Header_Height,
zIndex: 1,
}, },
}; };
@ -70,6 +86,9 @@ export const DynamicHeaderScrollView = (props) => {
> >
{longHeader} {longHeader}
</Animated.View> </Animated.View>
<Animated.View style={headerVisible ? StickyStyle.off : StickyStyle.on}>
{topStickyContent}
</Animated.View>
</View> </View>
<ScrollView <ScrollView
{...scrollViewProps} {...scrollViewProps}
@ -97,13 +116,11 @@ export const DynamicHeaderScrollView = (props) => {
{topStickyContent && ( {topStickyContent && (
<View <View
style={{ style={{
paddingTop: Min_Header_Height, paddingTop: Min_Header_Height + 40,
flexDirection: "column", flexDirection: "column",
}} }}
index={1} index={1}
> />
{topStickyContent}
</View>
)} )}
{children} {children}
</ScrollView> </ScrollView>