This repository contains a set of individual Android Studio projects to help you learn about Compose in Android. Each sample demonstrates different use cases, complexity levels and APIs.
For more information, please read the documentation.
To try out these sample apps, you need to use Android Studio. You can clone this repository or import the project from Android Studio following the steps here.
Project | |
---|---|
A sample blog post viewer that demonstrates the use of Compose with a typical Material app and real-world architecture. β’ Medium complexity β’ Varied UI β’ Light & dark themes β’ Resource loading β’ UI Testing > Browse |
|
A sample chat app that focuses on UI state patterns and text input. β’ Low complexity β’ Material Design 3 theme and Material You dynamic color β’ Resource loading β’ Back button handling β’ Integration with Architecture Components: Navigation, Fragments, LiveData, ViewModel β’ Animation β’ UI Testing > Browse |
|
A sample survey app that showcases text input, validation and UI state management in Compose. β’ Low complexity β’ TextField and form validationβ’ Snackbar implementation β’ Element reusability and styling β’ Various form elements > Browse |
|
Jetsnack is a sample snack ordering app built with Compose. β’ Medium complexity β’ Custom design system β’ Custom layouts β’ Animation > Browse |
|
A sample podcast app that features a full-featured, Redux-style architecture and showcases dynamic themes. β’ Advanced sample β’ Dynamic theming using podcast artwork β’ Image fetching β’ WindowInsets supportβ’ Coroutines β’ Local storage with Room > Browse |
|
A Compose implementation of the Rally Material study, a financial app that focuses on data, charts, reusability and animations. β’ Low complexity β’ Material theming with a dark-only theme β’ Custom layouts and reusable elements β’ Charts and tables β’ Animations β’ Screenshot tests > Browse |
|
A Compose implementation of the Crane Material study, a travel app that uses Material Design components and Material Theming to create a personalized, on-brand experience. β’ Medium complexity β’ Draggable UI elements β’ UI state handling β’ UI Tests > Browse |
|
A Compose implementation of the Owl Material study. The Owl brand uses bold color, shape, and typography to express its brand attributes: energy, daring, and fun. β’ Medium complexity β’ Material theming & light/dark themes β’ Custom layout β’ Animation > Browse |
|
A compose implementation of the Reply material study, an email client app that focuses on adaptive design for mobile, tablets and foldables. It also showcases brand new Material design 3 theming, dynamic colors and navigation components. β’ Medium complexity β’ Adaptive UI for phones, tablet and desktops β’ Foldable support β’ Material 3 theming & Components β’ Dynamic colors and Light/Dark theme support > Browse |
|
A sample sleep tracker app, showcasing how to create custom layouts and graphics in Compose β’ Custom Layouts β’ Graphs with Paths > Browse |
Project | |
---|---|
An app for keeping up to date with the latest news and developments in Android. β’ Jetpack Compose first app. β’ Implements the recommended Android Architecture Guidelines β’ Integrates Jetpack Libraries holistically in the context of a real world app > Browse |
|
A catalog of Material Design components and features available in Jetpack Compose. See how to implement them and how they look and behave on real devices. β’ Lives in AOSPβalways up to date β’ Uses the same samples as API reference docs β’ Theme picker to change Material Theming values at runtime β’ Links to guidelines, docs, source code, and issue tracker > Browse on AOSP |
|
A gardening app illustrating Android development best practices with Android Jetpack. The compose branch is partially built with Jetpack Compose.β’ Compose working in an existing app: including integration with strings, resources, and themes and styles β’ Integration with an existing architecture based on Jetpack libraries β’ CollapsingToolbarLayout behavior implemented manually with Composeβ’ Showing Snackbars with Compose > Browse |
Looking for a sample that has the following features?
- Jetnews: Interests Screen
- Jetchat: AnimatedFabContent
- Jetsnack: Grid
- Jetsnack: CollapsingImageLayout
- Owl: Staggered Grid
- Crane: Calendar Selection Animation
- Crane: AnimatedContent
- Jetsurvey: AnimatedContent
- Jetcaster: Animated theme colors
- Owl: Transition - Topic Chip change
- Jetsnack: Animating Bottom Barl
- Owl: Bottom Sheet transforming
To automatically format all samples: Run ./scripts/format.sh
To check one sample for errors: Navigate to the sample folder and run ./gradlew --init-script buildscripts/init.gradle.kts spotlessCheck
To format one sample: Navigate to the sample folder and run ./gradlew --init-script buildscripts/init.gradle.kts spotlessApply
To update dependencies to their new stable versions, run:
./scripts/updateDeps.sh
To make any other manual updates to dependencies (ie add a new dependency or set an alpha version), update the /scripts/libs.versions.toml
file with changes, and then run duplicate_version_config.sh
to propogate the changes to all other samples. You can also update the toml-updater-config.gradle
file with changes that need to propogate to each sample.
Copyright 2022 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.