Skip to content

Commit

Permalink
chore/#30: 배치 및 네비게이터 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
imtaejugkim committed Dec 25, 2024
1 parent 141cf09 commit 6295903
Show file tree
Hide file tree
Showing 10 changed files with 258 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -66,6 +71,7 @@ fun UnivDetailScreen(
when (page) {
0 -> UnivDetailPager()
1 -> UnivDetailPager()
2 -> UnivDetailPager()
}
}
}
Expand All @@ -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()
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import com.example.togedy_android.presentation.community.component.SelectingWrit

@Composable
fun AddWriting(
modifier: Modifier = Modifier,
viewModel: WritingViewModel = viewModel(),
closeButtonClicked: () -> Unit,
) {
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -89,7 +90,7 @@ fun CommunityDetailScreen(
modifier = Modifier.padding(start = 7.dp)
) {
Text(
text = "사용자 이름",
text = "태정",
color = TogedyTheme.colors.gray700,
style = TogedyTheme.typography.body2B
)
Expand Down Expand Up @@ -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
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ fun CommunitySideBar(
)

Text(
text = "유저 이름",
text = "태정",
modifier = Modifier.padding(start = 10.dp),
color = TogedyTheme.colors.black,
style = TogedyTheme.typography.body2M
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
)
}
}
Expand Down Expand Up @@ -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 = { }
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ fun NavGraphBuilder.communityScreen(

composable<CommunityAdd> {
AddWriting(
closeButtonClicked = { }
closeButtonClicked = { },
modifier = modifier
)
}

Expand Down
Loading

0 comments on commit 6295903

Please sign in to comment.