Skip to content

Commit 4efbc27

Browse files
authored
Merge pull request #49 from Nexters/feature/add-gathering-name-in-proposal
만남 초대장 화면 디자인을 적용합니다.
2 parents 6447ce5 + c618418 commit 4efbc27

File tree

4 files changed

+50
-16
lines changed

4 files changed

+50
-16
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
android:exported="true"
2020
android:label="@string/app_name"
2121
android:theme="@style/Theme.Tuk"
22+
android:screenOrientation="portrait"
2223
android:windowSoftInputMode="adjustResize">
2324
<intent-filter>
2425
<action android:name="android.intent.action.MAIN" />

feature/proposal-create/src/main/java/com/plottwist/feature/proposal_create/CreateProposalScreen.kt

Lines changed: 38 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ import androidx.compose.ui.Alignment
2727
import androidx.compose.ui.Modifier
2828
import androidx.compose.ui.draw.BlurredEdgeTreatment
2929
import androidx.compose.ui.draw.blur
30+
import androidx.compose.ui.draw.clipToBounds
3031
import androidx.compose.ui.draw.drawWithContent
3132
import androidx.compose.ui.graphics.drawscope.clipRect
3233
import androidx.compose.ui.layout.ContentScale
3334
import androidx.compose.ui.platform.LocalConfiguration
3435
import androidx.compose.ui.res.stringResource
36+
import androidx.compose.ui.text.style.TextAlign
3537
import androidx.compose.ui.tooling.preview.Preview
3638
import androidx.compose.ui.unit.dp
3739
import androidx.hilt.navigation.compose.hiltViewModel
@@ -154,8 +156,9 @@ private fun CreateProposalScreen(
154156
postCardAnimated2 = true
155157
}
156158
Box(
157-
modifier = modifier.fillMaxSize().background(color = Gray000)
159+
modifier = modifier.fillMaxSize().background(color = Gray000).clipToBounds()
158160
) {
161+
CreateProposalGradientBackgroundImage()
159162
Column(
160163
modifier = Modifier.fillMaxSize()
161164
) {
@@ -201,19 +204,40 @@ private fun CreateProposalScreen(
201204
onCloseSelectedGatheringClick = onCloseSelectedGatheringClick
202205
)
203206

204-
205-
StableImage(
206-
modifier = Modifier
207+
Box(
208+
Modifier
207209
.fillMaxWidth()
208-
.offset(y= animatedOffset2.value + animatedOffset.value)
209-
.aspectRatio(260f/364f),
210-
drawableResId = R.drawable.image_post_cover,
211-
contentScale = ContentScale.FillWidth
212-
)
210+
.offset(y= (10f * screenHeight / 812f).dp + animatedOffset2.value + animatedOffset.value)
211+
) {
212+
StableImage(
213+
modifier = Modifier
214+
.fillMaxWidth()
215+
.aspectRatio(260f/364f),
216+
drawableResId = R.drawable.image_post_cover,
217+
contentScale = ContentScale.FillWidth
218+
)
219+
220+
Text(
221+
modifier = Modifier.align(Alignment.BottomCenter).padding(
222+
bottom = (140f * screenHeight / 812f).dp
223+
),
224+
text = selectedGatheringName + "\n친구들에게",
225+
style = TukSerifTypography.body16M,
226+
textAlign = TextAlign.Center
227+
)
228+
}
229+
213230
}
214231

215232
Column (
216-
modifier = Modifier.fillMaxWidth().background(Gray000)
233+
modifier = Modifier.fillMaxWidth()
234+
.then(
235+
if(postCardAnimated2) {
236+
Modifier.background(Gray000)
237+
} else {
238+
Modifier
239+
}
240+
)
217241
){
218242
AnimatedVisibility(postCardAnimated2) {
219243
HorizontalDivider(
@@ -256,7 +280,7 @@ fun CreateProposalGradientBackgroundImage(
256280
localConfiguration.screenWidthDp.dp * GRADIENT_BACKGROUND_IMAGE_SCALE
257281
),
258282
contentScale = ContentScale.Crop,
259-
drawableResId = R.drawable.image_proposal_gradient
283+
drawableResId = R.drawable.image_home_gradient
260284
)
261285
}
262286

@@ -285,6 +309,8 @@ fun CreateProposalTitle(
285309
}
286310

287311

312+
313+
288314
private const val GRADIENT_BACKGROUND_IMAGE_SCALE = 3
289315

290316
@Preview
@@ -296,7 +322,7 @@ private fun CreateProposalScreenPreview() {
296322
whereLabel = "where",
297323
whenLabel = "when",
298324
whatLabel = "what",
299-
selectedGatheringName = "",
325+
selectedGatheringName = "다음 만남은 계획대로 되지 않아",
300326
isGatheringSelected = false,
301327
onBackClicked = {},
302328
onSelectGatheringClick = {},

feature/proposal-create/src/main/java/com/plottwist/feature/proposal_create/navigation/CreateProposalNavigation.kt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ import androidx.navigation.NavOptions
66
import androidx.navigation.compose.composable
77
import com.plottwist.core.ui.extension.popSlideInVertically
88
import com.plottwist.core.ui.extension.popSlideOutVertically
9+
import com.plottwist.core.ui.extension.slideIn
910
import com.plottwist.core.ui.extension.slideInVertically
11+
import com.plottwist.core.ui.extension.slideOut
1012
import com.plottwist.core.ui.extension.slideOutVertically
1113
import com.plottwist.core.ui.navigation.Route
1214
import com.plottwist.feature.proposal_create.CreateProposalScreen
@@ -32,10 +34,12 @@ fun NavGraphBuilder.createProposalNavGraph(
3234
navigateToCompleteProposeScreen: (String) -> Unit,
3335
) {
3436
composable<Route.CreateProposal> (
35-
enterTransition = { slideInVertically() },
36-
exitTransition = { null },
37-
popEnterTransition = { null },
38-
popExitTransition = { popSlideOutVertically() }
37+
enterTransition = {
38+
slideIn()
39+
},
40+
exitTransition = {
41+
slideOut()
42+
}
3943
) { backStackEntry ->
4044
CreateProposalScreen(
4145
onBack = onBack,

feature/proposal-create/src/main/java/com/plottwist/feature/proposal_create/navigation/SelectGatheringNavigation.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ fun NavGraphBuilder.selectGatheringNavGraph(
2929
) {
3030
composable<Route.SelectGathering> (
3131
enterTransition = { slideIn() },
32+
popEnterTransition = {
33+
null
34+
},
3235
popExitTransition = { slideOut() }
3336
) {
3437
SelectGatheringScreen(

0 commit comments

Comments
 (0)