Skip to content

Commit fa9ba69

Browse files
committed
[NDGL-101] feat: 여행 템플릿 검색 화면 및 기능 구현
1 parent abbbf27 commit fa9ba69

File tree

19 files changed

+774
-118
lines changed

19 files changed

+774
-118
lines changed
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="140dp"
3+
android:height="140dp"
4+
android:viewportWidth="140"
5+
android:viewportHeight="140">
6+
<group>
7+
<clip-path
8+
android:pathData="M16.52,25.11h102.48v80.55h-102.48z"/>
9+
<path
10+
android:pathData="M17.07,33.19C18.64,31.94 117.63,23.86 118.67,25.58C119.7,27.3 112.37,102.06 110.88,102.73C109.39,103.41 23.46,106.39 21.78,105.1C20.1,103.8 15.51,34.45 17.07,33.19Z"
11+
android:fillColor="#2B2B2B"/>
12+
<path
13+
android:pathData="M16.79,40.92C16.73,40.92 16.67,40.9 16.63,40.86C16.59,40.81 16.56,40.76 16.56,40.7C16.4,33.43 16.74,33.16 16.93,33.01C17.09,32.88 17.53,32.53 32.62,31.08C41.58,30.22 53.7,29.17 65.87,28.21C89.06,26.37 115.03,24.63 118.38,25.22C118.65,25.27 118.8,25.34 118.87,25.46C118.93,25.57 119,25.8 119,26.71C119,26.77 118.98,26.83 118.94,26.87C118.9,26.91 118.85,26.94 118.79,26.95C111.98,27.57 88.03,29.78 65.66,32.02C52.98,33.29 42.84,34.37 35.52,35.23C24.44,36.53 21.68,37.1 21.32,37.34C19.93,38.29 18.17,39.78 16.95,40.87C16.9,40.9 16.85,40.92 16.79,40.92ZM17.23,33.37C17.12,33.56 16.91,34.63 17.02,40.18C18.22,39.14 19.78,37.83 21.06,36.96C21.44,36.7 23.35,36.19 35.46,34.77C42.79,33.91 52.93,32.83 65.61,31.56C87.76,29.33 111.45,27.15 118.53,26.5C118.52,25.99 118.49,25.79 118.47,25.73C118.11,25.57 115.71,25.35 102.01,26.13C93.16,26.64 80.99,27.49 67.75,28.53C40.99,30.63 18.41,32.79 17.23,33.37Z"
14+
android:fillColor="#2B2B2B"/>
15+
<path
16+
android:pathData="M20.54,44.74C21.75,43.43 113.43,36.35 114.38,37.23C115.33,38.1 110.02,99.31 109.11,100.51C108.19,101.7 24.49,102.73 23.66,101.7C22.82,100.67 19.34,46.04 20.54,44.74Z"
17+
android:fillColor="#2B2B2B"/>
18+
<path
19+
android:pathData="M113.35,34.77C113.29,34.77 113.23,34.74 113.19,34.7L109.42,31.05C109.37,31 109.35,30.94 109.35,30.88C109.34,30.82 109.37,30.76 109.41,30.72C109.45,30.67 109.51,30.65 109.57,30.65C109.64,30.64 109.69,30.67 109.74,30.71L113.51,34.36C113.55,34.4 113.57,34.44 113.58,34.48C113.59,34.53 113.58,34.58 113.57,34.62C113.55,34.66 113.52,34.7 113.48,34.73C113.44,34.75 113.4,34.77 113.35,34.77Z"
20+
android:fillColor="#F6F6F6"/>
21+
<path
22+
android:pathData="M109.49,34.68C109.49,34.62 109.51,34.56 109.55,34.52L113.03,30.59C113.07,30.54 113.13,30.51 113.19,30.51C113.25,30.5 113.32,30.53 113.36,30.57C113.41,30.61 113.44,30.67 113.44,30.73C113.44,30.79 113.42,30.85 113.38,30.89L109.89,34.83C109.86,34.86 109.82,34.88 109.78,34.9C109.73,34.91 109.69,34.91 109.64,34.89C109.6,34.87 109.56,34.85 109.53,34.81C109.5,34.77 109.49,34.73 109.49,34.68Z"
23+
android:fillColor="#F6F6F6"/>
24+
</group>
25+
<group>
26+
<clip-path
27+
android:pathData="M33.44,60.11h65.24v15.87h-65.24z"/>
28+
<path
29+
android:pathData="M33.89,65.23C34.6,64.77 97.42,59.88 98.02,60.37C98.62,60.86 98.55,69.88 98.02,70.57C97.49,71.26 35.88,76.31 35.11,75.69C34.33,75.07 33.19,65.68 33.89,65.23Z"
30+
android:fillColor="#ffffff"/>
31+
<path
32+
android:pathData="M37.45,74.04C37.4,74.04 37.34,74.02 37.3,73.98C37.25,73.94 37.23,73.89 37.22,73.83L36.57,67.51C36.56,67.48 36.57,67.45 36.58,67.42C36.58,67.39 36.6,67.36 36.62,67.34C36.64,67.32 36.66,67.3 36.69,67.28C36.71,67.27 36.74,67.26 36.77,67.26C36.81,67.25 36.84,67.26 36.87,67.26C36.89,67.27 36.92,67.29 36.95,67.31C36.97,67.33 36.99,67.35 37,67.38C37.02,67.4 37.03,67.43 37.03,67.46L37.69,73.79C37.69,73.82 37.69,73.85 37.68,73.88C37.67,73.91 37.65,73.94 37.63,73.96C37.6,73.99 37.58,74.01 37.55,74.02C37.52,74.03 37.49,74.04 37.45,74.04Z"
33+
android:fillColor="#2B2B2B"/>
34+
</group>
35+
<group>
36+
<clip-path
37+
android:pathData="M56,46h58.8v71.87h-58.8z"/>
38+
<path
39+
android:pathData="M85.87,84.49C85.96,83.22 90.22,80.23 91.35,80.65C92.47,81.07 114.43,108.85 114.57,110.13C114.69,111.4 109.28,117.61 108.3,117.63C107.33,117.65 85.79,85.75 85.87,84.49H85.87Z"
40+
android:fillColor="#73D08B"/>
41+
<path
42+
android:pathData="M108.3,117.87C108.17,117.87 108.04,117.78 107.81,117.54C106.31,115.96 100.61,107.79 95.63,100.39C92.94,96.38 90.47,92.63 88.69,89.83C85.61,84.97 85.63,84.63 85.64,84.47C85.7,83.52 87.47,82.13 88.51,81.46C89.13,81.06 90.67,80.15 91.43,80.43C92.32,80.77 102.37,93.47 103.51,94.92C105.38,97.29 114.7,109.14 114.8,110.1C114.91,111.22 111.89,114.66 111.55,115.05C110.8,115.89 108.99,117.85 108.31,117.87H108.3L108.3,117.87ZM86.11,84.49C86.2,85.19 90.78,92.38 96.78,101.25C102.8,110.17 107.62,116.9 108.33,117.39C108.63,117.32 109.66,116.48 111.2,114.74C113.01,112.7 114.39,110.68 114.33,110.15C114.2,109.54 109.5,103.26 103.15,95.22C96.92,87.32 91.81,81.15 91.26,80.87C90.95,80.76 90.06,81.02 88.76,81.86C87.32,82.79 86.15,83.94 86.11,84.49L86.11,84.49Z"
43+
android:fillColor="#73D08B"/>
44+
<path
45+
android:pathData="M70.44,50.35C61.86,53.95 56.53,65.45 60.38,74.6C64.22,83.76 75.79,87.1 84.37,83.5C92.94,79.9 98.78,68.22 94.94,59.07C91.09,49.91 79.02,46.75 70.44,50.35Z"
46+
android:strokeAlpha="0.5"
47+
android:fillColor="#F6F6F6"
48+
android:fillAlpha="0.5"/>
49+
<path
50+
android:pathData="M77.11,85.15C74.89,85.15 72.65,84.79 70.52,84.05C65.68,82.39 62,79.06 60.16,74.69C58.33,70.34 58.47,65.1 60.53,60.3C62.55,55.61 66.13,51.9 70.35,50.13C74.65,48.33 79.82,48.17 84.53,49.7C89.55,51.34 93.32,54.63 95.15,58.98C96.97,63.3 96.74,68.58 94.52,73.46C92.37,78.19 88.7,81.93 84.46,83.71C82.17,84.67 79.66,85.15 77.11,85.15ZM77.87,49.15C75.3,49.15 72.77,49.62 70.53,50.56C61.79,54.23 56.96,65.87 60.59,74.51C64.53,83.89 76.23,86.66 84.28,83.28C92.37,79.89 98.69,68.61 94.72,59.16C91.93,52.52 84.76,49.15 77.87,49.15V49.15Z"
51+
android:strokeAlpha="0.5"
52+
android:fillColor="#F6F6F6"
53+
android:fillAlpha="0.5"/>
54+
<path
55+
android:pathData="M91.35,80.65C90.22,80.23 85.96,83.22 85.87,84.49C85.86,84.68 86.37,85.61 87.24,87.05C89.1,86.53 92.01,84.53 93.68,83.16C92.15,81.39 91.57,80.74 91.35,80.65Z"
56+
android:fillColor="#73D08B"/>
57+
<path
58+
android:pathData="M87.24,87.29C87.2,87.29 87.16,87.27 87.12,87.25C87.09,87.24 87.06,87.21 87.04,87.17C85.61,84.82 85.63,84.6 85.64,84.47C85.7,83.52 87.47,82.13 88.51,81.46C89.13,81.06 90.67,80.15 91.43,80.43C91.7,80.53 92.1,80.98 93.86,83.01C93.88,83.03 93.89,83.06 93.9,83.09C93.91,83.12 93.91,83.15 93.91,83.18C93.91,83.21 93.9,83.24 93.89,83.27C93.87,83.3 93.85,83.32 93.83,83.34C91.94,84.89 89.09,86.78 87.3,87.28C87.28,87.28 87.26,87.29 87.24,87.29L87.24,87.29ZM86.11,84.49C86.12,84.57 86.25,84.97 87.34,86.78C89.01,86.25 91.56,84.57 93.35,83.13C92.28,81.9 91.45,80.94 91.26,80.87C90.95,80.76 90.06,81.02 88.76,81.86C87.32,82.79 86.15,83.94 86.11,84.49H86.11Z"
59+
android:fillColor="#73D08B"/>
60+
<path
61+
android:pathData="M97.55,62.75L79.49,47.95L75.94,47.84L97.49,64.64L97.55,62.75Z"
62+
android:fillColor="#ffffff"/>
63+
<path
64+
android:pathData="M97.49,64.87C97.44,64.87 97.39,64.86 97.35,64.82L75.79,48.03C75.76,48 75.73,47.96 75.71,47.91C75.7,47.86 75.7,47.81 75.72,47.76C75.75,47.67 75.85,47.61 75.94,47.61L79.5,47.72C79.55,47.72 79.6,47.74 79.64,47.77L97.7,62.57C97.75,62.61 97.79,62.68 97.78,62.75L97.72,64.65C97.72,64.71 97.7,64.76 97.65,64.81C97.61,64.85 97.55,64.87 97.49,64.87ZM76.64,48.1L97.27,64.17L97.31,62.85L79.41,48.18L76.64,48.1H76.64ZM96.78,67.78L74.11,48.6L72.42,49.19L96.14,71.65L96.78,67.78Z"
65+
android:fillColor="#ffffff"/>
66+
<path
67+
android:pathData="M96.14,71.88C96.08,71.88 96.03,71.86 95.98,71.81L72.26,49.36C72.23,49.33 72.21,49.3 72.2,49.26C72.19,49.22 72.19,49.18 72.19,49.14C72.2,49.1 72.22,49.07 72.25,49.04C72.27,49.01 72.31,48.98 72.34,48.97L74.03,48.38C74.07,48.37 74.11,48.37 74.15,48.37C74.19,48.38 74.23,48.4 74.26,48.42L96.93,67.6C96.99,67.65 97.02,67.73 97.01,67.81L96.37,71.68C96.36,71.74 96.34,71.79 96.29,71.82C96.25,71.86 96.2,71.88 96.14,71.88L96.14,71.88ZM72.86,49.29L95.98,71.17L96.53,67.87L74.06,48.87L72.86,49.29Z"
68+
android:fillColor="#ffffff"/>
69+
<path
70+
android:pathData="M65.79,50.36C56.01,57.2 53.29,70.17 59.71,79.32C66.12,88.47 79.24,90.33 89.02,83.49C98.79,76.64 101.51,63.68 95.1,54.53C88.68,45.38 75.56,43.51 65.79,50.36ZM84.37,83.5C75.79,87.1 64.22,83.76 60.38,74.6C56.53,65.45 61.86,53.95 70.44,50.35C79.02,46.75 91.09,49.91 94.94,59.07C98.78,68.22 92.94,79.9 84.37,83.5V83.5Z"
71+
android:fillColor="#73D08B"/>
72+
<path
73+
android:pathData="M76.15,87.85C75.12,87.85 74.09,87.78 73.07,87.63C67.47,86.83 62.66,83.93 59.52,79.45C56.38,74.97 55.29,69.46 56.45,63.92C57.61,58.4 60.88,53.51 65.65,50.17C70.43,46.82 76.14,45.42 81.73,46.22C87.33,47.01 92.15,49.92 95.29,54.4C98.43,58.87 99.52,64.39 98.36,69.92C97.19,75.45 93.93,80.33 89.15,83.68C85.25,86.41 80.72,87.85 76.15,87.85ZM65.92,50.55C56.27,57.31 53.57,70.15 59.9,79.18C63.66,84.54 69.76,87.37 76.13,87.37C80.48,87.37 84.96,86.05 88.88,83.3C93.56,80.02 96.76,75.24 97.9,69.83C99.03,64.42 97.97,59.03 94.91,54.66C88.58,45.63 75.57,43.79 65.92,50.55ZM77.11,85.15C74.89,85.15 72.65,84.79 70.52,84.05C65.68,82.39 62,79.06 60.16,74.69C58.33,70.34 58.47,65.1 60.53,60.3C62.55,55.61 66.13,51.9 70.35,50.13C74.65,48.33 79.82,48.17 84.53,49.7C89.55,51.34 93.32,54.63 95.15,58.98C96.97,63.3 96.74,68.58 94.52,73.46C92.37,78.19 88.7,81.93 84.46,83.71C82.17,84.67 79.66,85.15 77.11,85.15ZM77.87,49.15C75.3,49.15 72.77,49.62 70.53,50.56C61.79,54.23 56.96,65.87 60.59,74.51C64.53,83.89 76.23,86.66 84.28,83.28C92.37,79.89 98.69,68.61 94.72,59.16C91.93,52.52 84.76,49.15 77.87,49.15L77.87,49.15Z"
74+
android:fillColor="#73D08B"/>
75+
</group>
76+
<group>
77+
<clip-path
78+
android:pathData="M20.72,17.83h32.39v21.84h-32.39z"/>
79+
<path
80+
android:pathData="M25.55,27.13C25.55,27.13 26.06,37.95 27.44,38.82C28.83,39.69 46.1,39.51 47.61,38.8C49.13,38.09 53.42,22.14 52.78,20.82C52.14,19.51 27.6,17.36 26.64,18.33C25.67,19.29 25.7,22.59 25.7,22.59C25.7,22.59 20.81,24.51 20.98,25.48C21.15,26.45 25.55,27.13 25.55,27.13Z"
81+
android:fillColor="#73D08B"/>
82+
</group>
83+
<group>
84+
<clip-path
85+
android:pathData="M34.35,22.59h9.05v14.37h-9.05z"/>
86+
<path
87+
android:pathData="M43.18,22.72C43.08,22.62 42.87,22.53 42.08,22.63C40.92,22.77 39.06,23.24 37.71,23.63C36.67,23.93 34.9,24.47 34.73,24.76C34.55,25.06 34.42,26.5 34.38,27.31C34.33,28.32 34.31,29.57 34.53,29.8C34.75,30.01 35.27,29.96 35.67,29.88C35.78,29.86 36.76,29.66 36.91,29.3C37,29.09 36.86,28.75 36.6,28.18C36.45,27.84 36.19,27.27 36.25,27.14C36.32,27.04 36.95,26.69 38.13,26.24C39.27,25.81 39.96,25.65 40.12,25.67C40.18,25.76 40.24,26.22 40.19,26.96C40.13,27.7 40.01,28.2 39.91,28.3C39.84,28.37 39.65,28.56 39.42,28.8C37.87,30.36 36.89,31.38 36.78,31.63C36.63,31.99 36.53,33.52 36.85,33.88C36.89,33.92 36.98,34.02 37.37,34.02C37.67,34.02 37.97,33.98 38.26,33.92C38.79,33.81 39.43,33.63 39.61,33.47C39.81,33.3 39.8,32.89 39.75,32.25C39.72,31.94 39.7,31.6 39.74,31.45C39.8,31.27 40.63,30.61 41.18,30.17C41.83,29.65 42.4,29.2 42.56,28.95C42.74,28.66 43.04,27.14 43.22,25.9C43.47,24.07 43.46,23 43.18,22.72ZM39.6,34.56C39.37,34.39 38.51,34.54 38.01,34.65C37.7,34.71 36.67,34.94 36.44,35.2C36.18,35.5 35.67,36.44 36.05,36.81C36.17,36.92 36.46,36.96 36.8,36.96C37.44,36.96 38.26,36.81 38.46,36.73C38.82,36.58 39.65,35.34 39.71,34.87C39.72,34.81 39.72,34.75 39.7,34.7C39.68,34.64 39.65,34.6 39.6,34.56Z"
88+
android:fillColor="#ffffff"/>
89+
</group>
90+
</vector>

