Skip to content

Commit b94b156

Browse files
committed
style: layout_panel 위치 변경
1 parent f897553 commit b94b156

File tree

4 files changed

+80
-85
lines changed

4 files changed

+80
-85
lines changed

presentation/src/main/java/com/stop/ui/map/MapFragment.kt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ class MapFragment : Fragment() {
6363
}
6464

6565
private fun initView() {
66-
binding.imageViewCompassBackground.setOnClickListener {
66+
binding.layoutCompass.setOnClickListener {
6767
tMapView.isCompassMode = tMapView.isCompassMode.not()
6868
}
6969

70-
binding.imageViewCurrentBackground.setOnClickListener {
70+
binding.layoutCurrent.setOnClickListener {
7171
requestPermissionsLauncher.launch(PERMISSIONS)
7272
isTracking = true
7373
tMapView.setCenterPoint(
@@ -84,7 +84,7 @@ class MapFragment : Fragment() {
8484
.navigate(R.id.action_mapFragment_to_placeSearchFragment)
8585
}
8686

87-
binding.imageViewBookmarkBackground.setOnClickListener {
87+
binding.layoutBookmark.setOnClickListener {
8888
binding.root.findNavController().navigate(R.id.action_mapFragment_to_bookMarkFragment)
8989
}
9090

@@ -199,7 +199,9 @@ class MapFragment : Fragment() {
199199

200200
with (binding) {
201201
layoutSearch.visibility = viewVisibility
202-
layoutButton.visibility = viewVisibility
202+
layoutCompass.visibility = viewVisibility
203+
layoutCurrent.visibility = viewVisibility
204+
layoutBookmark.visibility = viewVisibility
203205
}
204206
}
205207

presentation/src/main/res/drawable/layout_location_panel.xml renamed to presentation/src/main/res/drawable/background_panel.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
xmlns:android="http://schemas.android.com/apk/res/android"
44
android:shape="rectangle">
55

6-
<solid android:color="#858590" />
7-
<corners android:radius="10dp" />
6+
<solid android:color="#404550" />
7+
<corners android:radius="15dp" />
88
</shape>
Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1-
<vector android:height="32dp" android:tint="#F85959"
2-
android:viewportHeight="24" android:viewportWidth="24"
3-
android:width="32dp" xmlns:android="http://schemas.android.com/apk/res/android">
4-
<path android:fillColor="@android:color/white" android:pathData="M12,2C8.13,2 5,5.13 5,9c0,5.25 7,13 7,13s7,-7.75 7,-13c0,-3.87 -3.13,-7 -7,-7zM12,11.5c-1.38,0 -2.5,-1.12 -2.5,-2.5s1.12,-2.5 2.5,-2.5 2.5,1.12 2.5,2.5 -1.12,2.5 -2.5,2.5z"/>
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="40dp"
3+
android:height="40dp"
4+
android:viewportWidth="24"
5+
android:viewportHeight="24">
6+
7+
<path
8+
android:fillColor="#FFA919"
9+
android:pathData="M12,2C8.13,2 5,5.13 5,9c0,5.25 7,13 7,13s7,-7.75 7,-13c0,-3.87 -3.13,-7 -7,-7zM12,11.5c-1.38,0 -2.5,-1.12 -2.5,-2.5s1.12,-2.5 2.5,-2.5 2.5,1.12 2.5,2.5 -1.12,2.5 -2.5,2.5z"
10+
android:strokeWidth="1.5"
11+
android:strokeColor="#FFFFFF" />
512
</vector>

presentation/src/main/res/layout/fragment_map.xml

Lines changed: 61 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -18,39 +18,39 @@
1818
android:layout_height="match_parent">
1919

2020
<androidx.constraintlayout.widget.Guideline
21-
android:id="@+id/guideline_top"
21+
android:id="@+id/guideline_start"
2222
android:layout_width="wrap_content"
2323
android:layout_height="wrap_content"
24-
android:orientation="horizontal"
25-
app:layout_constraintGuide_begin="55dp" />
24+
android:orientation="vertical"
25+
app:layout_constraintGuide_begin="15dp" />
2626

2727
<androidx.constraintlayout.widget.Guideline
28-
android:id="@+id/guideline_begin"
28+
android:id="@+id/guideline_end"
2929
android:layout_width="wrap_content"
3030
android:layout_height="wrap_content"
3131
android:orientation="vertical"
32-
app:layout_constraintGuide_begin="16dp" />
32+
app:layout_constraintGuide_end="15dp" />
3333

3434
<androidx.constraintlayout.widget.Guideline
35-
android:id="@+id/guideline_end"
35+
android:id="@+id/guideline_top"
3636
android:layout_width="wrap_content"
3737
android:layout_height="wrap_content"
38-
android:orientation="vertical"
39-
app:layout_constraintGuide_end="16dp" />
38+
android:orientation="horizontal"
39+
app:layout_constraintGuide_begin="55dp" />
4040

4141
<androidx.constraintlayout.widget.Guideline
4242
android:id="@+id/guideline_bottom"
4343
android:layout_width="wrap_content"
4444
android:layout_height="wrap_content"
4545
android:orientation="horizontal"
46-
app:layout_constraintGuide_end="16dp" />
46+
app:layout_constraintGuide_end="55dp" />
4747

4848
<androidx.constraintlayout.widget.Guideline
4949
android:id="@+id/guideline_panel"
5050
android:layout_width="wrap_content"
5151
android:layout_height="wrap_content"
5252
android:orientation="horizontal"
53-
app:layout_constraintGuide_percent="0.8" />
53+
app:layout_constraintGuide_percent="0.25" />
5454

5555
<FrameLayout
5656
android:id="@+id/frame_layout_container"
@@ -63,16 +63,18 @@
6363

6464
<androidx.constraintlayout.widget.ConstraintLayout
6565
android:id="@+id/layout_panel"
66-
android:layout_width="0dp"
66+
android:layout_width="270dp"
6767
android:layout_height="0dp"
68-
android:background="@drawable/layout_location_panel"
69-
android:paddingHorizontal="8dp"
70-
android:paddingVertical="4dp"
68+
android:layout_marginEnd="15dp"
69+
android:layout_marginTop="30dp"
70+
android:elevation="15dp"
71+
android:background="@drawable/background_panel"
72+
android:paddingHorizontal="10dp"
73+
android:paddingVertical="5dp"
7174
android:visibility="@{placeSearchViewModel.panelVisibility}"
72-
app:layout_constraintBottom_toBottomOf="@id/guideline_bottom"
73-
app:layout_constraintEnd_toEndOf="@id/guideline_end"
74-
app:layout_constraintStart_toStartOf="@id/guideline_begin"
75-
app:layout_constraintTop_toTopOf="@id/guideline_panel">
75+
app:layout_constraintEnd_toStartOf="@id/layout_compass"
76+
app:layout_constraintTop_toTopOf="@id/layout_compass"
77+
app:layout_constraintBottom_toBottomOf="@id/guideline_bottom">
7678

7779
<TextView
7880
android:id="@+id/text_view_title"
@@ -170,12 +172,12 @@
170172
<androidx.constraintlayout.widget.ConstraintLayout
171173
android:id="@+id/layout_search"
172174
android:layout_width="0dp"
173-
android:layout_height="50dp"
175+
android:layout_height="52dp"
174176
android:layout_marginStart="20dp"
175177
android:layout_marginEnd="20dp"
176178
android:elevation="15dp"
177179
android:background="@drawable/background_search"
178-
app:layout_constraintStart_toStartOf="@+id/guideline_begin"
180+
app:layout_constraintStart_toStartOf="@+id/guideline_start"
179181
app:layout_constraintEnd_toStartOf="@+id/guideline_end"
180182
app:layout_constraintTop_toTopOf="@id/guideline_top">
181183

@@ -202,85 +204,69 @@
202204
</androidx.constraintlayout.widget.ConstraintLayout>
203205

204206
<androidx.constraintlayout.widget.ConstraintLayout
205-
android:id="@+id/layout_button"
206-
android:layout_width="match_parent"
207-
android:layout_height="match_parent">
208-
209-
<ImageView
210-
android:id="@+id/image_view_compass_background"
211-
android:layout_width="60dp"
212-
android:layout_height="60dp"
213-
android:layout_marginEnd="15dp"
214-
android:layout_marginBottom="10dp"
215-
android:elevation="15dp"
216-
android:background="@drawable/background_button"
217-
app:layout_constraintEnd_toEndOf="parent"
218-
app:layout_constraintBottom_toTopOf="@id/image_view_current_background" />
207+
android:id="@+id/layout_compass"
208+
android:layout_width="60dp"
209+
android:layout_height="60dp"
210+
android:layout_marginBottom="10dp"
211+
android:elevation="15dp"
212+
android:background="@drawable/background_button"
213+
app:layout_constraintEnd_toEndOf="@id/guideline_end"
214+
app:layout_constraintBottom_toTopOf="@id/layout_current">
219215

220216
<ImageView
221217
android:id="@+id/image_view_compass"
222218
android:layout_width="30dp"
223219
android:layout_height="30dp"
224220
android:elevation="15dp"
225-
app:layout_constraintStart_toStartOf="@id/image_view_compass_background"
226-
app:layout_constraintEnd_toEndOf="@id/image_view_compass_background"
227-
app:layout_constraintTop_toTopOf="@id/image_view_compass_background"
228-
app:layout_constraintBottom_toBottomOf="@id/image_view_compass_background"
221+
app:layout_constraintStart_toStartOf="@id/layout_compass"
222+
app:layout_constraintEnd_toEndOf="@id/layout_compass"
223+
app:layout_constraintTop_toTopOf="@id/layout_compass"
224+
app:layout_constraintBottom_toBottomOf="@id/layout_compass"
229225
app:srcCompat="@drawable/ic_compass" />
226+
</androidx.constraintlayout.widget.ConstraintLayout>
230227

231-
<ImageView
232-
android:id="@+id/image_view_current_background"
233-
android:layout_width="60dp"
234-
android:layout_height="60dp"
235-
android:layout_marginEnd="15dp"
236-
android:layout_marginBottom="10dp"
237-
android:elevation="15dp"
238-
android:background="@drawable/background_button"
239-
app:layout_constraintEnd_toEndOf="parent"
240-
app:layout_constraintBottom_toTopOf="@id/image_view_bookmark_background" />
228+
<androidx.constraintlayout.widget.ConstraintLayout
229+
android:id="@+id/layout_current"
230+
android:layout_width="60dp"
231+
android:layout_height="60dp"
232+
android:layout_marginBottom="10dp"
233+
android:elevation="15dp"
234+
android:background="@drawable/background_button"
235+
app:layout_constraintEnd_toEndOf="@id/guideline_end"
236+
app:layout_constraintBottom_toTopOf="@id/layout_bookmark">
241237

242238
<ImageView
243239
android:id="@+id/image_view_current"
244240
android:layout_width="30dp"
245241
android:layout_height="30dp"
246242
android:elevation="15dp"
247-
app:layout_constraintStart_toStartOf="@id/image_view_current_background"
248-
app:layout_constraintEnd_toEndOf="@id/image_view_current_background"
249-
app:layout_constraintTop_toTopOf="@id/image_view_current_background"
250-
app:layout_constraintBottom_toBottomOf="@id/image_view_current_background"
243+
app:layout_constraintStart_toStartOf="@id/layout_current"
244+
app:layout_constraintEnd_toEndOf="@id/layout_current"
245+
app:layout_constraintTop_toTopOf="@id/layout_current"
246+
app:layout_constraintBottom_toBottomOf="@id/layout_current"
251247
app:srcCompat="@drawable/ic_location" />
248+
</androidx.constraintlayout.widget.ConstraintLayout>
252249

253-
<ImageView
254-
android:id="@+id/image_view_bookmark_background"
255-
android:layout_width="60dp"
256-
android:layout_height="60dp"
257-
android:layout_marginEnd="15dp"
258-
android:layout_marginBottom="160dp"
259-
android:elevation="15dp"
260-
android:background="@drawable/background_button"
261-
app:layout_constraintEnd_toEndOf="parent"
262-
app:layout_constraintBottom_toBottomOf="parent" />
250+
<androidx.constraintlayout.widget.ConstraintLayout
251+
android:id="@+id/layout_bookmark"
252+
android:layout_width="60dp"
253+
android:layout_height="60dp"
254+
android:elevation="15dp"
255+
android:background="@drawable/background_button"
256+
app:layout_constraintEnd_toEndOf="@id/guideline_end"
257+
app:layout_constraintBottom_toBottomOf="@id/guideline_bottom">
263258

264259
<ImageView
265260
android:id="@+id/image_view_bookmark"
266261
android:layout_width="30dp"
267262
android:layout_height="30dp"
268263
android:elevation="15dp"
269-
app:layout_constraintStart_toStartOf="@id/image_view_bookmark_background"
270-
app:layout_constraintEnd_toEndOf="@id/image_view_bookmark_background"
271-
app:layout_constraintTop_toTopOf="@id/image_view_bookmark_background"
272-
app:layout_constraintBottom_toBottomOf="@id/image_view_bookmark_background"
264+
app:layout_constraintStart_toStartOf="@id/layout_bookmark"
265+
app:layout_constraintEnd_toEndOf="@id/layout_bookmark"
266+
app:layout_constraintTop_toTopOf="@id/layout_bookmark"
267+
app:layout_constraintBottom_toBottomOf="@id/layout_bookmark"
273268
app:srcCompat="@drawable/ic_bookmark" />
274269
</androidx.constraintlayout.widget.ConstraintLayout>
275-
276-
<androidx.coordinatorlayout.widget.CoordinatorLayout
277-
android:layout_width="match_parent"
278-
android:layout_height="match_parent">
279-
280-
<include
281-
android:id="@+id/home_bottom_sheet"
282-
layout="@layout/home_bottom_sheet" />
283-
</androidx.coordinatorlayout.widget.CoordinatorLayout>
284270
</androidx.constraintlayout.widget.ConstraintLayout>
285271
</layout>
286272

0 commit comments

Comments
 (0)