-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
53 changed files
with
1,813 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
app/src/main/java/org/sopt/cgv/core/common/extension/Modifier.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.sopt.cgv.core.common.extension | ||
|
||
import androidx.compose.foundation.clickable | ||
import androidx.compose.foundation.interaction.MutableInteractionSource | ||
import androidx.compose.runtime.remember | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.composed | ||
|
||
inline fun Modifier.noRippleClickable( | ||
crossinline onClick: () -> Unit = {}, | ||
): Modifier = composed { | ||
this.clickable( | ||
indication = null, | ||
interactionSource = remember { MutableInteractionSource() } | ||
) { | ||
onClick() | ||
} | ||
} |
109 changes: 109 additions & 0 deletions
109
app/src/main/java/org/sopt/cgv/feature/home/component/CgvFooter.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
package org.sopt.cgv.feature.home.component | ||
|
||
import androidx.compose.foundation.background | ||
import androidx.compose.foundation.layout.Arrangement | ||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.Row | ||
import androidx.compose.foundation.layout.Spacer | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.material3.Icon | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.graphics.vector.ImageVector | ||
import androidx.compose.ui.res.vectorResource | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import androidx.compose.ui.unit.dp | ||
import org.sopt.cgv.R | ||
import org.sopt.cgv.core.designsystem.theme.Black | ||
import org.sopt.cgv.core.designsystem.theme.CGVTheme | ||
import org.sopt.cgv.core.designsystem.theme.Gray100 | ||
import org.sopt.cgv.core.designsystem.theme.Gray800 | ||
|
||
@Composable | ||
fun CgvFooter( | ||
modifier: Modifier = Modifier | ||
) { | ||
Column( | ||
modifier = modifier | ||
.fillMaxWidth() | ||
.background(Gray100) | ||
.padding(horizontal = 16.dp) | ||
) { | ||
Row( | ||
modifier = Modifier.padding(vertical = 8.dp), | ||
verticalAlignment = Alignment.CenterVertically | ||
) { | ||
Text( | ||
text = "CJ CGV (주)", | ||
style = CGVTheme.typography.head0_b_11, | ||
color = Black | ||
) | ||
Icon( | ||
imageVector = ImageVector.vectorResource(id = R.drawable.ic_home_arrow_down), | ||
contentDescription = null, | ||
tint = Color.Unspecified, | ||
modifier = Modifier.padding(start = 4.dp) | ||
) | ||
} | ||
|
||
Row( | ||
modifier = Modifier | ||
.fillMaxWidth() | ||
.padding(bottom = 16.dp), | ||
horizontalArrangement = Arrangement.spacedBy(7.dp), | ||
verticalAlignment = Alignment.CenterVertically | ||
) { | ||
Text( | ||
text = "이용약관", | ||
style = CGVTheme.typography.small1_l_10, | ||
color = Gray800 | ||
) | ||
Icon( | ||
imageVector = ImageVector.vectorResource(id = R.drawable.ic_home_footer_line), | ||
contentDescription = null, | ||
tint = Color.Unspecified, | ||
) | ||
|
||
Text( | ||
text = "개인정보 처리방침", | ||
style = CGVTheme.typography.small1_l_10, | ||
color = Gray800 | ||
) | ||
Icon( | ||
imageVector = ImageVector.vectorResource(id = R.drawable.ic_home_footer_line), | ||
contentDescription = null, | ||
tint = Color.Unspecified, | ||
) | ||
|
||
Text( | ||
text = "위치기반서비스 이용약관", | ||
style = CGVTheme.typography.small1_l_10, | ||
color = Gray800 | ||
) | ||
Icon( | ||
imageVector = ImageVector.vectorResource(id = R.drawable.ic_home_footer_line), | ||
contentDescription = null, | ||
tint = Color.Unspecified, | ||
) | ||
|
||
Text( | ||
text = "법적고지", | ||
style = CGVTheme.typography.small1_l_10, | ||
color = Gray800 | ||
) | ||
} | ||
Spacer(modifier = Modifier.padding(36.dp)) | ||
} | ||
} | ||
|
||
@Preview(showBackground = true) | ||
@Composable | ||
fun CgvFooterPreview() { | ||
CGVTheme { | ||
CgvFooter() | ||
} | ||
} |
145 changes: 145 additions & 0 deletions
145
app/src/main/java/org/sopt/cgv/feature/home/component/CgvMovieChartSection.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
package org.sopt.cgv.feature.home.component | ||
|
||
import androidx.compose.foundation.background | ||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.Spacer | ||
import androidx.compose.foundation.layout.height | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import androidx.compose.ui.unit.dp | ||
import kotlinx.collections.immutable.PersistentList | ||
import kotlinx.collections.immutable.persistentListOf | ||
import org.sopt.cgv.R | ||
import org.sopt.cgv.core.designsystem.theme.CGVTheme | ||
import org.sopt.cgv.core.designsystem.theme.White | ||
|
||
@Composable | ||
fun CgvMovieChartSection( | ||
title: String, | ||
view: String, | ||
indicators: PersistentList<String>, | ||
movies: PersistentList<MovieItem>, | ||
modifier: Modifier = Modifier, | ||
showViewAll: Boolean = true, | ||
onViewAllClick: () -> Unit = {}, | ||
onIndicatorSelected: (Int) -> Unit = {} | ||
) { | ||
Column( | ||
modifier = modifier | ||
.background(White) | ||
) { | ||
SectionHeader( | ||
title = title, | ||
view = view, | ||
showViewAll = showViewAll, | ||
onViewAllClick = onViewAllClick | ||
) | ||
|
||
Spacer(modifier = Modifier.height(8.dp)) | ||
|
||
CgvTabBar( | ||
contentsList = indicators, | ||
onIndexSelected = onIndicatorSelected, | ||
modifier = Modifier.padding(start = 18.dp), | ||
) | ||
|
||
Spacer(modifier = Modifier.height(16.dp)) | ||
|
||
MovieChart(movies = movies) | ||
|
||
Spacer(modifier = Modifier.height(20.dp)) | ||
} | ||
} | ||
|
||
@Preview(showBackground = true) | ||
@Composable | ||
fun CgvMovieChartSectionPreview() { | ||
CGVTheme { | ||
val movieChartTypes = persistentListOf( | ||
"예매차트", | ||
"현재상영작", | ||
"ICECON", | ||
"아트하우스", | ||
"CGV Only" | ||
) | ||
|
||
val sampleMovies = persistentListOf( | ||
MovieItem( | ||
movieImageRes = R.drawable.img_movie1, | ||
movieTitle = "청설", | ||
likePercentage = "99.9", | ||
rating = "D-1", | ||
ageRatingIcon = R.drawable.ic_all | ||
), | ||
MovieItem( | ||
movieImageRes = R.drawable.img_movie2, | ||
movieTitle = "글래디애이터 II", | ||
likePercentage = "99.9", | ||
rating = "D-1", | ||
ageRatingIcon = R.drawable.ic_19 | ||
), | ||
MovieItem( | ||
movieImageRes = R.drawable.img_movie3, | ||
movieTitle = "대도시의 사랑법", | ||
likePercentage = "99.9", | ||
rating = "D-1", | ||
ageRatingIcon = R.drawable.ic_15 | ||
), | ||
MovieItem( | ||
movieImageRes = R.drawable.img_movie4, | ||
movieTitle = "위키드", | ||
likePercentage = "99.9", | ||
rating = "D-1", | ||
ageRatingIcon = R.drawable.ic_all | ||
), | ||
MovieItem( | ||
movieImageRes = R.drawable.img_movie5, | ||
movieTitle = "베놈: 라스트 댄스", | ||
likePercentage = "99.9", | ||
rating = "D-1", | ||
ageRatingIcon = R.drawable.ic_15 | ||
), | ||
MovieItem( | ||
movieImageRes = R.drawable.img_movie6, | ||
movieTitle = "히든페이스", | ||
likePercentage = "99.9", | ||
rating = "D-1", | ||
ageRatingIcon = R.drawable.ic_19 | ||
), | ||
MovieItem( | ||
movieImageRes = R.drawable.img_movie7, | ||
movieTitle = "괴물", | ||
likePercentage = "99.9", | ||
rating = "D-1", | ||
ageRatingIcon = R.drawable.ic_12 | ||
), | ||
MovieItem( | ||
movieImageRes = R.drawable.img_movie8, | ||
movieTitle = "아메바 소녀들과 학교괴담", | ||
likePercentage = "99.9", | ||
rating = "D-1", | ||
ageRatingIcon = R.drawable.ic_15 | ||
), | ||
MovieItem( | ||
movieImageRes = R.drawable.img_movie9, | ||
movieTitle = "캐롤", | ||
likePercentage = "99.9", | ||
rating = "D-1", | ||
ageRatingIcon = R.drawable.ic_19 | ||
) | ||
|
||
) | ||
|
||
CgvMovieChartSection( | ||
title = "무비차트", | ||
view = "전체보기", | ||
indicators = movieChartTypes, | ||
movies = sampleMovies, | ||
showViewAll = true, | ||
onViewAllClick = {}, | ||
onIndicatorSelected = {} | ||
) | ||
} | ||
} |
75 changes: 75 additions & 0 deletions
75
app/src/main/java/org/sopt/cgv/feature/home/component/CgvMySection.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
package org.sopt.cgv.feature.home.component | ||
|
||
import androidx.compose.foundation.background | ||
import androidx.compose.foundation.layout.Arrangement | ||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.Spacer | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.vector.ImageVector | ||
import androidx.compose.ui.res.vectorResource | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import androidx.compose.ui.unit.dp | ||
import org.sopt.cgv.R | ||
import org.sopt.cgv.core.designsystem.theme.CGVTheme | ||
import org.sopt.cgv.core.designsystem.theme.White | ||
|
||
@Composable | ||
fun CgvMySection( | ||
title: String, | ||
view: String, | ||
modifier: Modifier = Modifier, | ||
showViewAll: Boolean = true, | ||
onViewAllClick: () -> Unit = {}, | ||
) { | ||
Column( | ||
modifier = modifier | ||
.background(White) | ||
) { | ||
SectionHeader( | ||
title = title, | ||
view = view, | ||
showViewAll = showViewAll, | ||
onViewAllClick = onViewAllClick | ||
) | ||
|
||
Column( | ||
modifier = Modifier.padding(horizontal = 18.dp), | ||
verticalArrangement = Arrangement.spacedBy(6.dp) | ||
) { | ||
MyCgvComponent( | ||
leadingIcon = ImageVector.vectorResource(id = R.drawable.ic_home_movie), | ||
title = "내가 본 영화", | ||
count = 9 | ||
) | ||
|
||
MyCgvComponent( | ||
leadingIcon = ImageVector.vectorResource(id = R.drawable.ic_home_like), | ||
title = "기대되는 영화", | ||
count = 2 | ||
) | ||
|
||
MyCgvComponent( | ||
leadingIcon = ImageVector.vectorResource(id = R.drawable.ic_home_pen), | ||
title = "내가 쓴 리뷰", | ||
count = 1 | ||
) | ||
|
||
Spacer(modifier = Modifier.padding(16.dp)) | ||
} | ||
} | ||
} | ||
|
||
@Preview | ||
@Composable | ||
fun CgvMySectionPreview() { | ||
CGVTheme { | ||
CgvMySection( | ||
title = "나의 CGV", | ||
view = "자세히 보기", | ||
showViewAll = true, | ||
onViewAllClick = {}, | ||
) | ||
} | ||
} |
Oops, something went wrong.