Accompanist pager question: This card shows nothi...
# compose
c
Accompanist pager question: This card shows nothing on purpose and is a very small size. maybe like 24.dps in height.
Copy code
Card(
    modifier = Modifier.padding(horizontal = 16.dp).fillMaxWidth().align(BottomCenter),
    elevation = 8.dp) { //nothing }
When I add a HorizontalPager (replace where it says //nothing with the HP), then the card height becomes the size of the screen. Why and how do you make it only take up the height of the Text?
Copy code
HorizontalPager(count = 10) { page ->
  // Our page content
  Text(text = "Page: $page", modifier = Modifier.fillMaxWidth())
}
j
Have you tried setting the height of the Card to IntrinsicSize.Min?
j
s
This ^^ was merged in
v0.21.4-beta
so could you try that and say if it fixes it or not?
c
That worked! Thanks
đź‘Ź 1