core/ui/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<string name="add_time">시간 추가</string>
1414
<string name="add_memo">메모 추가</string>
1515
<string name="common_dot_separator">•</string>
16+
<string name="common_retry">다시 시도</string>
1617

1718
<!-- Transport Segment -->
1819
<string name="transport_segment_format">약 %1$s • %2$s</string>
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
package com.yapp.ndgl.feature.home.component
2+
3+
import androidx.compose.foundation.clickable
4+
import androidx.compose.foundation.layout.Arrangement
5+
import androidx.compose.foundation.layout.Column
6+
import androidx.compose.foundation.layout.Row
7+
import androidx.compose.foundation.layout.fillMaxWidth
8+
import androidx.compose.foundation.layout.height
9+
import androidx.compose.foundation.layout.padding
10+
import androidx.compose.foundation.layout.width
11+
import androidx.compose.foundation.shape.RoundedCornerShape
12+
import androidx.compose.material3.Text
13+
import androidx.compose.runtime.Composable
14+
import androidx.compose.ui.Alignment
15+
import androidx.compose.ui.Modifier
16+
import androidx.compose.ui.draw.clip
17+
import androidx.compose.ui.layout.ContentScale
18+
import androidx.compose.ui.res.stringResource
19+
import androidx.compose.ui.text.style.TextOverflow
20+
import androidx.compose.ui.unit.dp
21+
import coil3.compose.AsyncImage
22+
import com.yapp.ndgl.core.ui.theme.NDGLTheme
23+
import com.yapp.ndgl.core.util.FlagEmojiUtil.toFlagEmoji
24+
import com.yapp.ndgl.feature.home.R
25+
import com.yapp.ndgl.feature.home.model.TravelContent
26+
27+
@Composable
28+
internal fun TravelTemplate(
29+
travel: TravelContent,
30+
onTravelTemplateClick: (Long) -> Unit,
31+
modifier: Modifier = Modifier,
32+
) {
33+
Row(
34+
modifier = modifier
35+
.fillMaxWidth()
36+
.clip(RoundedCornerShape(4.dp))
37+
.clickable(onClick = { onTravelTemplateClick(travel.travelId) })
38+
.padding(4.dp),
39+
horizontalArrangement = Arrangement.spacedBy(12.dp),
40+
verticalAlignment = Alignment.Top,
41+
) {
42+
AsyncImage(
43+
model = travel.thumbnail,
44+
contentDescription = travel.title,
45+
modifier = Modifier
46+
.width(140.dp)
47+
.height(88.dp)
48+
.clip(RoundedCornerShape(4.dp)),
49+
contentScale = ContentScale.Crop,
50+
)
51+
52+
Column(
53+
verticalArrangement = Arrangement.spacedBy(10.dp),
54+
) {
55+
Row(
56+
horizontalArrangement = Arrangement.spacedBy(4.dp),
57+
verticalAlignment = Alignment.CenterVertically,
58+
) {
59+
Text(
60+
text = travel.country.toFlagEmoji(),
61+
style = NDGLTheme.typography.bodyLgMedium,
62+
)
63+
Text(
64+
text = travel.country,
65+
color = NDGLTheme.colors.black400,
66+
style = NDGLTheme.typography.bodyMdMedium,
67+
)
68+
}
69+
Column(verticalArrangement = Arrangement.spacedBy(4.dp)) {
70+
Text(
71+
text = travel.title,
72+
color = NDGLTheme.colors.black900,
73+
overflow = TextOverflow.Ellipsis,
74+
maxLines = 1,
75+
style = NDGLTheme.typography.bodyLgMedium,
76+
)
77+
Row(
78+
horizontalArrangement = Arrangement.spacedBy(4.dp),
79+
verticalAlignment = Alignment.CenterVertically,
80+
) {
81+
Text(
82+
text = travel.city,
83+
color = NDGLTheme.colors.black400,
84+
style = NDGLTheme.typography.bodyMdMedium,
85+
)
86+
Text(
87+
text = stringResource(R.string.home_common_dot_separator),
88+
color = NDGLTheme.colors.black400,
89+
style = NDGLTheme.typography.bodyMdMedium,
90+
)
91+
Text(
92+
text = stringResource(
93+
R.string.home_popular_travel_nights_days,
94+
travel.nights,
95+
travel.days,
96+
),
97+
color = NDGLTheme.colors.black400,
98+
style = NDGLTheme.typography.bodyMdRegular,
99+
)
100+
}
101+
}
102+
}
103+
}
104+
}

