Skip to content

Commit 2742561

Browse files
committed
style: MapFragment UI 변경
1 parent 81b5be5 commit 2742561

12 files changed

+191
-117
lines changed

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

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ class MapFragment : Fragment(), MapHandler {
149149
val displaySize = requireContext().getScreenSize()
150150
val displayHeight = displaySize.height
151151

152-
binding.layoutHomeBottomSheet.maxHeight = (displayHeight * 0.8).toInt()
152+
binding.layoutHomeBottomSheet.maxHeight = (630 * resources.displayMetrics.density).toInt()
153+
binding.homeBottomSheet.layoutStateExpanded.root.visibility = View.INVISIBLE
153154

154155
val behavior = BottomSheetBehavior.from(binding.layoutHomeBottomSheet)
155156

@@ -162,13 +163,11 @@ class MapFragment : Fragment(), MapHandler {
162163
when (newState) {
163164
BottomSheetBehavior.STATE_EXPANDED -> {
164165
binding.homeBottomSheet.layoutStateExpanded.root.visibility = View.VISIBLE
165-
binding.homeBottomSheet.textViewAlarmState.visibility = View.GONE
166-
binding.homeBottomSheet.homeBottomSheetDragHandle.visibility = View.GONE
166+
binding.homeBottomSheet.textViewAlarmState.visibility = View.INVISIBLE
167167
}
168168
BottomSheetBehavior.STATE_COLLAPSED -> {
169-
binding.homeBottomSheet.layoutStateExpanded.root.visibility = View.GONE
169+
binding.homeBottomSheet.layoutStateExpanded.root.visibility = View.INVISIBLE
170170
binding.homeBottomSheet.textViewAlarmState.visibility = View.VISIBLE
171-
binding.homeBottomSheet.homeBottomSheetDragHandle.visibility = View.VISIBLE
172171
}
173172
BottomSheetBehavior.STATE_HALF_EXPANDED -> Unit
174173
BottomSheetBehavior.STATE_DRAGGING -> Unit
@@ -182,7 +181,7 @@ class MapFragment : Fragment(), MapHandler {
182181
}
183182

184183
private fun initBottomSheetView() {
185-
binding.homeBottomSheet.layoutStateExpanded.buttonAlarmTurnOff.setOnClickListener {
184+
binding.homeBottomSheet.layoutStateExpanded.viewAlarm.setOnClickListener {
186185
val behavior = BottomSheetBehavior.from(binding.layoutHomeBottomSheet)
187186

188187
behavior.state = BottomSheetBehavior.STATE_COLLAPSED
@@ -258,7 +257,7 @@ class MapFragment : Fragment(), MapHandler {
258257
}
259258

260259
private fun listenButtonClick() {
261-
binding.homeBottomSheet.layoutStateExpanded.buttonAlarmTurnOff.setOnClickListener {
260+
binding.homeBottomSheet.layoutStateExpanded.viewAlarm.setOnClickListener {
262261
alarmViewModel.deleteAlarm()
263262
turnOffSoundService()
264263
val behavior = BottomSheetBehavior.from(binding.layoutHomeBottomSheet)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
4+
<solid android:color="#FFFFFF" />
5+
6+
<stroke
7+
android:width="2dp"
8+
android:color="@color/main_dark_grey" />
9+
10+
<corners
11+
android:topLeftRadius="15dp"
12+
android:topRightRadius="15dp"
13+
android:bottomLeftRadius="15dp"
14+
android:bottomRightRadius="15dp" />
15+
</shape>

presentation/src/main/res/drawable/background_route_detail_button.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
android:color="@color/main_dark_grey" />
99

1010
<corners
11-
android:topLeftRadius="20dp"
12-
android:topRightRadius="20dp"
13-
android:bottomLeftRadius="20dp"
14-
android:bottomRightRadius="20dp" />
11+
android:topLeftRadius="100dp"
12+
android:topRightRadius="100dp"
13+
android:bottomLeftRadius="100dp"
14+
android:bottomRightRadius="100dp" />
1515
</shape>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="24"
5+
android:viewportHeight="24"
6+
android:tint="@color/main_dark_grey">
7+
8+
<path
9+
android:fillColor="@android:color/white"
10+
android:pathData="M12,6c3.87,0 7,3.13 7,7 0,0.84 -0.16,1.65 -0.43,2.4l1.52,1.52c0.58,-1.19 0.91,-2.51 0.91,-3.92 0,-4.97 -4.03,-9 -9,-9 -1.41,0 -2.73,0.33 -3.92,0.91L9.6,6.43C10.35,6.16 11.16,6 12,6zM22,5.72l-4.6,-3.86 -1.29,1.53 4.6,3.86L22,5.72zM2.92,2.29L1.65,3.57 2.98,4.9l-1.11,0.93 1.42,1.42 1.11,-0.94 0.8,0.8C3.83,8.69 3,10.75 3,13c0,4.97 4.02,9 9,9 2.25,0 4.31,-0.83 5.89,-2.2l2.2,2.2 1.27,-1.27L3.89,3.27l-0.97,-0.98zM16.47,18.39C15.26,19.39 13.7,20 12,20c-3.87,0 -7,-3.13 -7,-7 0,-1.7 0.61,-3.26 1.61,-4.47l9.86,9.86zM8.02,3.28L6.6,1.86l-0.86,0.71 1.42,1.42 0.86,-0.71z"/>
11+
</vector>

presentation/src/main/res/drawable/selected_mission_button.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
<shape xmlns:android="http://schemas.android.com/apk/res/android"
33
android:shape="oval">
44

5-
<solid android:color="@color/main_yellow" />
5+
<solid android:color="@color/main_light_grey" />
66

77
</shape>

presentation/src/main/res/drawable/unselected_mission_button.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
<shape xmlns:android="http://schemas.android.com/apk/res/android"
33
android:shape="oval">
44

5-
<solid android:color="#FFEAC5" />
5+
<solid android:color="@color/main_dark_grey" />
66

77
</shape>

0 commit comments

Comments
 (0)