Skip to content

Commit e4125f4

Browse files
committed
feat: route_first_item, route_last_item UI 구현
1 parent 1622c34 commit e4125f4

File tree

4 files changed

+37
-104
lines changed

4 files changed

+37
-104
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77

88
<path
99
android:fillColor="@android:color/white"
10-
android:pathData="M22,9.24l-7.19,-0.62L12,2 9.19,8.63 2,9.24l5.46,4.73L5.82,21 12,17.27 18.18,21l-1.63,-7.03L22,9.24zM12,15.4l-3.76,2.27 1,-4.28 -3.32,-2.88 4.38,-0.38L12,6.1l1.71,4.04 4.38,0.38 -3.32,2.88 1,4.28L12,15.4z"/>
10+
android:pathData="M12,17.27L18.18,21l-1.64,-7.03L22,9.24l-7.19,-0.61L12,2 9.19,8.63 2,9.24l5.46,4.73L5.82,21z"/>
1111
</vector>

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

Lines changed: 16 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,14 @@
55
xmlns:tools="http://schemas.android.com/tools">
66

77
<data>
8-
<import type="com.stop.ui.util.DrawerStringUtils" />
9-
108
<variable
119
name="routeItem"
1210
type="com.stop.model.route.RouteItem" />
1311
</data>
1412

1513
<androidx.constraintlayout.widget.ConstraintLayout
1614
android:layout_width="match_parent"
17-
android:layout_height="100dp"
15+
android:layout_height="60dp"
1816
android:background="@color/white">
1917

2018
<androidx.constraintlayout.widget.Guideline
@@ -32,58 +30,32 @@
3230
app:layout_constraintGuide_end="30dp" />
3331

3432
<TextView
35-
android:id="@+id/text_view_name"
33+
android:id="@+id/text_view_start"
3634
android:layout_width="wrap_content"
3735
android:layout_height="wrap_content"
3836
android:layout_marginStart="15dp"
39-
android:text="@{routeItem.name}"
40-
android:textColor="@color/main_dark_grey"
41-
android:textSize="15sp"
37+
android:text="@string/start"
38+
android:textColor="@color/main_light_grey"
39+
android:textSize="12sp"
4240
android:gravity="center_vertical"
4341
app:layout_constraintStart_toEndOf="@id/image_view_current_line"
4442
app:layout_constraintTop_toTopOf="@id/image_view_current_line"
4543
app:layout_constraintBottom_toBottomOf="@id/image_view_current_line"
46-
tools:text="이엔씨드림타워3차" />
47-
48-
<TextView
49-
android:id="@+id/text_view_information"
50-
android:layout_width="wrap_content"
51-
android:layout_height="wrap_content"
52-
android:layout_marginTop="5dp"
53-
android:text="@{DrawerStringUtils.getRouteItemInformationString(routeItem)}"
54-
android:textSize="13sp"
55-
android:textColor="@color/main_light_grey"
56-
android:gravity="center_vertical"
57-
app:layout_constraintStart_toStartOf="@id/text_view_name"
58-
app:layout_constraintTop_toBottomOf="@id/text_view_name"
59-
tools:text="512m 16분"/>
60-
61-
<TextView
62-
android:id="@+id/text_view_last_time_1"
63-
android:layout_width="wrap_content"
64-
android:layout_height="wrap_content"
65-
android:layout_marginEnd="5dp"
66-
android:text="@{routeItem.lastTime != null ? @string/last_time : null}"
67-
android:textSize="12sp"
68-
android:textColor="@color/main_light_grey"
69-
android:gravity="center_vertical"
70-
app:layout_constraintEnd_toStartOf="@id/text_view_last_time_2"
71-
app:layout_constraintTop_toTopOf="@id/text_view_last_time_2"
72-
app:layout_constraintBottom_toBottomOf="@id/text_view_last_time_2"
73-
tools:text="현재 막차"/>
44+
tools:text="출발지" />
7445

