ScrollViewからFlatListに変更
This commit is contained in:
parent
e4ce671e67
commit
23402aef79
@ -5,6 +5,7 @@ import {
|
|||||||
TouchableOpacity,
|
TouchableOpacity,
|
||||||
Linking,
|
Linking,
|
||||||
ScrollView,
|
ScrollView,
|
||||||
|
FlatList,
|
||||||
} from "react-native";
|
} from "react-native";
|
||||||
import MapView, { Marker } from "react-native-maps";
|
import MapView, { Marker } from "react-native-maps";
|
||||||
import { MaterialCommunityIcons } from "@expo/vector-icons";
|
import { MaterialCommunityIcons } from "@expo/vector-icons";
|
||||||
@ -58,12 +59,14 @@ export default function AllTrainDiagramView({ navigation: { navigate } }) {
|
|||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<View style={{ backgroundColor: "#0099CC", height: "100%" }}>
|
<View style={{ backgroundColor: "#0099CC", height: "100%" }}>
|
||||||
<ScrollView>
|
<FlatList
|
||||||
{keyList &&
|
data={keyList}
|
||||||
keyList.map((key) => (
|
renderItem={({ item }) => (
|
||||||
<Item openTrainInfo={openTrainInfo} key={key} id={key} />
|
<Item openTrainInfo={openTrainInfo} id={item} />
|
||||||
))}
|
)}
|
||||||
</ScrollView>
|
keyExtractor={(item) => item}
|
||||||
|
initialNumToRender={100}
|
||||||
|
/>
|
||||||
|
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
style={{
|
style={{
|
||||||
|
Loading…
Reference in New Issue
Block a user