feature/home/src/main/java/com/yapp/ndgl/feature/home/main/HomeContract.kt

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import com.yapp.ndgl.core.base.UiSideEffect
77
import com.yapp.ndgl.core.base.UiState
88
import com.yapp.ndgl.data.travel.model.PlaceCategory
99
import com.yapp.ndgl.data.travel.model.ProgramType
10+
import com.yapp.ndgl.feature.home.model.TravelContent
1011
import java.time.LocalDate
1112

1213
@Stable
@@ -69,22 +70,15 @@ data class HomeState(
6970
val type: ProgramType,
7071
) : TravelProgramTab
7172
}
72-
73-
data class TravelContent(
74-
val travelId: Long,
75-
val title: String,
76-
val country: String,
77-
val city: String,
78-
val nights: Int,
79-
val days: Int,
80-
val programName: String,
81-
val programType: ProgramType,
82-
val thumbnail: String,
83-
)
8473
}
8574

8675
sealed interface HomeIntent : UiIntent {
76+
data object ClickSearchTravelTemplate : HomeIntent
8777
data class SelectPopularTravelTab(val index: Int) : HomeIntent
78+
data class ClickTravel(val travelId: Long) : HomeIntent
8879
}
8980

90-
sealed interface HomeSideEffect : UiSideEffect
81+
sealed interface HomeSideEffect : UiSideEffect {
82+
data object NavigateToSearchTravelTemplate : HomeSideEffect
83+
data class NavigateToFollowTravel(val travelId: Long, val days: Int) : HomeSideEffect
84+
}

0 commit comments

Comments
 (0)