diff --git a/app/src/main/java/com/example/togedy_android/presentation/calendar/univDetail/UnivDetailScreen.kt b/app/src/main/java/com/example/togedy_android/presentation/calendar/univDetail/UnivDetailScreen.kt index bfbf563..2d12aeb 100644 --- a/app/src/main/java/com/example/togedy_android/presentation/calendar/univDetail/UnivDetailScreen.kt +++ b/app/src/main/java/com/example/togedy_android/presentation/calendar/univDetail/UnivDetailScreen.kt @@ -1,18 +1,23 @@ package com.example.togedy_android.presentation.calendar.univDetail +import androidx.compose.foundation.Image import androidx.compose.foundation.background import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.pager.HorizontalPager import androidx.compose.foundation.pager.rememberPagerState import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.rememberCoroutineScope +import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.res.painterResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.hilt.navigation.compose.hiltViewModel @@ -66,6 +71,7 @@ fun UnivDetailScreen( when (page) { 0 -> UnivDetailPager() 1 -> UnivDetailPager() + 2 -> UnivDetailPager() } } } @@ -78,12 +84,207 @@ fun UnivDetailPager() { .fillMaxSize() .padding(vertical = 8.dp) ) { + item { + SelectTitle( + text = "전체 선택" + ) + } + + item { + SelectTitleDate( + text = "원서 접수", + startDate = "2024.09.09 10:00", + endDate = "2024.09.13 17:00" + ) + } + + item { + SelectTitleDate( + text = "서류제출", + startDate = "2024.09.09 10:00", + endDate = "2024.09.12 17:00" + ) + } + + item { + SelectTitle( + text = "온라인 입력" + ) + } + + item { + SelectSubTitleDate( + startSub = "학생부종합전형", + endSub = "학생생활 기록부 대체서식 입력", + startDate = "2024.09.09 10:00", + endDate = "2024.09.13 17:00", + isStartDate = true + ) + } + + item { + SelectSubTitleDate( + startSub = "학생부교과", + endSub = "학교장 추천 명단 입력", + startDate = "2024.09.19 09:00", + endDate = "2024.09.25 18:00", + isStartDate = true + ) + } + + item { + SelectTitle( + text = "1단계 합격자 발표" + ) + } + + item { + SelectSubTitleDate( + startSub = "실기/실적(KU연기우수자, KU체육특기자)", + endSub = "", + startDate = "", + endDate = "2024.10.11 14:00 예정", + isStartDate = false + ) + } + + item { + SelectSubTitleDate( + startSub = "학생부종합(KU자기추천, 특수교육대상자)", + endSub = "", + startDate = "", + endDate = "2024.11.15 14:00 예정", + isStartDate = false + ) + } + } +} + +@Composable +fun SelectTitle( + text: String +) { + Row( + modifier = Modifier.padding(vertical = 15.dp), + verticalAlignment = Alignment.CenterVertically, + ) { + Image( + painter = painterResource(R.drawable.ic_uncheck_circle), + modifier = Modifier.size(18.dp), + contentDescription = "체크 버튼" + ) + Text( + text = text, + modifier = Modifier.padding(start = 10.dp), + style = TogedyTheme.typography.body2B + ) + } +} + +@Composable +fun SelectTitleDate( + text: String, + startDate: String, + endDate: String +) { + Column( + modifier = Modifier.padding(vertical = 15.dp) + ) { + Row( + ) { + Image( + painter = painterResource(R.drawable.ic_uncheck_circle), + modifier = Modifier.size(18.dp), + contentDescription = "체크 버튼" + ) + Text( + text = text, + modifier = Modifier.padding(start = 10.dp), + style = TogedyTheme.typography.body2B + ) + } + + Row( + modifier = Modifier.padding(top = 10.dp) + ) { + Text( + text = startDate, + color = TogedyTheme.colors.gray600, + style = TogedyTheme.typography.body2M + ) + Text( + text = "-", + modifier = Modifier.padding(horizontal = 4.dp) + ) + Text( + text = endDate, + color = TogedyTheme.colors.black, + style = TogedyTheme.typography.body2M + ) + } + } +} + +@Composable +fun SelectSubTitleDate( + startSub: String, + endSub: String, + startDate: String, + endDate: String, + isStartDate: Boolean +) { + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(10.dp) + ) { + Image( + painter = painterResource(R.drawable.ic_check_circle), + modifier = Modifier.size(18.dp), + contentDescription = "체크 버튼" + ) + Column( + modifier = Modifier.padding(vertical = 15.dp), + verticalArrangement = Arrangement.spacedBy(10.dp) + ) { + Row( + horizontalArrangement = Arrangement.spacedBy(10.dp) + ) { + Text( + text = startSub, + color = TogedyTheme.colors.gray600, + style = TogedyTheme.typography.body3M + ) + Text( + text = endSub, + color = TogedyTheme.colors.gray600, + style = TogedyTheme.typography.body3M + ) + } + Row() { + Text( + text = startDate, + color = TogedyTheme.colors.gray600, + style = TogedyTheme.typography.body2M + ) + if (isStartDate) { + Text( + text = "-", + modifier = Modifier.padding(horizontal = 4.dp) + ) + } + Text( + text = endDate, + color = TogedyTheme.colors.black, + style = TogedyTheme.typography.body2M + ) + } + } } } @Preview @Composable -fun UnivDetailScreenPreview(){ +fun UnivDetailScreenPreview() { UnivDetailScreen() } \ No newline at end of file diff --git a/app/src/main/java/com/example/togedy_android/presentation/community/AddWriting.kt b/app/src/main/java/com/example/togedy_android/presentation/community/AddWriting.kt index 16858b9..0062426 100644 --- a/app/src/main/java/com/example/togedy_android/presentation/community/AddWriting.kt +++ b/app/src/main/java/com/example/togedy_android/presentation/community/AddWriting.kt @@ -30,6 +30,7 @@ import com.example.togedy_android.presentation.community.component.SelectingWrit @Composable fun AddWriting( + modifier: Modifier = Modifier, viewModel: WritingViewModel = viewModel(), closeButtonClicked: () -> Unit, ) { @@ -39,7 +40,7 @@ fun AddWriting( val isActivated = viewModel.isActivated.collectAsStateWithLifecycle() Column( - modifier = Modifier + modifier = modifier .fillMaxSize() .background(TogedyTheme.colors.white) .padding(horizontal = 16.dp, vertical = 16.dp) diff --git a/app/src/main/java/com/example/togedy_android/presentation/community/CommunityDetailScreen.kt b/app/src/main/java/com/example/togedy_android/presentation/community/CommunityDetailScreen.kt index 556688b..167620d 100644 --- a/app/src/main/java/com/example/togedy_android/presentation/community/CommunityDetailScreen.kt +++ b/app/src/main/java/com/example/togedy_android/presentation/community/CommunityDetailScreen.kt @@ -23,6 +23,7 @@ import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview @@ -89,7 +90,7 @@ fun CommunityDetailScreen( modifier = Modifier.padding(start = 7.dp) ) { Text( - text = "사용자 이름", + text = "태정", color = TogedyTheme.colors.gray700, style = TogedyTheme.typography.body2B ) @@ -359,11 +360,12 @@ fun CommunityDetailImages( @Composable fun CommunityDetailImage(image: String) { AsyncImage( - model = image, + model = "https://cdn.pixabay.com/photo/2021/10/27/19/09/cat-6748193_1280.jpg", contentDescription = "게시글 사진", modifier = Modifier .width(160.dp) - .aspectRatio(1f) + .aspectRatio(1f), + contentScale = ContentScale.Crop ) } diff --git a/app/src/main/java/com/example/togedy_android/presentation/community/CommunityScreen.kt b/app/src/main/java/com/example/togedy_android/presentation/community/CommunityScreen.kt index 3057a4a..00096a8 100644 --- a/app/src/main/java/com/example/togedy_android/presentation/community/CommunityScreen.kt +++ b/app/src/main/java/com/example/togedy_android/presentation/community/CommunityScreen.kt @@ -142,7 +142,7 @@ fun CommunitySideBar( ) Text( - text = "유저 이름", + text = "태정", modifier = Modifier.padding(start = 10.dp), color = TogedyTheme.colors.black, style = TogedyTheme.typography.body2M diff --git a/app/src/main/java/com/example/togedy_android/presentation/community/component/CommunityForumListItem.kt b/app/src/main/java/com/example/togedy_android/presentation/community/component/CommunityForumListItem.kt index 923745e..c01cfa1 100644 --- a/app/src/main/java/com/example/togedy_android/presentation/community/component/CommunityForumListItem.kt +++ b/app/src/main/java/com/example/togedy_android/presentation/community/component/CommunityForumListItem.kt @@ -1,5 +1,6 @@ package com.example.togedy_android.presentation.community.component +import androidx.compose.foundation.Image import androidx.compose.foundation.background import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Column @@ -16,10 +17,12 @@ import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier +import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import coil.compose.AsyncImage +import coil.compose.rememberImagePainter import com.example.togedy_android.core.design_system.theme.TogedyTheme @Composable @@ -52,10 +55,11 @@ fun CommunityForumListItem( .aspectRatio(1f), shape = RoundedCornerShape(8.dp) ) { - AsyncImage( - model = image, + Image( + painter = rememberImagePainter(data = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRj_BCAlUfURJQQFPlTMmTnARzSNewFJU0GMg&s"), contentDescription = "게시판 리스트 사진", - modifier = Modifier.fillMaxSize() + modifier = Modifier.fillMaxSize(), + contentScale = ContentScale.Crop ) } } @@ -113,7 +117,7 @@ fun CommunityForumListItemPreview() { date = "2024.12.05", content = "건대 근처 학원 다니면서 맛집 정말 많이 다녀봤고, 제가 맛잘알로써 진짜 맛있는 집들만 정리해뒀습니다. 가격은 3000원!! 편하게 연락주세요", type = "market", - image = "https://cdn.pixabay.com/photo/2024/03/03/20/44/cat-8611246_1280.jpg", + image = "https://cdn.pixabay.com/photo/2021/10/27/19/09/cat-6748193_1280.jpg", navigateToCommunityDetail = { } ) diff --git a/app/src/main/java/com/example/togedy_android/presentation/community/component/HomeBulletinBoard.kt b/app/src/main/java/com/example/togedy_android/presentation/community/component/HomeBulletinBoard.kt index f7d3e06..1935b6d 100644 --- a/app/src/main/java/com/example/togedy_android/presentation/community/component/HomeBulletinBoard.kt +++ b/app/src/main/java/com/example/togedy_android/presentation/community/component/HomeBulletinBoard.kt @@ -74,13 +74,14 @@ fun HomeBulletinBoardItem() { modifier = Modifier.padding(horizontal = 14.dp, vertical = 8.dp) ) { Text( - text = "제목이 드렁가는 부분", + text = "건국대학교 입시 떴다;;", style = TogedyTheme.typography.body2B, color = TogedyTheme.colors.gray700 ) Spacer(modifier = Modifier.height(6.dp)) Text( - text = "내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용내용", + text = "건대 이번에 반영 비율 왜 이래?\n저번 반영 비율이 내가 알기로는 1단계 학생부(교과정량) 100%로 25배수를 선발하여, 2단계에서 실기 100%로 선발로 알고있는데\n", + style = TogedyTheme.typography.body3M, color = TogedyTheme.colors.gray300, maxLines = 2, diff --git a/app/src/main/java/com/example/togedy_android/presentation/community/component/TrendingPostsSection.kt b/app/src/main/java/com/example/togedy_android/presentation/community/component/TrendingPostsSection.kt index a6d3eec..ee2b4fe 100644 --- a/app/src/main/java/com/example/togedy_android/presentation/community/component/TrendingPostsSection.kt +++ b/app/src/main/java/com/example/togedy_android/presentation/community/component/TrendingPostsSection.kt @@ -74,13 +74,13 @@ fun TrendingPostItem( ) Spacer(modifier = Modifier.height(5.dp)) Text( - text = "제목부분입니다용가리", + text = "하 수능 망했다", style = TogedyTheme.typography.body2B, color = TogedyTheme.colors.black ) Spacer(modifier = Modifier.height(4.dp)) Text( - text = "내용이 들어가는 부분입니다용가리. 내용이 들어가는 부분입니다용가리. 내용이 들어가는 부분입니다용가리. 내용이 들어가는 부분입니다용가리. 내용이 들어가는 부분입니다용가리", + text = "24학년도 수능은 망했다...\n건대 수의대 목표로 준비했는데...\n", style = TogedyTheme.typography.body3M, color = TogedyTheme.colors.gray600, maxLines = 2, diff --git a/app/src/main/java/com/example/togedy_android/presentation/community/navigation/CommunityNavigation.kt b/app/src/main/java/com/example/togedy_android/presentation/community/navigation/CommunityNavigation.kt index 7cc7ddd..ba7ba6f 100644 --- a/app/src/main/java/com/example/togedy_android/presentation/community/navigation/CommunityNavigation.kt +++ b/app/src/main/java/com/example/togedy_android/presentation/community/navigation/CommunityNavigation.kt @@ -58,7 +58,8 @@ fun NavGraphBuilder.communityScreen( composable { AddWriting( - closeButtonClicked = { } + closeButtonClicked = { }, + modifier = modifier ) } diff --git a/app/src/main/res/drawable/ic_check_circle.xml b/app/src/main/res/drawable/ic_check_circle.xml index 46f0c49..17716d2 100644 --- a/app/src/main/res/drawable/ic_check_circle.xml +++ b/app/src/main/res/drawable/ic_check_circle.xml @@ -1,17 +1,24 @@ + android:width="18dp" + android:height="18dp" + android:viewportWidth="18" + android:viewportHeight="18"> + android:pathData="M0,0h18v18h-18z"/> + diff --git a/app/src/main/res/drawable/ic_uncheck_circle.xml b/app/src/main/res/drawable/ic_uncheck_circle.xml new file mode 100644 index 0000000..81855d6 --- /dev/null +++ b/app/src/main/res/drawable/ic_uncheck_circle.xml @@ -0,0 +1,17 @@ + + + + + +