The android/compose-samples repository is the official collection of Jetpack Compose sample applications maintained by Google. Written in Kotlin, it serves as a comprehensive learning resource for developers building Android user interfaces with Jetpack Compose. The repository contains multiple individual Android Studio projects, each demonstrating different use cases, complexity levels, and Compose APIs to help developers understand how to implement modern Android UI patterns.
The repository includes six primary sample applications. JetNews is a medium-complexity blog post viewer that demonstrates Compose integration with Material Design, real-world architecture patterns, light and dark themes, resource loading, and UI testing. Jetchat is a low-complexity chat application focusing on UI state patterns and text input, featuring Material Design 3 theming, Material You dynamic colors, and integration with Architecture Components including Navigation, Fragments, LiveData, and ViewModel. Jetsnack is a medium-complexity snack ordering app showcasing custom design systems, custom layouts, and animations. Jetcaster is an advanced podcast application featuring a Redux-style architecture, dynamic theming based on podcast artwork, image fetching, WindowInsets support, coroutines, and local storage with Room. Reply is a medium-complexity email client implementation of the Material Design study that emphasizes adaptive design for mobile, tablets, and foldables, with Material 3 theming and dynamic color support. JetLagged is a sleep tracker app demonstrating custom layouts and graphics creation using Paths in Compose.
Beyond the primary samples, the repository links to additional resources including Now in Android, a Compose-first application available on Google Play that implements recommended Android Architecture Guidelines and integrates Jetpack Libraries holistically, and the Material Catalog, which provides a comprehensive showcase of Material Design components available in Jetpack Compose with runtime theming capabilities.
The repository demonstrates specific technical patterns across multiple domains. Custom layout examples appear in the Interests Screen of JetNews, AnimatedFabContent in Jetchat, Grid implementation in Jetsnack, and CollapsingImageLayout in Jetsnack. Theming approaches are showcased through Material 3 implementation in Jetchat, custom theme generation based on cover art in Jetcaster, and custom design systems in Jetsnack. Animation patterns include AnimatedContent, animated theme colors, and animated bottom bar implementations. The samples also cover large screen support through supporting panes in Jetcaster and window size classes in JetNews, with dedicated TV and Wear implementations available for Jetcaster.
The repository maintains code quality through automated formatting scripts and spotless checks. Several sample projects including Crane, Owl, Jetsurvey, and Rally have been removed as of August 2024 to keep the repository navigable while remaining accessible in the version history.