1
1
package kiwi.orbit.compose.catalog.screens
2
2
3
- import androidx.compose.foundation.Image
4
3
import androidx.compose.foundation.horizontalScroll
5
4
import androidx.compose.foundation.layout.Arrangement
6
5
import androidx.compose.foundation.layout.Box
@@ -25,16 +24,12 @@ import androidx.compose.runtime.saveable.rememberSaveable
25
24
import androidx.compose.runtime.setValue
26
25
import androidx.compose.ui.Alignment
27
26
import androidx.compose.ui.Modifier
28
- import androidx.compose.ui.text.style.TextOverflow
29
27
import androidx.compose.ui.tooling.preview.Preview
30
28
import androidx.compose.ui.unit.dp
31
29
import kiwi.orbit.compose.catalog.components.CustomPlaceholder
32
30
import kiwi.orbit.compose.icons.Icons
33
- import kiwi.orbit.compose.illustrations.Illustrations
34
31
import kiwi.orbit.compose.ui.controls.BadgeInfoSubtle
35
- import kiwi.orbit.compose.ui.controls.BadgeNeutral
36
32
import kiwi.orbit.compose.ui.controls.ChoiceTile
37
- import kiwi.orbit.compose.ui.controls.ChoiceTileCentered
38
33
import kiwi.orbit.compose.ui.controls.Icon
39
34
import kiwi.orbit.compose.ui.controls.Scaffold
40
35
import kiwi.orbit.compose.ui.controls.Stepper
@@ -205,66 +200,5 @@ private fun ChoiceTileScreenInner() {
205
200
onSelect = { selectedD = ! selectedD },
206
201
content = { },
207
202
)
208
-
209
- // Vertical padding to avoid clip issues on Android 12+ when over-scrolling.
210
- // https://issuetracker.google.com/issues/215652703
211
- var selectedE by rememberSaveable { mutableIntStateOf(- 1 ) }
212
- Row (
213
- Modifier
214
- .height(IntrinsicSize .Max )
215
- .padding(horizontal = 16 .dp)
216
- .padding(top = 12 .dp) // half of the badge
217
- .padding(top = 2 .dp, bottom = 4 .dp), // over-scroll workaround
218
- horizontalArrangement = Arrangement .spacedBy(8 .dp),
219
- ) {
220
- ChoiceTileCentered (
221
- modifier = Modifier
222
- .fillMaxHeight()
223
- .weight(1f ),
224
- selected = selectedE == 0 ,
225
- onSelect = { selectedE = 0 },
226
- title = { Text (" Plus Support" ) },
227
- description = { Text (" Everyone sits together" ) },
228
- price = { BadgeNeutral { Text (" Included" ) } },
229
- )
230
-
231
- ChoiceTileCentered (
232
- modifier = Modifier
233
- .fillMaxHeight()
234
- .weight(1f ),
235
- selected = selectedE == 1 ,
236
- onSelect = { selectedE = 1 },
237
- icon = {
238
- Image (
239
- painter = Illustrations .Boarding ,
240
- contentDescription = null ,
241
- Modifier .height(60 .dp),
242
- )
243
- },
244
- title = { Text (" Plus Support" ) },
245
- description = { Text (" Everyone sits together" ) },
246
- price = { Text (" + 10 €" ) },
247
- )
248
-
249
- ChoiceTileCentered (
250
- modifier = Modifier
251
- .fillMaxHeight()
252
- .weight(1f ),
253
- selected = selectedE == 2 ,
254
- onSelect = { selectedE = 2 },
255
- badgeContent = {
256
- Text (
257
- " Recommended Very Much" ,
258
- maxLines = 1 ,
259
- overflow = TextOverflow .Ellipsis ,
260
- )
261
- },
262
- icon = { Icon (painter = Icons .BaggageSet , contentDescription = null ) },
263
- title = { Text (" Plus Support" ) },
264
- description = { Text (" Everyone sits together" ) },
265
- price = { Text (" + 10 €" ) },
266
- largeHeading = false ,
267
- )
268
- }
269
203
}
270
204
}
0 commit comments