moonyeju 2023-11-14
[FIX] ui 화면에 맞게 수정
@ba31130feade0fe296cf2158f9e88595f2ff8bad
android/app/src/main/assets/index.android.bundle
--- android/app/src/main/assets/index.android.bundle
+++ android/app/src/main/assets/index.android.bundle
This diff is too big to display.
 
android/app/src/main/res/drawable-mdpi/src_resoureces_files_images_login_logo_2.png (Binary) (added)
+++ android/app/src/main/res/drawable-mdpi/src_resoureces_files_images_login_logo_2.png
Binary file is not shown
 
android/app/src/main/res/drawable-mdpi/src_resoureces_files_images_splash_screen.png (Binary) (added)
+++ android/app/src/main/res/drawable-mdpi/src_resoureces_files_images_splash_screen.png
Binary file is not shown
src/component/Map.js
--- src/component/Map.js
+++ src/component/Map.js
@@ -15,7 +15,6 @@
   children,
 }) {
   const [actionLocation, setActionLocation] = useState();
-  const [searchAction, setSearchAction] = useState(655);
 
   const sendPostRequest = async () => {
     try {
@@ -44,33 +43,11 @@
     }
   };
 
-  useEffect(() => {
-    console.log('searchAction changed:', searchAction);
-  }, [searchAction]);
-
-  useEffect(() => {
-    const keyboardDidShowListener = Keyboard.addListener(
-      'keyboardDidShow',
-      () => {
-        setSearchAction(405);
-      },
-    );
-
-    const keyboardDidHideListener = Keyboard.addListener(
-      'keyboardDidHide',
-      () => {
-        setSearchAction(655);
-      },
-    );
-
-    return () => {
-      keyboardDidShowListener.remove();
-      keyboardDidHideListener.remove();
-    };
-  }, []);
-
   return (
     <View style={styles.mapStyle}>
+      <View style={styles.searchContainer}>
+        <Search placeholder={'도착지를 입력하세요'} />
+      </View>
       <MapView
         style={styles.mapStyle}
         provider={PROVIDER_GOOGLE}
@@ -94,15 +71,12 @@
           ))}
       </MapView>
       <View style={styles.buttonstyle}>
-        <View style={[styles.searchContainer, {bottom: searchAction}]}>
-          <Search placeholder={'도착지를 입력하세요'} />
-        </View>
         <View style={styles.markerButtonStyle}>
           <Button
             title={'마커 표시'}
             onPress={sendPostRequest}
             color={WHITE}
-            width={180}
+            width={'100%'}
             textAlign={'center'}
             padding={10}
             backgroundColor={PRIMERY}
@@ -115,22 +89,21 @@
 
 const styles = StyleSheet.create({
   markerButtonStyle: {
+    width: '45%',
     position: 'absolute',
     bottom: 7,
-    left: -5,
+    left: 0,
   },
   mapStyle: {
     flex: 1,
   },
   searchContainer: {
-    position: 'absolute',
-    // bottom: 655,
-    left: -15,
+    paddingTop: 10,
     flexDirection: 'row',
-    width: '94%',
-    justifyContent: 'space-between',
+    width: '100%',
+    justifyContent: 'center',
     alignItems: 'center',
-    paddingHorizontal: 7,
+    paddingHorizontal: 5,
   },
   buttonstyle: {
     marginHorizontal: 15,
src/screens/Main.js
--- src/screens/Main.js
+++ src/screens/Main.js
@@ -174,7 +174,7 @@
           // onPress={handleStartDriving}
           onPress={toggleModal}
           color={WHITE}
-          width={180}
+          width={'100%'}
           textAlign={'center'}
           padding={10}
           backgroundColor={isDrivingStarted ? RED : PRIMERY}
@@ -208,12 +208,13 @@
 
 const styles = StyleSheet.create({
   container: {
-    marginLeft: 16,
-    justifyContent: 'center',
-    alignItems: 'center',
+    width: '45%',
+    // marginLeft: 5,
+    // justifyContent: 'center',
+    // alignItems: 'center',
     position: 'absolute',
     bottom: 7,
-    right: 10,
+    right: 15,
   },
   infoContainer: {
     marginTop: 16,
src/screens/StartLoading.js
--- src/screens/StartLoading.js
+++ src/screens/StartLoading.js
@@ -5,17 +5,11 @@
 
 export default function StartLoading() {
   return (
-    // <ImageBackground
-    //   source={require('../resoureces/files/images/frsg_loading.png')}
-    //   style={styles.image}
-    // />
     <View style={styles.container}>
-      <View style={styles.splashLogo}>
-        <Image
-          source={require('../resoureces/files/images/splash_screen.png')}
-          style={styles.image1}
-        />
-      </View>
+      <Image
+        source={require('../resoureces/files/images/splash_screen.png')}
+        style={styles.image1}
+      />
     </View>
   );
 }
@@ -23,16 +17,9 @@
 const styles = StyleSheet.create({
   container: {
     flex: 1,
-    paddingHorizontal: 16,
-    paddingVertical: 50,
     justifyContent: 'center',
     backgroundColor: PRIMERY,
     color: BLACK,
-  },
-  splashLogo: {
-    flex: 3,
-    justifyContent: 'center',
-    alignItems: 'center',
   },
   splashCompanyLogo: {
     flex: 1,
@@ -40,11 +27,8 @@
     alignItems: 'center',
   },
   image1: {
-    width: '120%',
-    resizeMode: 'contain',
-  },
-  image2: {
-    width: '50%',
-    resizeMode: 'contain',
+    width: '100%',
+    height: '100%',
+    resizeMode: 'cover',
   },
 });
Add a comment
List