Advertisement
Guest User

Untitled

a guest
Mar 3rd, 2024
14
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. Column {
  2. JetsnackDivider()
  3. Row(
  4. verticalAlignment = Alignment.CenterVertically,
  5. modifier = Modifier
  6. .navigationBarsPadding()
  7. .then(HzPadding)
  8. .heightIn(min = BottomBarHeight)
  9. ) {
  10. QuantitySelector(
  11. count = count,
  12. decreaseItemCount = { if (count > 0) updateCount(count - 1) },
  13. increaseItemCount = { updateCount(count + 1) }
  14. )
  15. Spacer(Modifier.width(16.dp))
  16. JetsnackButton(
  17. onClick = { /* todo */ },
  18. modifier = Modifier.weight(1f)
  19. ) {
  20. Text(
  21. text = stringResource(R.string.add_to_cart),
  22. modifier = Modifier.fillMaxWidth(),
  23. textAlign = TextAlign.Center,
  24. maxLines = 1
  25. )
  26. }
  27. }
  28. }
  29.  
  30.  
  31. //--------------
  32.  
  33.  
  34. val tabs = listOf("Home", "About", "Settings")
  35.  
  36. Column(modifier = Modifier.fillMaxWidth()) {
  37. TabRow(selectedTabIndex = tabIndex) {
  38. tabs.forEachIndexed { index, title ->
  39. Tab(text = { Text(title) },
  40. selected = tabIndex == index,
  41. onClick = { tabIndex = index }
  42. )
  43. }
  44. }
  45.  
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement