diff --git a/components/Menu/Carousel/CarouselTypeChanger.tsx b/components/Menu/Carousel/CarouselTypeChanger.tsx
index 11f13af..84767a7 100644
--- a/components/Menu/Carousel/CarouselTypeChanger.tsx
+++ b/components/Menu/Carousel/CarouselTypeChanger.tsx
@@ -1,13 +1,23 @@
import { AS } from "@/storageControl";
import { useBottomTabBarHeight } from "@react-navigation/bottom-tabs";
import React, { useEffect, useRef } from "react";
-import { View, TouchableOpacity, Text, LayoutAnimation } from "react-native";
+import { useWindowDimensions } from "react-native";
+import {
+ View,
+ TouchableOpacity,
+ Text,
+ LayoutAnimation,
+ KeyboardAvoidingView,
+ Platform,
+} from "react-native";
import Ionicons from "react-native-vector-icons/Ionicons";
+import { SearchUnitBox } from "@/components/Menu/RailScope/SearchUnitBox";
export const CarouselTypeChanger = ({
locationStatus,
position,
mapsRef,
+ scrollRef,
stationListMode,
setStationListMode,
setSelectedCurrentStation,
@@ -15,7 +25,9 @@ export const CarouselTypeChanger = ({
setMapMode,
}) => {
const tabBarHeight = useBottomTabBarHeight();
- const returnToDefaultMode = ()=>{
+ const [isSearchMode, setisSearchMode] = React.useState(false);
+ const { height, width } = useWindowDimensions();
+ const returnToDefaultMode = () => {
LayoutAnimation.configureNext({
duration: 300,
create: {
@@ -28,13 +40,32 @@ export const CarouselTypeChanger = ({
},
});
setMapMode(false);
- }
+ };
return (
-
+
+
{
+ onPressIn={() => {
if (!position) return;
returnToDefaultMode();
setStationListMode("position");
@@ -99,7 +129,8 @@ export const CarouselTypeChanger = ({
-
+
);
};
diff --git a/components/Menu/RailScope/SearchUnitBox.tsx b/components/Menu/RailScope/SearchUnitBox.tsx
new file mode 100644
index 0000000..81512c0
--- /dev/null
+++ b/components/Menu/RailScope/SearchUnitBox.tsx
@@ -0,0 +1,76 @@
+import React from "react";
+import {
+ TouchableOpacity,
+ Text,
+ View,
+ LayoutAnimation,
+ TextInput,
+ KeyboardAvoidingView,
+ Platform,
+} from "react-native";
+import Ionicons from "react-native-vector-icons/Ionicons";
+import { useWindowDimensions } from "react-native";
+export const SearchUnitBox = ({ isSearchMode, setisSearchMode }) => {
+ const { height, width } = useWindowDimensions();
+ return (
+ <>
+ {
+ LayoutAnimation.configureNext({
+ duration: 200,
+ update: { type: "easeInEaseOut", springDamping: 0.6 },
+ });
+ setisSearchMode(true);
+ }}
+ >
+ {!isSearchMode && }
+ {isSearchMode && (
+
+ {
+ LayoutAnimation.configureNext({
+ duration: 200,
+ update: { type: "easeInEaseOut", springDamping: 0.6 },
+ });
+ setisSearchMode(false);
+ }}
+ >
+ あああああああああああああああああああああああああああああああああああああああああああああああああああああああああ
+
+
+ setKeyBoardVisible(true)}
+ onEndEditing={() => {}}
+ //onChange={(ret) => setInput(ret.nativeEvent.text)}
+ //value={input}
+ style={{ flex: 1 }}
+ />
+
+
+ )}
+
+ >
+ );
+};
diff --git a/menu.js b/menu.js
index 73df951..60c57bc 100644
--- a/menu.js
+++ b/menu.js
@@ -5,6 +5,8 @@ import {
ScrollView,
useWindowDimensions,
LayoutAnimation,
+ Text,
+ TouchableOpacity,
} from "react-native";
import Constants from "expo-constants";
import {
@@ -30,6 +32,8 @@ import { CarouselBox } from "./components/Menu/Carousel/CarouselBox";
import { CarouselTypeChanger } from "./components/Menu/Carousel/CarouselTypeChanger";
import { useUserPosition } from "./stateBox/useUserPosition";
import { AS } from "./storageControl";
+import { Ionicons } from "@expo/vector-icons";
+import { SearchUnitBox } from "./components/Menu/RailScope/SearchUnitBox";
configureReanimatedLogger({
level: ReanimatedLogLevel.error, // Set the log level to error
strict: true, // Reanimated runs in strict mode by default
@@ -209,13 +213,32 @@ export default function Menu(props) {
}}
>
-
+ {!mapMode ? (
+
+ ) : (
+
+ JRShikoku RailScope
+
+ )}
{
console.log(e.nativeEvent.velocity);
@@ -302,7 +325,7 @@ export default function Menu(props) {
{...{
locationStatus,
position,
- mapsRef,
+ mapsRef,scrollRef,
stationListMode,
setStationListMode,
setSelectedCurrentStation: setListIndex,
@@ -310,7 +333,7 @@ export default function Menu(props) {
setMapMode,
}}
/>
- )}
+ )}
{originalStationList.length != 0 && (
<>
@@ -322,7 +345,7 @@ export default function Menu(props) {
setListIndex,
listIndex,
navigate,
- stationListMode
+ stationListMode,
}}
/>
{listUpStation[listIndex] && (