スクロール範囲外にステータスを移動し、高さと文字サイズ等の調整
This commit is contained in:
parent
dfe3c831bc
commit
eb806e3f8a
@ -122,49 +122,72 @@ export const EachTrainInfo = ({
|
||||
/>
|
||||
)}
|
||||
</View>
|
||||
<ScrollView
|
||||
style={{ maxHeight: heightPercentageToDP("70%") }}
|
||||
nestedScrollEnabled
|
||||
onScroll={(e) => {
|
||||
if (!Platform.OS !== "android") return;
|
||||
setIsTop(e.nativeEvent.contentOffset.y < 0);
|
||||
}}
|
||||
<View
|
||||
style={{ flexDirection: "row", height: heightPercentageToDP("20%") }}
|
||||
>
|
||||
<View style={{ flexDirection: "row" }}>
|
||||
<View
|
||||
style={{
|
||||
flex: 1,
|
||||
backgroundColor: "black",
|
||||
backgroundColor: "white",
|
||||
borderRadius: 10,
|
||||
padding: 10,
|
||||
margin: 10,
|
||||
}}
|
||||
>
|
||||
<Text style={{ fontSize: 10, color: "white" }} t>
|
||||
<Text style={{ fontSize: 10, color: "#0099CC" }} t>
|
||||
現在地
|
||||
</Text>
|
||||
<View style={{ flex: 1 }} />
|
||||
{data.trainData?.Pos && data.trainData?.Pos.match("~") ? (
|
||||
<>
|
||||
<Text
|
||||
style={{ fontSize: 30, color: "white", textAlign: "right" }}
|
||||
style={{
|
||||
fontSize: 28,
|
||||
color: "#0099CC",
|
||||
textAlign: "right",
|
||||
}}
|
||||
>
|
||||
{data.trainData?.Pos.split("~")[0]}
|
||||
</Text>
|
||||
<Text style={{ color: "#0099CC", textAlign: "right" }}>~</Text>
|
||||
<Text
|
||||
style={{
|
||||
fontSize: 28,
|
||||
color: "#0099CC",
|
||||
textAlign: "right",
|
||||
}}
|
||||
>
|
||||
{data.trainData?.Pos.split("~")[1]}
|
||||
</Text>
|
||||
</>
|
||||
) : (
|
||||
<Text
|
||||
style={{ fontSize: 28, color: "#0099CC", textAlign: "right" }}
|
||||
>
|
||||
{data.trainData?.Pos}
|
||||
</Text>
|
||||
)}
|
||||
</View>
|
||||
<View style={{ flex: 1, flexDirection: "column" }}>
|
||||
<View
|
||||
style={{
|
||||
flex: 1,
|
||||
backgroundColor: "black",
|
||||
backgroundColor: "white",
|
||||
borderRadius: 10,
|
||||
padding: 10,
|
||||
margin: 10,
|
||||
}}
|
||||
>
|
||||
<Text style={{ fontSize: 10, color: "white" }}>
|
||||
<Text style={{ fontSize: 10, color: "#0099CC" }}>
|
||||
{isNaN(data.trainData?.delay) ? "状態" : "遅延時分"}
|
||||
</Text>
|
||||
<View style={{ flex: 1 }} />
|
||||
<Text
|
||||
style={{ fontSize: 30, color: "white", textAlign: "right" }}
|
||||
style={{
|
||||
fontSize: 32,
|
||||
color: "#0099CC",
|
||||
textAlign: "right",
|
||||
}}
|
||||
>
|
||||
{data.trainData?.delay}
|
||||
{isNaN(data.trainData?.delay) ? "" : "分"}
|
||||
@ -173,21 +196,33 @@ export const EachTrainInfo = ({
|
||||
<View
|
||||
style={{
|
||||
flex: 1,
|
||||
backgroundColor: "black",
|
||||
backgroundColor: "white",
|
||||
borderRadius: 10,
|
||||
padding: 10,
|
||||
margin: 10,
|
||||
}}
|
||||
>
|
||||
<Text style={{ fontSize: 10, color: "white" }}>列番</Text>
|
||||
<Text style={{ fontSize: 10, color: "#0099CC" }}>列番</Text>
|
||||
<Text
|
||||
style={{ fontSize: 30, color: "white", textAlign: "right" }}
|
||||
style={{
|
||||
fontSize: 32,
|
||||
color: "#0099CC",
|
||||
textAlign: "right",
|
||||
}}
|
||||
>
|
||||
{data.trainData?.num}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
<ScrollView
|
||||
style={{ maxHeight: heightPercentageToDP("55%") }}
|
||||
nestedScrollEnabled
|
||||
onScroll={(e) => {
|
||||
if (!Platform.OS !== "android") return;
|
||||
setIsTop(e.nativeEvent.contentOffset.y < 0);
|
||||
}}
|
||||
>
|
||||
<View
|
||||
style={{
|
||||
padding: 10,
|
||||
|
Loading…
Reference in New Issue
Block a user