7546
<TextView
76-
android:id="@+id/text_view_last_time_2"
47+
android:id="@+id/text_view_name"
7748
android:layout_width="wrap_content"
7849
android:layout_height="wrap_content"
79-
android:layout_marginBottom="15dp"
80-
android:text="@{routeItem.lastTime}"
81-
android:textSize="15sp"
50+
android:layout_marginStart="10dp"
51+
android:text="@{routeItem.name}"
8252
android:textColor="@color/main_dark_grey"
53+
android:textSize="15sp"
8354
android:gravity="center_vertical"
84-
app:layout_constraintEnd_toEndOf="@id/guideline_end"
85-
app:layout_constraintBottom_toBottomOf="parent"
86-
tools:text="23:17:50"/>
55+
app:layout_constraintStart_toEndOf="@id/text_view_start"
56+
app:layout_constraintTop_toTopOf="@id/image_view_current_line"
57+
app:layout_constraintBottom_toBottomOf="@id/image_view_current_line"
58+
tools:text="이엔씨벤쳐드림타워3차" />
8759

8860
<View
8961
android:id="@+id/view_current_line"
@@ -111,22 +83,10 @@
11183
<ImageView
11284
android:layout_width="15dp"
11385
android:layout_height="15dp"
86+
android:background="@drawable/ic_star_white"
11487
app:layout_constraintStart_toStartOf="@+id/image_view_current_line"
11588
app:layout_constraintEnd_toEndOf="@+id/image_view_current_line"
11689
app:layout_constraintTop_toTopOf="@+id/image_view_current_line"
117-
app:layout_constraintBottom_toBottomOf="@+id/image_view_current_line"
118-
app:imageResource="@{routeItem.mode}"
119-
tools:src="@drawable/ic_walk_white" />
120-
121-
<View
122-
android:id="@+id/view_line"
123-
android:layout_width="0dp"
124-
android:layout_height="1dp"
125-
android:layout_marginStart="15dp"
126-
android:layout_marginEnd="15dp"
127-
android:background="@color/main_lighter_grey"
128-
app:layout_constraintStart_toEndOf="@id/view_before_line"
129-
app:layout_constraintEnd_toEndOf="parent"
130-
app:layout_constraintTop_toTopOf="parent" />
90+
app:layout_constraintBottom_toBottomOf="@+id/image_view_current_line" />
13191
</androidx.constraintlayout.widget.ConstraintLayout>
13292
</layout>

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

Lines changed: 18 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,14 @@
55
xmlns:tools="http://schemas.android.com/tools">
66

77
<data>
8-
<import type="com.stop.ui.util.DrawerStringUtils" />
9-
108
<variable
119
name="routeItem"
1210
type="com.stop.model.route.RouteItem" />
1311
</data>
1412

1513
<androidx.constraintlayout.widget.ConstraintLayout
1614
android:layout_width="match_parent"
17-
android:layout_height="100dp"
15+
android:layout_height="60dp"
1816
android:background="@color/white">
1917

2018
<androidx.constraintlayout.widget.Guideline
@@ -32,58 +30,32 @@
3230
app:layout_constraintGuide_end="30dp" />
3331

3432
<TextView
35-
android:id="@+id/text_view_name"
33+
android:id="@+id/text_view_start"
3634
android:layout_width="wrap_content"
3735
android:layout_height="wrap_content"
3836
android:layout_marginStart="15dp"
39-
android:text="@{routeItem.name}"
40-
android:textColor="@color/main_dark_grey"
41-
android:textSize="15sp"
37+
android:text="@string/end"
38+
android:textColor="@color/main_light_grey"
39+
android:textSize="12sp"
4240
android:gravity="center_vertical"
4341
app:layout_constraintStart_toEndOf="@id/image_view_current_line"
4442
app:layout_constraintTop_toTopOf="@id/image_view_current_line"
4543
app:layout_constraintBottom_toBottomOf="@id/image_view_current_line"
46-
tools:text="이엔씨드림타워3차" />
47-
48-
<TextView
49-
android:id="@+id/text_view_information"
50-
android:layout_width="wrap_content"
51-
android:layout_height="wrap_content"
52-
android:layout_marginTop="5dp"
53-
android:text="@{DrawerStringUtils.getRouteItemInformationString(routeItem)}"
54-
android:textSize="13sp"
55-
android:textColor="@color/main_light_grey"
56-
android:gravity="center_vertical"
57-
app:layout_constraintStart_toStartOf="@id/text_view_name"
58-
app:layout_constraintTop_toBottomOf="@id/text_view_name"
59-
tools:text="512m 16분"/>
44+
tools:text="도착지" />
6045

