Skip to content

Commit

Permalink
Merge pull request #27 from PawWithU/feature/notice_detail
Browse files Browse the repository at this point in the history
feature/notice_detail: 이동봉사 공고 상세 화면, 이동봉사 신청 ui 구현
  • Loading branch information
kang9366 authored Nov 18, 2023
2 parents a5024b6 + d19cb11 commit a311f82
Show file tree
Hide file tree
Showing 29 changed files with 1,049 additions and 26 deletions.
Empty file.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.kusitms.connectdog.core.designsystem.R
import com.kusitms.connectdog.core.designsystem.theme.ConnectDogTheme
import com.kusitms.connectdog.core.designsystem.theme.PetOrange
import com.kusitms.connectdog.core.designsystem.theme.Typography

@Composable
Expand Down Expand Up @@ -79,14 +78,16 @@ fun ConnectDogOutlinedButton(
text: String,
padding: Int,
onClick: () -> Unit,
modifier: Modifier = Modifier
modifier: Modifier = Modifier,
borderColor: Color = MaterialTheme.colorScheme.primary,
fontColor: Color = MaterialTheme.colorScheme.primary
) {
OutlinedButton(
onClick = onClick,
modifier = modifier
.width(width.dp)
.height(height.dp),
border = BorderStroke(1.dp, PetOrange),
border = BorderStroke(1.dp, borderColor),
contentPadding = PaddingValues(
top = 4.dp,
bottom = 4.dp,
Expand All @@ -97,7 +98,7 @@ fun ConnectDogOutlinedButton(
Text(
text = text,
fontSize = 12.sp,
color = MaterialTheme.colorScheme.primary,
color = fontColor,
fontWeight = FontWeight.SemiBold
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package com.kusitms.connectdog.core.designsystem.component

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.kusitms.connectdog.core.designsystem.theme.ConnectDogTheme

@Composable
fun ConnectDogTag(
text: String,
color: Color = MaterialTheme.colorScheme.primary
) {
Text(
text = text,
style = MaterialTheme.typography.labelMedium,
fontWeight = FontWeight.SemiBold,
color = color,
modifier = Modifier
.background(
shape = RoundedCornerShape(4.dp),
color = MaterialTheme.colorScheme.primaryContainer
)
.padding(horizontal = 7.dp, vertical = 2.dp)
)
}

@Composable
@Preview
fun test() {
ConnectDogTheme {
ConnectDogTag(text = "모집중")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ fun ConnectDogTextField(
modifier =
Modifier
.fillMaxWidth()
.padding(horizontal = 20.dp)
.height(height.dp),
value = text,
onValueChange = onTextChanged,
Expand Down Expand Up @@ -101,7 +100,7 @@ fun ConnectDogTextField(
}

@Composable
fun LoginTextField(
fun NormalTextField(
label: String,
placeholder: String,
keyboardType: KeyboardType,
Expand All @@ -128,14 +127,15 @@ fun ConnectDogTextFieldWithButton(
textFieldLabel: String,
placeholder: String,
buttonLabel: String,
keyboardType: KeyboardType = KeyboardType.Text,
padding: Int,
onclick: () -> Unit
) {
Box {
LoginTextField(
NormalTextField(
label = textFieldLabel,
placeholder = placeholder,
keyboardType = KeyboardType.Text
keyboardType = keyboardType
)

ConnectDogOutlinedButton(
Expand All @@ -144,7 +144,7 @@ fun ConnectDogTextFieldWithButton(
text = buttonLabel,
padding = padding,
modifier = Modifier
.padding(top = 6.dp, end = 33.dp)
.padding(top = 6.dp, end = 16.dp)
.align(Alignment.CenterEnd),
onClick = onclick
)
Expand Down
2 changes: 2 additions & 0 deletions core/designsystem/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@
<string name="dog_recent">의 근황</string>
<string name="location">지역</string>
<string name="end_recruit">모집마감</string>
<string name="volunteer_signup">이동봉사자 회원가입</string>
<string name="apply_volunter">이동봉사 신청하기</string>
</resources>
Binary file not shown.
Empty file.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import androidx.navigation.NavController
import androidx.navigation.NavGraphBuilder
import androidx.navigation.NavOptions
import androidx.navigation.compose.composable
import androidx.navigation.navigation
import com.kusitms.connectdog.feature.home.screen.ApplyScreen
import com.kusitms.connectdog.feature.home.screen.CertificationScreen
import com.kusitms.connectdog.feature.home.screen.CompleteApplyScreen
import com.kusitms.connectdog.feature.home.screen.DetailScreen
import com.kusitms.connectdog.feature.home.screen.HomeRoute
import com.kusitms.connectdog.feature.home.screen.ReviewScreen
import com.kusitms.connectdog.feature.home.screen.SearchScreen
Expand All @@ -16,7 +19,9 @@ fun NavController.navigateHome(navOptions: NavOptions) {

fun NavController.navigateSearch() {
Log.d("SearchScreen", "navigateSearch")
navigate(HomeRoute.search)
navigate(HomeRoute.search) {
popUpTo(HomeRoute.route) { inclusive = false }
}
}

fun NavController.navigateReview() {
Expand All @@ -27,11 +32,26 @@ fun NavController.navigateDetail() {
navigate(HomeRoute.detail)
}

fun NavController.navigateCertification() {
navigate(HomeRoute.certification)
}

fun NavController.navigateApply() {
navigate(HomeRoute.apply)
}

fun NavController.navigateComplete() {
navigate(HomeRoute.complete)
}

fun NavGraphBuilder.homeNavGraph(
onBackClick: () -> Unit,
onNavigateToSearch: () -> Unit,
onNavigateToReview: () -> Unit,
onNavigateToDetail: () -> Unit,
onNavigateToCertification: () -> Unit,
onNavigateToApply: () -> Unit,
onNavigateToComplete: () -> Unit,
onShowErrorSnackBar: (throwable: Throwable?) -> Unit
) {
composable(route = HomeRoute.route) {
Expand All @@ -55,6 +75,33 @@ fun NavGraphBuilder.homeNavGraph(
onBackClick = onBackClick
)
}

composable(route = HomeRoute.detail) {
DetailScreen(
onBackClick = onBackClick,
onCertificationClick = onNavigateToCertification
)
}

composable(route = HomeRoute.certification) {
CertificationScreen(
onBackClick = onBackClick,
onApplyClick = onNavigateToApply
)
}

composable(route = HomeRoute.apply) {
ApplyScreen(
onBackClick = onBackClick,
onClick = onNavigateToComplete
)
}

composable(route = HomeRoute.complete) {
CompleteApplyScreen(
onClick = onNavigateToSearch
)
}
}

object HomeRoute {
Expand All @@ -63,4 +110,7 @@ object HomeRoute {
const val search = "search"
const val review = "review"
const val detail = "detail"
const val certification = "certification"
const val apply = "apply"
const val complete = "complete"
}
Loading

0 comments on commit a311f82

Please sign in to comment.