また最適化

This commit is contained in:
harukin-OneMix4 2024-01-09 18:31:24 +09:00
parent 87129c6815
commit 65080e68f2
3 changed files with 33 additions and 5 deletions

View File

@ -266,10 +266,14 @@ export const EachTrainInfo = (props) => {
ref={actionSheetRef}
drawUnderStatusBar={false}
isModal={Platform.OS == "ios"}
containerStyle={{
paddingBottom: insets.bottom,
}}
useBottomSafeAreaPadding={true}
containerStyle={
Platform.OS == "android"
? {
paddingBottom: insets.bottom,
}
: {}
}
useBottomSafeAreaPadding={Platform.OS == "android"}
>
<View
style={{

View File

@ -11,18 +11,28 @@ import {
import { Ionicons, MaterialCommunityIcons } from "@expo/vector-icons";
import ActionSheet, { useScrollHandlers } from "react-native-actions-sheet";
import LottieView from "lottie-react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { useTrainDelayData } from "../../stateBox/useTrainDelayData";
export const JRSTraInfo = () => {
const { getTime, delayData, loadingDelayData, setLoadingDelayData } =
useTrainDelayData();
const actionSheetRef = useRef(null);
const scrollHandlers = useScrollHandlers("scrollview-1", actionSheetRef);
const insets = useSafeAreaInsets();
return (
<ActionSheet
gestureEnabled
CustomHeaderComponent={<></>}
ref={actionSheetRef}
isModal={Platform.OS == "ios"}
containerStyle={
Platform.OS == "android"
? {
paddingBottom: insets.bottom,
}
: {}
}
useBottomSafeAreaPadding={Platform.OS == "android"}
>
<View
style={{

View File

@ -2,6 +2,7 @@ import React, { useState, useEffect } from "react";
import { View, Linking, Text, TouchableOpacity, Platform } from "react-native";
import AutoHeightImage from "react-native-auto-height-image";
import { FontAwesome, Foundation, Ionicons } from "@expo/vector-icons";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import ActionSheet from "react-native-actions-sheet";
import Sign from "../../components/駅名表/Sign";
@ -44,8 +45,21 @@ export const StationDeteilView = (props) => {
(currentStation[0].StationTimeTable.match(".pdf")
? getPDFViewURL(currentStation[0].StationTimeTable)
: currentStation[0].StationTimeTable);
const insets = useSafeAreaInsets();
return (
<ActionSheet gestureEnabled CustomHeaderComponent={<></>} isModal={false}>
<ActionSheet
gestureEnabled
CustomHeaderComponent={<></>}
isModal={Platform.OS == "ios"}
containerStyle={
Platform.OS == "android"
? {
paddingBottom: insets.bottom,
}
: {}
}
useBottomSafeAreaPadding={Platform.OS == "android"}
>
<View
key={currentStation}
style={{