Skip to content

Commit

Permalink
feat: Posting Screen frame
Browse files Browse the repository at this point in the history
posting screen에서 간단한 component 추가하였습니다.
갤러리에서 사진 가져오기, 카메라 앱을 통한 이미지 촬영은 월요일에 구현 예정입니다.
  • Loading branch information
mechanicjo committed Oct 29, 2023
1 parent affc763 commit 1595212
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ fun ProfileSection(
userProfileImageUrl : Int = R.drawable.profile_cat,
isFooried : Boolean = false,
onFollowClick : () -> Unit = {},
isMyPage : Boolean = false,
) {
var isFollowed by remember { mutableStateOf(isFooried) }
Row(
Expand Down Expand Up @@ -75,14 +76,14 @@ fun ProfileSection(
horizontalArrangement = Arrangement.Center,
verticalAlignment = Alignment.CenterVertically
) {
Text(text = "$followersCount Followers", color = MaterialTheme.colorScheme.primary)
Text(text = "Followers \n $followersCount", color = MaterialTheme.colorScheme.primary)
Spacer(modifier = Modifier.width(16.dp))
Text(text = "$followingCount Following", color = MaterialTheme.colorScheme.primary)
Text(text = "Following \n $followingCount", color = MaterialTheme.colorScheme.primary)
}

Spacer(modifier = Modifier.height(8.dp))
// 팔로우 버튼이 null이 아닌경우 == mypage에서 호출하지 않은 경우
if(onFollowClick != {}){
if(!isMyPage){
if(!isFollowed){
Button(onClick = onFollowClick) {
Text(text = "Follow")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,34 @@
package com.team13.fooriend.ui.screen

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.layout.widthIn
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Close
import androidx.compose.material3.Button
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.OutlinedButton
import androidx.compose.material3.Text
import androidx.compose.material3.TextField
import androidx.compose.runtime.Composable
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp

Expand All @@ -22,6 +37,7 @@ fun PostingScreen(
onCloseClick: () -> Unit = {},
onPostClick: () -> Unit = {},
){
val (content, contentValue) = remember { mutableStateOf("") }
Column(
modifier = Modifier.padding(16.dp)
){
Expand All @@ -38,15 +54,38 @@ fun PostingScreen(
}
}
// 음식점 이름
Text(text = "음식점 이름")
Text(text = "용찬 반점")
// 리뷰 작성 textfield (최대 140자)
Text(text = "리뷰 작성")
TextField(
modifier = Modifier
.fillMaxWidth()
.heightIn(min = 100.dp),
value = content,
onValueChange = contentValue
)
// 사진 등록 (최대 ?장)
Text(text = "사진 등록")
OutlinedButton(
onClick = { /*TODO*/ },
shape = RoundedCornerShape(10.dp),
) {
Text(
text = "사진 등록"
)
}
// 영수증 사진 첨부
Text(text = "영수증 사진 첨부")
OutlinedButton(
onClick = { /*TODO*/ },
shape = RoundedCornerShape(10.dp),
) {
Text(
text = "영수증 등록"
)
}
// 리뷰 등록
Button(onClick = onPostClick) {
Spacer(modifier = Modifier.height(20.dp))
Button(onClick = { onPostClick() }, modifier = Modifier.fillMaxWidth().align(Alignment.CenterHorizontally)){
Text(text = "리뷰 등록")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ fun MyPageScreen(
}
}
// 프로필 섹션
ProfileSection()
ProfileSection(isMyPage = true)

Spacer(modifier = Modifier.height(16.dp))

Expand Down

0 comments on commit 1595212

Please sign in to comment.