Skip to content

Commit f0eac18

Browse files
committed
style: RouteFragment UI 수정 2/2
1 parent ce84aae commit f0eac18

File tree

6 files changed

+26
-32
lines changed

6 files changed

+26
-32
lines changed

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,7 @@ class RouteViewHolder(
119119
if (hour != 0) {
120120
binding.textViewRequiredHour.visibility = View.VISIBLE
121121
binding.textViewRequiredHourText.visibility = View.VISIBLE
122-
123122
binding.textViewRequiredHour.text = hour.toString()
124-
binding.textViewRequiredMinute.updateLayoutParams<ViewGroup.MarginLayoutParams> {
125-
setMargins(convertDpToPixel(5f), 0, 0, 0)
126-
}
127123
} else {
128124
binding.textViewRequiredHour.visibility = View.GONE
129125
binding.textViewRequiredHourText.visibility = View.GONE

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ class TimeLineContainer(
171171

172172
private fun setIdentityColor(binding: TimeLineItemBinding, route: TransportRoute) {
173173
val identityColor = Color.parseColor("#${route.routeColor}")
174+
174175
binding.textViewSectionTime.background.setTint(identityColor)
175176
binding.textViewSectionTime.setTextColor(Color.WHITE)
176177

@@ -179,10 +180,11 @@ class TimeLineContainer(
179180
}
180181

181182
private fun setDefaultColor(binding: TimeLineItemBinding) {
182-
binding.textViewSectionTime.setTextColor(Color.WHITE)
183183
binding.textViewSectionTime.background.setTint(greyColor)
184+
binding.textViewSectionTime.setTextColor(Color.WHITE)
184185

185-
binding.viewIcon.background.setTintList(null)
186+
binding.viewIcon.background.setTint(greyColor)
187+
binding.imageViewIcon.imageTintList = ColorStateList.valueOf(Color.WHITE)
186188
}
187189

188190
companion object {

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
android:layout_width="wrap_content"
1414
android:layout_height="wrap_content"
1515
android:layout_marginTop="5dp"
16-
android:textSize="25sp"
16+
android:textSize="27sp"
1717
android:textColor="@color/main_dark_grey"
1818
app:layout_constraintStart_toStartOf="parent"
1919
app:layout_constraintTop_toTopOf="parent"
@@ -27,7 +27,7 @@
2727
app:layout_goneMarginStart="0dp"
2828
android:layout_marginBottom="3dp"
2929
android:text="@string/required_hour"
30-
android:textSize="17sp"
30+
android:textSize="20sp"
3131
android:textColor="@color/main_dark_grey"
3232
app:layout_constraintBottom_toBottomOf="@id/text_view_required_hour"
3333
app:layout_constraintStart_toEndOf="@id/text_view_required_hour" />
@@ -37,7 +37,7 @@
3737
android:layout_width="wrap_content"
3838
android:layout_height="wrap_content"
3939
android:layout_marginTop="5dp"
40-
android:textSize="25sp"
40+
android:textSize="27sp"
4141
android:textColor="@color/main_dark_grey"
4242
app:layout_constraintStart_toEndOf="@id/text_view_required_hour_text"
4343
app:layout_constraintTop_toTopOf="parent"
@@ -50,7 +50,7 @@
5050
android:layout_marginStart="3dp"
5151
android:layout_marginBottom="3dp"
5252
android:text="@string/required_minute"
53-
android:textSize="17sp"
53+
android:textSize="20sp"
5454
android:textColor="@color/main_dark_grey"
5555
app:layout_constraintBottom_toBottomOf="@id/text_view_required_minute"
5656
app:layout_constraintStart_toEndOf="@id/text_view_required_minute" />
@@ -59,7 +59,7 @@
5959
android:id="@+id/time_line_container"
6060
android:layout_width="0dp"
6161
android:layout_height="wrap_content"
62-
android:layout_marginTop="3dp"
62+
android:layout_marginTop="5dp"
6363
app:layout_constraintEnd_toEndOf="parent"
6464
app:layout_constraintStart_toStartOf="parent"
6565
app:layout_constraintTop_toBottomOf="@id/text_view_required_minute" />

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

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,13 @@
3737
android:id="@+id/text_view_type_name"
3838
android:layout_width="wrap_content"
3939
android:layout_height="wrap_content"
40-
android:layout_marginStart="15dp"
41-
android:layout_marginBottom="2dp"
40+
android:layout_marginStart="30dp"
4241
android:gravity="center_vertical"
4342
android:minEms="4"
4443
android:text="@{routeItem.typeName}"
45-
android:textColor="@color/main_dark_grey"
46-
android:textSize="15sp"
47-
app:layout_constraintBottom_toBottomOf="parent"
44+
android:textColor="@color/main_light_grey"
45+
android:textSize="13sp"
46+
app:layout_constraintBottom_toTopOf="@id/view_line"
4847
app:layout_constraintStart_toEndOf="@id/image_view_current_line"
4948
app:layout_constraintTop_toTopOf="parent"
5049
tools:text="에버라인" />
@@ -54,15 +53,14 @@
5453
android:layout_width="wrap_content"
5554
android:layout_height="wrap_content"
5655
android:layout_marginStart="15dp"
57-
android:layout_marginBottom="2dp"
5856
android:ellipsize="end"
5957
android:gravity="center_vertical"
6058
android:lines="1"
6159
android:maxEms="12"
6260
android:text="@{routeItem.name}"
6361
android:textColor="@color/main_dark_grey"
6462
android:textSize="15sp"
65-
app:layout_constraintBottom_toBottomOf="parent"
63+
app:layout_constraintBottom_toTopOf="@id/view_line"
6664
app:layout_constraintStart_toEndOf="@id/text_view_type_name"
6765
app:layout_constraintTop_toTopOf="parent"
6866
tools:text="미금역.청솔마을.2001.아울렛123123" />
@@ -128,11 +126,11 @@
128126
android:id="@+id/view_line"
129127
android:layout_width="0dp"
130128
android:layout_height="1dp"
131-
android:layout_marginStart="15dp"
132-
android:layout_marginEnd="15dp"
129+
android:layout_marginStart="-15dp"
133130
android:background="@color/main_lighter_grey"
131+
android:visibility="@{routeItem.typeName == `하차` ? View.GONE : View.VISIBLE}"
134132
app:layout_constraintEnd_toEndOf="parent"
135-
app:layout_constraintStart_toEndOf="@id/view_before_line"
136-
app:layout_constraintTop_toTopOf="parent" />
133+
app:layout_constraintStart_toStartOf="@id/text_view_type_name"
134+
app:layout_constraintBottom_toBottomOf="parent" />
137135
</androidx.constraintlayout.widget.ConstraintLayout>
138136
</layout>

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

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,39 +13,37 @@
1313
android:layout_height="wrap_content"
1414
android:background="@drawable/time_stick_border"
1515
android:gravity="center"
16-
android:textSize="12sp"
16+
android:textSize="11sp"
1717
app:layout_constraintBottom_toBottomOf="@id/dummy_view"
1818
app:layout_constraintEnd_toEndOf="parent"
1919
app:layout_constraintStart_toStartOf="@id/dummy_view"
2020
app:layout_constraintTop_toTopOf="@id/dummy_view"
2121
tools:text="15분" />
2222

23-
<Button
23+
<View
2424
android:id="@+id/dummy_view"
2525
android:layout_width="0dp"
2626
android:layout_height="0dp"
2727
android:visibility="gone"
2828
app:layout_constraintBottom_toBottomOf="@id/image_view_icon"
2929
app:layout_constraintEnd_toEndOf="@id/image_view_icon"
3030
app:layout_constraintStart_toStartOf="@id/image_view_icon"
31-
app:layout_constraintTop_toTopOf="@id/image_view_icon"
32-
tools:layout_editor_absoluteY="234dp" />
31+
app:layout_constraintTop_toTopOf="@id/image_view_icon" />
3332

3433
<View
3534
android:id="@+id/view_icon"
36-
android:layout_width="18dp"
37-
android:layout_height="18dp"
35+
android:layout_width="20dp"
36+
android:layout_height="20dp"
3837
android:background="@drawable/time_stick_round_background"
3938
app:layout_constraintBottom_toBottomOf="parent"
4039
app:layout_constraintStart_toStartOf="parent"
4140
app:layout_constraintTop_toTopOf="parent" />
4241

4342
<ImageView
4443
android:id="@+id/image_view_icon"
45-
android:layout_width="wrap_content"
46-
android:layout_height="wrap_content"
44+
android:layout_width="13dp"
45+
android:layout_height="13dp"
4746
android:contentDescription="@string/image_view_icon_content_description"
48-
android:padding="8dp"
4947
android:scaleType="centerCrop"
5048
app:layout_constraintBottom_toBottomOf="@id/view_icon"
5149
app:layout_constraintEnd_toEndOf="@id/view_icon"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<string name="move_to_route">경로 검색 화면으로 이동</string>
55
<string name="expected_depart_time">예상 출발 시간: </string>
66
<string name="expected_arrival_time">예상 도착 시간: </string>
7-
<string name="required_hour">시간&#160;</string>
7+
<string name="required_hour">시간&#160;&#160;</string>
88
<string name="required_minute">분</string>
99
<string name="not_yet_implemented">미구현</string>
1010
<string name="bookmark">즐겨찾기 추가</string>

0 commit comments

Comments
 (0)