11package to.bitkit.ui.screens.transfer
22
33import androidx.compose.foundation.Image
4- import androidx.compose.foundation.layout.Box
54import androidx.compose.foundation.layout.Column
65import androidx.compose.foundation.layout.Spacer
76import androidx.compose.foundation.layout.fillMaxWidth
87import androidx.compose.foundation.layout.height
98import androidx.compose.foundation.layout.padding
10- import androidx.compose.foundation.layout.size
119import androidx.compose.material3.CenterAlignedTopAppBar
1210import androidx.compose.material3.ExperimentalMaterial3Api
1311import androidx.compose.runtime.Composable
@@ -20,6 +18,7 @@ import androidx.compose.ui.Modifier
2018import androidx.compose.ui.layout.ContentScale
2119import androidx.compose.ui.res.painterResource
2220import androidx.compose.ui.res.stringResource
21+ import androidx.compose.ui.tooling.preview.Devices.NEXUS_5
2322import androidx.compose.ui.tooling.preview.Preview
2423import androidx.compose.ui.unit.dp
2524import com.synonym.bitkitcore.regtestMine
@@ -110,6 +109,7 @@ private fun SettingUpScreen(
110109 actions = { CloseNavIcon (onCloseClick) },
111110 )
112111 Column (
112+ horizontalAlignment = Alignment .CenterHorizontally ,
113113 modifier = Modifier
114114 .fillMaxWidth()
115115 .padding(horizontal = 16 .dp)
@@ -119,6 +119,7 @@ private fun SettingUpScreen(
119119 Display (
120120 text = stringResource(R .string.lightning__savings_progress__title)
121121 .withAccent(accentColor = Colors .Purple ),
122+ modifier = Modifier .fillMaxWidth(),
122123 )
123124 Spacer (modifier = Modifier .height(8 .dp))
124125 BodyM (
@@ -129,6 +130,7 @@ private fun SettingUpScreen(
129130 Display (
130131 text = stringResource(R .string.lightning__transfer_success__title_spending)
131132 .withAccent(accentColor = Colors .Purple ),
133+ modifier = Modifier .fillMaxWidth(),
132134 )
133135 Spacer (modifier = Modifier .height(8 .dp))
134136 BodyM (
@@ -141,6 +143,7 @@ private fun SettingUpScreen(
141143 TransferAnimationView (
142144 largeCircleRes = R .drawable.ln_sync_large,
143145 smallCircleRes = R .drawable.ln_sync_small,
146+ modifier = Modifier .weight(1f )
144147 )
145148 Spacer (modifier = Modifier .height(16 .dp))
146149 val steps = listOf (
@@ -157,23 +160,16 @@ private fun SettingUpScreen(
157160 .align(alignment = Alignment .CenterHorizontally )
158161 )
159162 } else {
160- Box (
161- contentAlignment = Alignment .Center ,
163+ Image (
164+ painter = painterResource(id = R .drawable.check),
165+ contentDescription = null ,
166+ contentScale = ContentScale .Fit ,
162167 modifier = Modifier
163- .fillMaxWidth()
164- .padding(horizontal = 16 .dp)
165- .padding(top = 16 .dp)
166- ) {
167- Image (
168- painter = painterResource(id = R .drawable.check),
169- contentDescription = null ,
170- contentScale = ContentScale .Fit ,
171- modifier = Modifier .size(256 .dp)
172- )
173- }
168+ .weight(1f )
169+ .padding(16 .dp)
170+ )
174171 }
175172
176- Spacer (modifier = Modifier .weight(1f ))
177173
178174 val randomOkText = localizedRandom(R .string.common__ok_random)
179175 PrimaryButton (
@@ -199,6 +195,16 @@ private fun SettingUpScreenProgressPreview() {
199195 }
200196}
201197
198+ @Preview(name = " Progress" , showSystemUi = true , showBackground = true , device = NEXUS_5 )
199+ @Composable
200+ private fun SettingUpScreenProgressSmallPreview () {
201+ AppThemeSurface {
202+ SettingUpScreen (
203+ lightningSetupStep = 2 ,
204+ )
205+ }
206+ }
207+
202208@Preview(name = " Success" , showSystemUi = true , showBackground = true )
203209@Composable
204210private fun SettingUpScreenSuccessPreview () {
@@ -208,3 +214,13 @@ private fun SettingUpScreenSuccessPreview() {
208214 )
209215 }
210216}
217+
218+ @Preview(name = " Success" , showSystemUi = true , showBackground = true , device = NEXUS_5 )
219+ @Composable
220+ private fun SettingUpScreenSuccessSmallPreview () {
221+ AppThemeSurface {
222+ SettingUpScreen (
223+ lightningSetupStep = 3 ,
224+ )
225+ }
226+ }
0 commit comments