Create a finite scrollable list
bookmark_borderbookmark
Stay organized with collections
Save and categorize content based on your preferences.
Scrollable lists can help manage datasets, create responsive designs, and
facilitate navigation. You can display smaller sets of items in your app
by using a finite scrolling list. To avoid performance issues with larger
datasets or a list of unknown length, see
Lazily load data with lists and Paging.
Version compatibility
This implementation requires that your project minSDK be set to API level 21 or
higher.
Dependencies
Create a vertical scrolling list
Use the following code to create a vertical scrolling list:
@Composable
private fun ScrollBoxes() {
Column(
modifier = Modifier
.background(Color.LightGray)
.size(100.dp)
.verticalScroll(rememberScrollState())
) {
repeat(10) {
Text("Item $it", modifier = Modifier.padding(2.dp))
}
}
}
Key points about the code
Results
Figure 1. A vertical scrolling list.
Collections that contain this guide
This guide is part of these curated Quick Guide collections that cover
broader Android development goals:
Display a list or grid
Lists and grids allow your app to display collections in a
visually pleasing form that's easy for users to consume.
Display interactive components
Learn how composable functions can enable you to easily
create beautiful UI components based on the Material Design design
system.
Compose basics (video collection)
This series of videos introduces various Compose APIs,
quickly showing you what’s available and how to use them.
Display and arrange collections of items efficiently with lists and grids.
Updated Feb 6, 2025
You can manage large datasets and dynamic content with lazy grids, improving app performance. With lazy grid composables, you can display items in a scrollable container, spanned across multiple columns or rows.
Updated Mar 4, 2025
Fostering compatibility between multiple devices is critical to designing apps that are adaptable to a wide range of devices.
Updated Feb 20, 2025
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-03-04 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-04 UTC."],[],[]]