11package com.foke.together.presenter.screen
22
33import androidx.compose.foundation.Image
4+ import androidx.compose.foundation.clickable
5+ import androidx.compose.foundation.layout.Box
46import androidx.compose.foundation.layout.PaddingValues
57import androidx.compose.foundation.layout.aspectRatio
68import androidx.compose.foundation.layout.fillMaxSize
79import androidx.compose.foundation.layout.size
10+ import androidx.compose.foundation.layout.width
811import androidx.compose.foundation.pager.HorizontalPager
912import androidx.compose.foundation.pager.PageSize
1013import androidx.compose.foundation.pager.rememberPagerState
1114import androidx.compose.material.icons.Icons
1215import androidx.compose.material.icons.automirrored.filled.ArrowBack
13- import androidx.compose.material.icons.automirrored.filled.ArrowForward
16+ import androidx.compose.material3.Button
1417import androidx.compose.material3.Icon
1518import androidx.compose.material3.IconButton
1619import androidx.compose.material3.MaterialTheme
@@ -20,6 +23,7 @@ import androidx.compose.runtime.Composable
2023import androidx.compose.ui.Alignment
2124import androidx.compose.ui.Modifier
2225import androidx.compose.ui.res.painterResource
26+ import androidx.compose.ui.res.stringResource
2327import androidx.compose.ui.text.font.FontWeight
2428import androidx.compose.ui.tooling.preview.Preview
2529import androidx.compose.ui.unit.dp
@@ -50,8 +54,8 @@ fun SelectFrameScreen(
5054 val (backKey, title, pager, frameSelectButton) = createRefs()
5155 val topGuideLine = createGuidelineFromTop(0.1f )
5256 val bottomGuideLine = createGuidelineFromBottom(0.1f )
53- val startGuideLine = createGuidelineFromStart(0.2f )
54- val endGuideLine = createGuidelineFromEnd(0.2f )
57+ val startGuideLine = createGuidelineFromStart(0.1f )
58+ val endGuideLine = createGuidelineFromEnd(0.1f )
5559
5660 IconButton (
5761 onClick = { popBackStack() },
@@ -99,18 +103,46 @@ fun SelectFrameScreen(
99103 state = pagerState,
100104 pageSize = PageSize .Fill ,
101105 contentPadding = PaddingValues (
102- start = 25 .dp,
103- end = 25 .dp
106+ start = 40 .dp,
107+ end = 40 .dp
104108 )
105109 ) { page ->
106110 when (page){
107- CutFrameType .MAKER_FAIRE .ordinal -> Image (painter = painterResource(id = R .drawable.maker_faire_frame), contentDescription = " maker_faire_frame" )
108- CutFrameType .FOURCUT_LIGHT .ordinal -> Image (painter = painterResource(id = R .drawable.fourcut_frame_medium_light), contentDescription = " fourcut_frame_medium_light" )
109- CutFrameType .FOURCUT_DARK .ordinal -> Image (painter = painterResource(id = R .drawable.fourcut_frame_medium_dark), contentDescription = " fourcut_frame_medium_dark" )
111+ CutFrameType .MAKER_FAIRE .ordinal -> {
112+ Box (
113+ contentAlignment = Alignment .Center ,
114+ modifier = Modifier
115+ .clickable {
116+ viewModel.setCutFrameType(pagerState.currentPage)
117+ navigateToMethod()
118+ }
119+ ) { Image (painter = painterResource(id = R .drawable.maker_faire_frame), contentDescription = " maker_faire_frame" ) }
120+ }
121+ CutFrameType .FOURCUT_LIGHT .ordinal -> {
122+ Box (
123+ contentAlignment = Alignment .Center ,
124+ modifier = Modifier
125+ .clickable {
126+ viewModel.setCutFrameType(pagerState.currentPage)
127+ navigateToMethod()
128+ }
129+
130+ ) { Image (painter = painterResource(id = R .drawable.fourcut_frame_medium_light), contentDescription = " fourcut_frame_medium_light" ) }
131+ }
132+ CutFrameType .FOURCUT_DARK .ordinal -> {
133+ Box (
134+ modifier = Modifier
135+ .clickable {
136+ viewModel.setCutFrameType(pagerState.currentPage)
137+ navigateToMethod()
138+ },
139+ contentAlignment = Alignment .Center
140+ ) { Image (painter = painterResource(id = R .drawable.fourcut_frame_medium_dark), contentDescription = " fourcut_frame_medium_dark" ) }
141+ }
110142 }
111143 }
112144
113- IconButton (
145+ Button (
114146 onClick = {
115147 viewModel.setCutFrameType(pagerState.currentPage)
116148 navigateToMethod()
@@ -122,13 +154,13 @@ fun SelectFrameScreen(
122154 bottom.linkTo(bottomGuideLine)
123155 height = Dimension .wrapContent
124156 width = Dimension .wrapContent
125- },
157+ }.width( 200 .dp) ,
126158 ) {
127- Icon (
128- modifier = Modifier .size( 85 .dp ),
129- imageVector = Icons . AutoMirrored . Filled . ArrowForward ,
130- contentDescription = " Camera Navigation Button Icon " ,
131- tint = MaterialTheme .colorScheme.primary
159+ Text (
160+ text = stringResource(id = R .string.select_frame_button_next ),
161+ style = MaterialTheme .typography.displayLarge ,
162+ fontWeight = FontWeight . Bold ,
163+ fontSize = 36 .sp
132164 )
133165 }
134166 }
0 commit comments