Skip to content

Commit 3cbd568

Browse files
committed
feat: RouteDetailFragment 클릭 이벤트 구현
1 parent e3d3eb1 commit 3cbd568

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

presentation/src/main/java/com/stop/ui/route/RouteViewModel.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ class RouteViewModel @Inject constructor(
148148
return if (isCurrent) {
149149
routeItemColor = when (route) {
150150
is TransportRoute -> Color.parseColor("#${route.routeColor}")
151-
is WalkRoute -> Color.parseColor(MAIN_YELLOW)
152-
else -> Color.parseColor(MAIN_LIGHT_GREY)
151+
is WalkRoute -> Color.parseColor(MAIN_WALK_GREY)
152+
else -> Color.parseColor(MAIN_YELLOW)
153153
}
154154
routeItemColor
155155
} else {
@@ -162,7 +162,7 @@ class RouteViewModel @Inject constructor(
162162
}
163163

164164
companion object {
165+
private const val MAIN_WALK_GREY = "#C0C5CA"
165166
private const val MAIN_YELLOW = "#FFC766"
166-
private const val MAIN_LIGHT_GREY = "#808590"
167167
}
168168
}

presentation/src/main/java/com/stop/ui/routedetail/RouteDetailFragment.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ class RouteDetailFragment : Fragment(), RouteDetailHandler {
6161
private fun initView() {
6262
binding.layoutDrawer.openDrawer(GravityCompat.START)
6363

64+
binding.imageViewArrowDrawer.setOnClickListener {
65+
binding.layoutDrawer.openDrawer(GravityCompat.START)
66+
}
67+
6468
binding.routeDetailDrawer.viewAlarm.setOnClickListener {
6569
binding.root.findNavController().navigate(R.id.action_routeDetailFragment_to_alarmSetting)
6670
}
@@ -73,6 +77,7 @@ class RouteDetailFragment : Fragment(), RouteDetailHandler {
7377
private fun setRecyclerView() {
7478
val adapter = RouteDetailAdapter(object : OnRouteItemClickListener {
7579
override fun clickRouteItem(coordinate: Coordinate) {
80+
binding.layoutDrawer.closeDrawer(GravityCompat.START)
7681
tMap.setRouteItemFocus(coordinate)
7782
}
7883
})

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
android:layout_marginEnd="5dp"
6767
android:layout_marginBottom="1dp"
6868
android:text="@{routeItem.lastTime != null ? @string/last_time : null}"
69-
android:textSize="13sp"
69+
android:textSize="12sp"
7070
android:textColor="@color/main_light_grey"
7171
android:gravity="center_vertical"
7272
app:layout_constraintEnd_toStartOf="@id/text_view_last_time_2"

presentation/src/main/res/values/colors.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
<color name="main_dark_grey">#404550</color>
1414
<color name="main_light_grey">#808590</color>
1515
<color name="main_lighter_grey">#EEEEEE</color>
16+
<color name="main_walk_grey">#C0C5CA</color>
1617
<color name="main_yellow">#FFC766</color>
1718
</resources>

0 commit comments

Comments
 (0)