@@ -2,24 +2,23 @@ package to.bitkit.ui.screens.wallets.receive
22
33import androidx.compose.foundation.Image
44import androidx.compose.foundation.layout.Arrangement
5+ import androidx.compose.foundation.layout.Box
56import androidx.compose.foundation.layout.Column
67import androidx.compose.foundation.layout.Row
78import androidx.compose.foundation.layout.Spacer
89import androidx.compose.foundation.layout.fillMaxWidth
910import androidx.compose.foundation.layout.height
10- import androidx.compose.foundation.layout.heightIn
1111import androidx.compose.foundation.layout.padding
1212import androidx.compose.runtime.Composable
1313import androidx.compose.runtime.remember
14+ import androidx.compose.ui.Alignment
1415import androidx.compose.ui.Modifier
1516import androidx.compose.ui.layout.ContentScale
1617import androidx.compose.ui.res.painterResource
1718import androidx.compose.ui.res.stringResource
1819import androidx.compose.ui.text.SpanStyle
1920import androidx.compose.ui.text.font.FontWeight
20- import androidx.compose.ui.tooling.preview.Devices.NEXUS_5
21- import androidx.compose.ui.tooling.preview.Devices.PIXEL
22- import androidx.compose.ui.tooling.preview.Devices.PIXEL_2
21+ import androidx.compose.ui.tooling.preview.Devices.PIXEL_TABLET
2322import androidx.compose.ui.tooling.preview.Preview
2423import androidx.compose.ui.unit.dp
2524import kotlinx.serialization.Serializable
@@ -119,52 +118,58 @@ private fun ReceiveConfirmContent(
119118 SheetTopBar (stringResource(R .string.wallet__receive_bitcoin), onBack = onBackClick)
120119 Spacer (Modifier .height(24 .dp))
121120
122- Column (
123- modifier = Modifier .padding(horizontal = 16 .dp )
121+ Box (
122+ modifier = Modifier .fillMaxWidth( )
124123 ) {
125- BalanceHeaderView (
126- sats = receiveSats,
127- modifier = Modifier .fillMaxWidth()
128- )
129- Spacer (modifier = Modifier .height(24 .dp))
130- BodyM (
131- text = stringResource(if (isAdditional) R .string.wallet__receive_connect_additional else R .string.wallet__receive_connect_initial)
132- .replace(" {networkFee}" , networkFeeFormatted)
133- .replace(" {serviceFee}" , serviceFeeFormatted)
134- .withAccent(
135- defaultColor = Colors .White64 ,
136- accentStyle = SpanStyle (color = Colors .White , fontWeight = FontWeight .Bold )
137- )
138- )
139- Spacer (modifier = Modifier .height(32 .dp))
140- Column {
141- Caption13Up (text = stringResource(R .string.wallet__receive_will), color = Colors .White64 )
142- Spacer (Modifier .height(4 .dp))
143- Title (text = receiveAmountFormatted)
144- }
145- Spacer (modifier = Modifier .weight(1f ))
124+
146125 Image (
147126 painter = painterResource(R .drawable.lightning),
148127 contentDescription = null ,
149128 contentScale = ContentScale .Fit ,
150129 modifier = Modifier
151- .heightIn(max = 256 .dp)
130+ .padding(bottom = 150 .dp)
152131 .fillMaxWidth()
132+ .align(Alignment .BottomCenter )
153133 )
154- Spacer (modifier = Modifier .weight(1f ))
155- Row (horizontalArrangement = Arrangement .spacedBy(16 .dp)) {
156- SecondaryButton (
157- text = stringResource(R .string.common__learn_more),
158- onClick = onLearnMoreClick,
159- modifier = Modifier .weight(1f )
134+
135+ Column (
136+ modifier = Modifier .padding(horizontal = 16 .dp)
137+ ) {
138+ BalanceHeaderView (
139+ sats = receiveSats,
140+ modifier = Modifier .fillMaxWidth()
160141 )
161- PrimaryButton (
162- text = stringResource(R .string.common__continue),
163- onClick = onContinueClick,
164- modifier = Modifier .weight(1f )
142+ Spacer (modifier = Modifier .height(24 .dp))
143+ BodyM (
144+ text = stringResource(if (isAdditional) R .string.wallet__receive_connect_additional else R .string.wallet__receive_connect_initial)
145+ .replace(" {networkFee}" , networkFeeFormatted)
146+ .replace(" {serviceFee}" , serviceFeeFormatted)
147+ .withAccent(
148+ defaultColor = Colors .White64 ,
149+ accentStyle = SpanStyle (color = Colors .White , fontWeight = FontWeight .Bold )
150+ )
165151 )
152+ Spacer (modifier = Modifier .height(32 .dp))
153+ Column {
154+ Caption13Up (text = stringResource(R .string.wallet__receive_will), color = Colors .White64 )
155+ Spacer (Modifier .height(4 .dp))
156+ Title (text = receiveAmountFormatted)
157+ }
158+ Spacer (modifier = Modifier .weight(1f ))
159+ Row (horizontalArrangement = Arrangement .spacedBy(16 .dp)) {
160+ SecondaryButton (
161+ text = stringResource(R .string.common__learn_more),
162+ onClick = onLearnMoreClick,
163+ modifier = Modifier .weight(1f )
164+ )
165+ PrimaryButton (
166+ text = stringResource(R .string.common__continue),
167+ onClick = onContinueClick,
168+ modifier = Modifier .weight(1f )
169+ )
170+ }
171+ Spacer (modifier = Modifier .height(32 .dp))
166172 }
167- Spacer (modifier = Modifier .height(32 .dp))
168173 }
169174 }
170175}
@@ -219,3 +224,19 @@ private fun Preview3() {
219224 )
220225 }
221226}
227+ @Preview(showBackground = true , name = " Tablet" , device = PIXEL_TABLET )
228+ @Composable
229+ private fun Preview4 () {
230+ AppThemeSurface {
231+ ReceiveConfirmContent (
232+ receiveSats = 12500L ,
233+ isAdditional = true ,
234+ networkFeeFormatted = " $0.50" ,
235+ serviceFeeFormatted = " $1.00" ,
236+ receiveAmountFormatted = " $100.00" ,
237+ onLearnMoreClick = {},
238+ onContinueClick = {},
239+ onBackClick = {},
240+ )
241+ }
242+ }
0 commit comments