iosで表示されないバグを修正
This commit is contained in:
parent
e967dfac2f
commit
a713ae576d
@ -275,7 +275,7 @@ export const EachTrainInfoCore = ({
|
||||
scrollViewProps={scrollHandlers}
|
||||
containerProps={{
|
||||
style: {
|
||||
maxHeight: isLandscape ? height - 94 : heightPercentageToDP("70%"),
|
||||
maxHeight: isLandscape ? height - 94 : (height / 100) * 70,
|
||||
},
|
||||
}}
|
||||
Max_Header_Height={from == "AllTrainDiagramView" ? 0 : 200}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { ScrollView, View, Animated } from "react-native";
|
||||
import { ScrollView, View, Animated, Platform } from "react-native";
|
||||
import React, { useRef } from "react";
|
||||
|
||||
export const DynamicHeaderScrollView = (props) => {
|
||||
@ -18,28 +18,28 @@ export const DynamicHeaderScrollView = (props) => {
|
||||
const Scroll_Distance = Max_Header_Height - Min_Header_Height;
|
||||
|
||||
const animatedHeaderHeight = scrollOffsetY.interpolate({
|
||||
inputRange: [Scroll_Distance, Scroll_Distance + 10],
|
||||
inputRange: [Scroll_Distance, Scroll_Distance + 30],
|
||||
outputRange: [Max_Header_Height, 0],
|
||||
extrapolate: "clamp",
|
||||
});
|
||||
const animatedHeaderHeight2 = scrollOffsetY.interpolate({
|
||||
inputRange: [0, Scroll_Distance],
|
||||
inputRange: [Scroll_Distance, Scroll_Distance + 30],
|
||||
outputRange: [Max_Header_Height, Min_Header_Height],
|
||||
extrapolate: "clamp",
|
||||
});
|
||||
const animatedHeaderVisible = scrollOffsetY.interpolate({
|
||||
inputRange: [Min_Header_Height, Scroll_Distance],
|
||||
inputRange: [Scroll_Distance - 30, Scroll_Distance],
|
||||
outputRange: [1, 0],
|
||||
extrapolate: "clamp",
|
||||
});
|
||||
const animatedHeaderVisible2 = scrollOffsetY.interpolate({
|
||||
inputRange: [Min_Header_Height, Scroll_Distance],
|
||||
inputRange: [Scroll_Distance - 30, Scroll_Distance + 30],
|
||||
outputRange: [0, 1],
|
||||
extrapolate: "clamp",
|
||||
});
|
||||
return (
|
||||
<View {...containerProps}>
|
||||
<View style={{ position: "relative" }}>
|
||||
<View style={{ zIndex: 1 }}>
|
||||
<Animated.View
|
||||
style={[
|
||||
styles.header,
|
||||
@ -73,6 +73,7 @@ export const DynamicHeaderScrollView = (props) => {
|
||||
{...scrollViewProps}
|
||||
style={{
|
||||
backgroundColor: "white",
|
||||
zIndex: 0,
|
||||
}}
|
||||
stickyHeaderIndices={[1]}
|
||||
scrollEventThrottle={16}
|
||||
|
Loading…
Reference in New Issue
Block a user