Skip to content

Commit 182b6b5

Browse files
committed
💄 runningPost 레이아웃 아이템 추가
1 parent f913aff commit 182b6b5

File tree

1 file changed

+193
-0
lines changed

1 file changed

+193
-0
lines changed
Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<layout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
4+
xmlns:tools="http://schemas.android.com/tools">
5+
6+
<data>
7+
8+
<variable
9+
name="runningPost"
10+
type="com.whyranoid.domain.model.RunningPost" />
11+
</data>
12+
13+
<androidx.constraintlayout.widget.ConstraintLayout
14+
android:layout_width="match_parent"
15+
android:layout_height="wrap_content">
16+
17+
<ImageView
18+
android:id="@+id/iv_leader_profile"
19+
loadImage="@{runningPost.author.profileUrl}"
20+
android:layout_width="50dp"
21+
android:layout_height="50dp"
22+
android:layout_margin="16dp"
23+
app:layout_constraintStart_toStartOf="parent"
24+
app:layout_constraintTop_toTopOf="parent" />
25+
26+
<TextView
27+
android:id="@+id/tv_leader_name"
28+
android:layout_width="wrap_content"
29+
android:layout_height="wrap_content"
30+
android:layout_margin="16dp"
31+
android:text="@{runningPost.author.name}"
32+
app:layout_constraintBottom_toBottomOf="@id/iv_leader_profile"
33+
app:layout_constraintStart_toEndOf="@id/iv_leader_profile"
34+
app:layout_constraintTop_toTopOf="parent"
35+
tools:text="수피치" />
36+
37+
<TextView
38+
android:id="@+id/tv_running_history_date"
39+
android:layout_width="wrap_content"
40+
android:layout_height="wrap_content"
41+
android:layout_marginStart="16dp"
42+
android:layout_marginTop="16dp"
43+
android:text="@{runningPost.runningHistory.historyId}"
44+
app:layout_constraintStart_toStartOf="parent"
45+
app:layout_constraintTop_toBottomOf="@id/iv_leader_profile"
46+
tools:text="2022/09/11" />
47+
48+
<TextView
49+
android:id="@+id/tv_label_total_running_time"
50+
android:layout_width="wrap_content"
51+
android:layout_height="wrap_content"
52+
android:layout_marginEnd="20dp"
53+
android:text="@string/running_history_label_total_running_time"
54+
app:layout_constraintBottom_toBottomOf="@id/tv_running_history_date"
55+
app:layout_constraintEnd_toStartOf="@id/tv_total_running_time"
56+
app:layout_constraintTop_toTopOf="@id/tv_running_history_date" />
57+
58+
<TextView
59+
android:id="@+id/tv_total_running_time"
60+
android:layout_width="wrap_content"
61+
android:layout_height="wrap_content"
62+
android:text="@{Integer.toString(runningPost.runningHistory.totalRunningTime)}"
63+
app:layout_constraintBottom_toBottomOf="@id/tv_label_total_running_time"
64+
app:layout_constraintEnd_toEndOf="parent"
65+
app:layout_constraintTop_toTopOf="@id/tv_label_total_running_time"
66+
tools:text="2시간 22분" />
67+
68+
<View
69+
android:id="@+id/view_vertical_partition_line"
70+
android:layout_width="1dp"
71+
android:layout_height="100dp"
72+
android:layout_marginTop="20dp"
73+
android:layout_marginBottom="20dp"
74+
android:background="@color/black"
75+
app:layout_constraintEnd_toEndOf="parent"
76+
app:layout_constraintStart_toStartOf="parent"
77+
app:layout_constraintTop_toBottomOf="@id/tv_label_total_running_time" />
78+
79+
<View
80+
android:id="@+id/view_horizontal_partition_line"
81+
android:layout_width="0dp"
82+
android:layout_height="1dp"
83+
android:layout_marginTop="20dp"
84+
android:layout_marginBottom="20dp"
85+
android:background="@color/black"
86+
app:layout_constraintBottom_toBottomOf="@id/view_vertical_partition_line"
87+
app:layout_constraintEnd_toEndOf="parent"
88+
app:layout_constraintStart_toStartOf="parent"
89+
app:layout_constraintTop_toTopOf="@id/view_vertical_partition_line" />
90+
91+
<TextView
92+
android:layout_width="wrap_content"
93+
android:layout_height="wrap_content"
94+
android:layout_marginStart="16dp"
95+
android:layout_marginTop="16dp"
96+
android:text="@string/running_history_label_start_running_time"
97+
app:layout_constraintStart_toStartOf="parent"
98+
app:layout_constraintTop_toBottomOf="@id/tv_running_history_date" />
99+
100+
<TextView
101+
android:layout_width="wrap_content"
102+
android:layout_height="wrap_content"
103+
android:layout_marginEnd="50dp"
104+
android:layout_marginBottom="20dp"
105+
app:LongToTime="@{runningPost.runningHistory.startedAt}"
106+
app:layout_constraintBottom_toBottomOf="@id/view_horizontal_partition_line"
107+
app:layout_constraintEnd_toStartOf="@id/view_vertical_partition_line"
108+
tools:text="17:00" />
109+
110+
<TextView
111+
android:layout_width="wrap_content"
112+
android:layout_height="wrap_content"
113+
android:layout_marginStart="12dp"
114+
android:layout_marginTop="16dp"
115+
android:text="@string/running_history_label_finish_running_time"
116+
app:layout_constraintStart_toStartOf="@id/view_vertical_partition_line"
117+
app:layout_constraintTop_toBottomOf="@id/tv_running_history_date" />
118+
119+
<TextView
120+
android:layout_width="wrap_content"
121+
android:layout_height="wrap_content"
122+
android:layout_marginEnd="50dp"
123+
android:layout_marginBottom="20dp"
124+
app:LongToTime="@{runningPost.runningHistory.finishedAt}"
125+
app:layout_constraintBottom_toBottomOf="@id/view_horizontal_partition_line"
126+
app:layout_constraintEnd_toEndOf="parent"
127+
tools:text="19:22" />
128+
129+
<TextView
130+
android:layout_width="wrap_content"
131+
android:layout_height="wrap_content"
132+
android:layout_marginStart="16dp"
133+
android:layout_marginTop="12dp"
134+
android:text="@string/running_history_label_running_distance"
135+
app:layout_constraintStart_toStartOf="parent"
136+
app:layout_constraintTop_toBottomOf="@id/view_horizontal_partition_line" />
137+
138+
<TextView
139+
android:layout_width="wrap_content"
140+
android:layout_height="wrap_content"
141+
android:layout_marginTop="24dp"
142+
android:layout_marginEnd="50dp"
143+
android:text="@{Double.toString(runningPost.runningHistory.totalDistance)}"
144+
app:layout_constraintEnd_toStartOf="@id/view_vertical_partition_line"
145+
app:layout_constraintTop_toBottomOf="@id/view_horizontal_partition_line"
146+
tools:text="11.7km" />
147+
148+
<TextView
149+
android:layout_width="wrap_content"
150+
android:layout_height="wrap_content"
151+
android:layout_marginStart="12dp"
152+
android:layout_marginTop="12dp"
153+
android:text="@string/running_history_label_running_pace"
154+
app:layout_constraintStart_toStartOf="@id/view_vertical_partition_line"
155+
app:layout_constraintTop_toBottomOf="@id/view_horizontal_partition_line" />
156+
157+
<TextView
158+
android:layout_width="wrap_content"
159+
android:layout_height="wrap_content"
160+
android:layout_marginTop="24dp"
161+
android:layout_marginEnd="50dp"
162+
android:text="@{Double.toString(runningPost.runningHistory.pace)}"
163+
app:layout_constraintEnd_toEndOf="parent"
164+
app:layout_constraintTop_toBottomOf="@id/view_horizontal_partition_line"
165+
tools:text="6.3km/h" />
166+
167+
<TextView
168+
android:id="@+id/tv_like_cnt"
169+
android:layout_width="0dp"
170+
android:layout_height="wrap_content"
171+
android:layout_marginHorizontal="16dp"
172+
android:layout_marginTop="8dp"
173+
android:text="@{@string/text_like_count(runningPost.likeCount)}"
174+
app:layout_constraintEnd_toEndOf="parent"
175+
app:layout_constraintStart_toStartOf="parent"
176+
app:layout_constraintTop_toBottomOf="@id/view_vertical_partition_line"
177+
tools:text="좋아요 0개" />
178+
179+
<TextView
180+
android:id="@+id/tv_content"
181+
android:layout_width="0dp"
182+
android:layout_height="wrap_content"
183+
android:layout_marginHorizontal="16dp"
184+
android:layout_marginTop="8dp"
185+
android:text="@{runningPost.content}"
186+
app:layout_constraintEnd_toEndOf="parent"
187+
app:layout_constraintStart_toStartOf="parent"
188+
app:layout_constraintTop_toBottomOf="@id/tv_like_cnt"
189+
tools:text="컨\n투더\n텐\n투더\n츠" />
190+
191+
192+
</androidx.constraintlayout.widget.ConstraintLayout>
193+
</layout>

0 commit comments

Comments
 (0)