6146
<TextView
62-
android:id="@+id/text_view_last_time_1"
63-
android:layout_width="wrap_content"
64-
android:layout_height="wrap_content"
65-
android:layout_marginEnd="5dp"
66-
android:text="@{routeItem.lastTime != null ? @string/last_time : null}"
67-
android:textSize="12sp"
68-
android:textColor="@color/main_light_grey"
69-
android:gravity="center_vertical"
70-
app:layout_constraintEnd_toStartOf="@id/text_view_last_time_2"
71-
app:layout_constraintTop_toTopOf="@id/text_view_last_time_2"
72-
app:layout_constraintBottom_toBottomOf="@id/text_view_last_time_2"
73-
tools:text="현재 막차"/>
74-
75-
<TextView
76-
android:id="@+id/text_view_last_time_2"
47+
android:id="@+id/text_view_name"
7748
android:layout_width="wrap_content"
7849
android:layout_height="wrap_content"
79-
android:layout_marginBottom="15dp"
80-
android:text="@{routeItem.lastTime}"
81-
android:textSize="15sp"
50+
android:layout_marginStart="10dp"
51+
android:text="@{routeItem.name}"
8252
android:textColor="@color/main_dark_grey"
53+
android:textSize="15sp"
8354
android:gravity="center_vertical"
84-
app:layout_constraintEnd_toEndOf="@id/guideline_end"
85-
app:layout_constraintBottom_toBottomOf="parent"
86-
tools:text="23:17:50"/>
55+
app:layout_constraintStart_toEndOf="@id/text_view_start"
56+
app:layout_constraintTop_toTopOf="@id/image_view_current_line"
57+
app:layout_constraintBottom_toBottomOf="@id/image_view_current_line"
58+
tools:text="Naver1784" />
8759

8860
<View
8961
android:id="@+id/view_before_line"
@@ -102,21 +74,20 @@
10274
android:layout_height="wrap_content"
10375
android:layout_marginStart="18dp"
10476
android:layout_marginTop="15dp"
105-
android:tint="@{routeItem.currentColor}"
77+
android:tint="@{routeItem.beforeColor}"
10678
app:layout_constraintStart_toStartOf="parent"
10779
app:layout_constraintTop_toTopOf="parent"
10880
app:srcCompat="@drawable/ic_circle"
109-
tools:tint="@color/main_light_grey" />
81+
tools:tint="@color/main_yellow" />
11082

11183
<ImageView
11284
android:layout_width="15dp"
11385
android:layout_height="15dp"
86+
android:background="@drawable/ic_star_white"
11487
app:layout_constraintStart_toStartOf="@+id/image_view_current_line"
11588
app:layout_constraintEnd_toEndOf="@+id/image_view_current_line"
11689
app:layout_constraintTop_toTopOf="@+id/image_view_current_line"
117-
app:layout_constraintBottom_toBottomOf="@+id/image_view_current_line"
118-
app:imageResource="@{routeItem.mode}"
119-
tools:src="@drawable/ic_walk_white" />
90+
app:layout_constraintBottom_toBottomOf="@+id/image_view_current_line" />
12091

12192
<View
12293
android:id="@+id/view_line"

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,6 @@
4040
<string name="no_alarm">현재 등록된 막차 알림이 없습니다.</string>
4141
<string name="alarm_setting">알람 설정</string>
4242
<string name="last_time">현재 막차</string>
43+
<string name="start">출발지</string>
44+
<string name="end">도착지</string>
4345
</resources>

0 commit comments

Comments
 (0)