moonyeju
2023-11-14
[FIX] ui 화면에 맞게 수정
@ba31130feade0fe296cf2158f9e88595f2ff8bad
--- 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 file is not shown |
+++ 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
... | ... | @@ -15,7 +15,6 @@ |
15 | 15 |
children, |
16 | 16 |
}) { |
17 | 17 |
const [actionLocation, setActionLocation] = useState(); |
18 |
- const [searchAction, setSearchAction] = useState(655); |
|
19 | 18 |
|
20 | 19 |
const sendPostRequest = async () => { |
21 | 20 |
try { |
... | ... | @@ -44,33 +43,11 @@ |
44 | 43 |
} |
45 | 44 |
}; |
46 | 45 |
|
47 |
- useEffect(() => { |
|
48 |
- console.log('searchAction changed:', searchAction); |
|
49 |
- }, [searchAction]); |
|
50 |
- |
|
51 |
- useEffect(() => { |
|
52 |
- const keyboardDidShowListener = Keyboard.addListener( |
|
53 |
- 'keyboardDidShow', |
|
54 |
- () => { |
|
55 |
- setSearchAction(405); |
|
56 |
- }, |
|
57 |
- ); |
|
58 |
- |
|
59 |
- const keyboardDidHideListener = Keyboard.addListener( |
|
60 |
- 'keyboardDidHide', |
|
61 |
- () => { |
|
62 |
- setSearchAction(655); |
|
63 |
- }, |
|
64 |
- ); |
|
65 |
- |
|
66 |
- return () => { |
|
67 |
- keyboardDidShowListener.remove(); |
|
68 |
- keyboardDidHideListener.remove(); |
|
69 |
- }; |
|
70 |
- }, []); |
|
71 |
- |
|
72 | 46 |
return ( |
73 | 47 |
<View style={styles.mapStyle}> |
48 |
+ <View style={styles.searchContainer}> |
|
49 |
+ <Search placeholder={'도착지를 입력하세요'} /> |
|
50 |
+ </View> |
|
74 | 51 |
<MapView |
75 | 52 |
style={styles.mapStyle} |
76 | 53 |
provider={PROVIDER_GOOGLE} |
... | ... | @@ -94,15 +71,12 @@ |
94 | 71 |
))} |
95 | 72 |
</MapView> |
96 | 73 |
<View style={styles.buttonstyle}> |
97 |
- <View style={[styles.searchContainer, {bottom: searchAction}]}> |
|
98 |
- <Search placeholder={'도착지를 입력하세요'} /> |
|
99 |
- </View> |
|
100 | 74 |
<View style={styles.markerButtonStyle}> |
101 | 75 |
<Button |
102 | 76 |
title={'마커 표시'} |
103 | 77 |
onPress={sendPostRequest} |
104 | 78 |
color={WHITE} |
105 |
- width={180} |
|
79 |
+ width={'100%'} |
|
106 | 80 |
textAlign={'center'} |
107 | 81 |
padding={10} |
108 | 82 |
backgroundColor={PRIMERY} |
... | ... | @@ -115,22 +89,21 @@ |
115 | 89 |
|
116 | 90 |
const styles = StyleSheet.create({ |
117 | 91 |
markerButtonStyle: { |
92 |
+ width: '45%', |
|
118 | 93 |
position: 'absolute', |
119 | 94 |
bottom: 7, |
120 |
- left: -5, |
|
95 |
+ left: 0, |
|
121 | 96 |
}, |
122 | 97 |
mapStyle: { |
123 | 98 |
flex: 1, |
124 | 99 |
}, |
125 | 100 |
searchContainer: { |
126 |
- position: 'absolute', |
|
127 |
- // bottom: 655, |
|
128 |
- left: -15, |
|
101 |
+ paddingTop: 10, |
|
129 | 102 |
flexDirection: 'row', |
130 |
- width: '94%', |
|
131 |
- justifyContent: 'space-between', |
|
103 |
+ width: '100%', |
|
104 |
+ justifyContent: 'center', |
|
132 | 105 |
alignItems: 'center', |
133 |
- paddingHorizontal: 7, |
|
106 |
+ paddingHorizontal: 5, |
|
134 | 107 |
}, |
135 | 108 |
buttonstyle: { |
136 | 109 |
marginHorizontal: 15, |
--- src/screens/Main.js
+++ src/screens/Main.js
... | ... | @@ -174,7 +174,7 @@ |
174 | 174 |
// onPress={handleStartDriving} |
175 | 175 |
onPress={toggleModal} |
176 | 176 |
color={WHITE} |
177 |
- width={180} |
|
177 |
+ width={'100%'} |
|
178 | 178 |
textAlign={'center'} |
179 | 179 |
padding={10} |
180 | 180 |
backgroundColor={isDrivingStarted ? RED : PRIMERY} |
... | ... | @@ -208,12 +208,13 @@ |
208 | 208 |
|
209 | 209 |
const styles = StyleSheet.create({ |
210 | 210 |
container: { |
211 |
- marginLeft: 16, |
|
212 |
- justifyContent: 'center', |
|
213 |
- alignItems: 'center', |
|
211 |
+ width: '45%', |
|
212 |
+ // marginLeft: 5, |
|
213 |
+ // justifyContent: 'center', |
|
214 |
+ // alignItems: 'center', |
|
214 | 215 |
position: 'absolute', |
215 | 216 |
bottom: 7, |
216 |
- right: 10, |
|
217 |
+ right: 15, |
|
217 | 218 |
}, |
218 | 219 |
infoContainer: { |
219 | 220 |
marginTop: 16, |
--- src/screens/StartLoading.js
+++ src/screens/StartLoading.js
... | ... | @@ -5,17 +5,11 @@ |
5 | 5 |
|
6 | 6 |
export default function StartLoading() { |
7 | 7 |
return ( |
8 |
- // <ImageBackground |
|
9 |
- // source={require('../resoureces/files/images/frsg_loading.png')} |
|
10 |
- // style={styles.image} |
|
11 |
- // /> |
|
12 | 8 |
<View style={styles.container}> |
13 |
- <View style={styles.splashLogo}> |
|
14 |
- <Image |
|
15 |
- source={require('../resoureces/files/images/splash_screen.png')} |
|
16 |
- style={styles.image1} |
|
17 |
- /> |
|
18 |
- </View> |
|
9 |
+ <Image |
|
10 |
+ source={require('../resoureces/files/images/splash_screen.png')} |
|
11 |
+ style={styles.image1} |
|
12 |
+ /> |
|
19 | 13 |
</View> |
20 | 14 |
); |
21 | 15 |
} |
... | ... | @@ -23,16 +17,9 @@ |
23 | 17 |
const styles = StyleSheet.create({ |
24 | 18 |
container: { |
25 | 19 |
flex: 1, |
26 |
- paddingHorizontal: 16, |
|
27 |
- paddingVertical: 50, |
|
28 | 20 |
justifyContent: 'center', |
29 | 21 |
backgroundColor: PRIMERY, |
30 | 22 |
color: BLACK, |
31 |
- }, |
|
32 |
- splashLogo: { |
|
33 |
- flex: 3, |
|
34 |
- justifyContent: 'center', |
|
35 |
- alignItems: 'center', |
|
36 | 23 |
}, |
37 | 24 |
splashCompanyLogo: { |
38 | 25 |
flex: 1, |
... | ... | @@ -40,11 +27,8 @@ |
40 | 27 |
alignItems: 'center', |
41 | 28 |
}, |
42 | 29 |
image1: { |
43 |
- width: '120%', |
|
44 |
- resizeMode: 'contain', |
|
45 |
- }, |
|
46 |
- image2: { |
|
47 |
- width: '50%', |
|
48 |
- resizeMode: 'contain', |
|
30 |
+ width: '100%', |
|
31 |
+ height: '100%', |
|
32 |
+ resizeMode: 'cover', |
|
49 | 33 |
}, |
50 | 34 |
}); |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?