Last active
April 26, 2022 15:58
-
-
Save ekeitho/92c7504b3ecfba055436e1d0eb1573fd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun ContactListWithScroller( | |
contacts: List<Contact>, | |
) { | |
val mapOfFirstLetterIndex = remember(contacts) { contacts.getFirstUniqueSeenCharIndex() } | |
Row( | |
modifier = Modifier.fillMaxSize(), | |
verticalAlignment = Alignment.CenterVertically, | |
) { | |
ContactList( | |
modifier = Modifier.fillMaxHeight().weight(1F), | |
contacts = contacts, | |
mapOfFirstLetterIndex = mapOfFirstLetterIndex | |
) | |
AlphabetScroller() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Without the
fillMaxHeight()
when we have small number of contacts it would look like this: