Community-driven collection of Jetpack Compose example code and tutorials :rocket:  https://foso.github.io/compose
<h1 align="center">Jetpack Compose Playground</h1>

## Introduction 🙋‍♂️
This is an Jetpack Compose example project. I'm collecting a bunch of sample codes for Jetpack Compose. I also collect informations/tutorials on the GitHub page https://foso.github.io/compose.

[![Kotlin](https://img.shields.io/badge/Kotlin-1.7.20-green.svg)]() [![Compose](https://img.shields.io/badge/Compose-1.3.3-green.svg)]()

[![jCenter](https://img.shields.io/badge/MIT-green.svg)](https://github.com/Foso/Jetpack-Compose-Playground/blob/master/LICENSE)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
![Android Weekly](https://androidweekly.net/issues/issue-431/badge)
[![Contributors](https://img.shields.io/github/contributors/Foso/Jetpack-Compose-Playground.svg)](#contributors)

### Show some :heart: and star the repo to support the project

[![GitHub stars](https://img.shields.io/github/stars/Foso/Jetpack-Compose-Playground.svg?style=social&label=Star)](https://github.com/Foso/Jetpack-Compose-Playground) [![GitHub forks](https://img.shields.io/github/forks/Foso/Jetpack-Compose-Playground.svg?style=social&label=Fork)](https://github.com/Foso/Jetpack-Compose-Playground/fork) [![GitHub watchers](https://img.shields.io/github/watchers/Foso/Jetpack-Compose-Playground.svg?style=social&label=Watch)](https://github.com/Foso/Jetpack-Compose-Playground) [![Twitter Follow](https://img.shields.io/twitter/follow/jklingenberg_.svg?style=social)](https://twitter.com/jklingenberg_) <a href="https://twitter.com/intent/tweet?text=Hey, check out Jetpack-Compose-Playground https://github.com/Foso/Jetpack-Compose-Playground via @jklingenberg_ #Android
"><img src="https://img.shields.io/twitter/url/https/github.com/angular-medellin/meetup.svg?style=social" alt="Tweet"></a>
## Composable of the week!! 🎉
The [SubComposeLayout](https://foso.github.io/Jetpack-Compose-Playground/ui/layout/subcomposelayout/)

## New to Compose?
Check [Compose for Android Developers](https://foso.github.io/Jetpack-Compose-Playground/compose_for/android_devs/) or [Hello World Compose](https://foso.github.io/Jetpack-Compose-Playground/general/helloworld/)

## 📙 Jetpack Compose examples/tutorials and demos
Look in the [repo](https://github.com/Foso/Jetpack-Compose-Playground/tree/master/app/src/main/java/de/jensklingenberg/jetpackcomposeplayground/mysamples/github) or take a look at the GitHub page: https://foso.github.io/compose

### Animation
* [Crossfade](https://foso.github.io/Jetpack-Compose-Playground/animation/crossfade)

### Layouts
* [ConstraintLayout](https://foso.github.io/Jetpack-Compose-Playground/layout/constraintlayout)
* [Scaffold](https://foso.github.io/Jetpack-Compose-Playground/material/scaffold)
* [Column](https://foso.github.io/Jetpack-Compose-Playground/layout/column)
* [Row](https://foso.github.io/Jetpack-Compose-Playground/layout/row)
* [Stack](https://foso.github.io/Jetpack-Compose-Playground/layout/stack)

### Foundation
* [Canvas](https://foso.github.io/Jetpack-Compose-Playground/foundation/canvas)
* [Image](https://foso.github.io/Jetpack-Compose-Playground/foundation/image)
* [LazyColumn](https://foso.github.io/Jetpack-Compose-Playground/foundation/lazycolumn)
* [LazyRow](https://foso.github.io/Jetpack-Compose-Playground/foundation/lazyrow)
* [Shape](https://foso.github.io/Jetpack-Compose-Playground/foundation/shape)
* [Text](https://foso.github.io/Jetpack-Compose-Playground/foundation/text)

### Material
* [AlertDialog](https://foso.github.io/Jetpack-Compose-Playground/material/alertdialog)
* [BadgeBox](https://foso.github.io/Jetpack-Compose-Playground/material/badgedbox/)
* Buttons: [Button](https://foso.github.io/Jetpack-Compose-Playground/material/button), [FloatingActionButton](https://foso.github.io/Jetpack-Compose-Playground/material/floatingactionbutton/), [OutlinedButton](https://foso.github.io/Jetpack-Compose-Playground/material/button/), [TextButton](https://foso.github.io/Jetpack-Compose-Playground/material/button/)
* [Card](https://foso.github.io/Jetpack-Compose-Playground/material/card)
* [Divider](https://foso.github.io/Jetpack-Compose-Playground/material/divider)
* [DropdownMenu](https://foso.github.io/Jetpack-Compose-Playground/material/dropdownmenu/)
* [ModalBottomSheetLayout](https://foso.github.io/Jetpack-Compose-Playground/material/modalbottomsheetlayout/)
* [ModalDrawerLayout](https://foso.github.io/Jetpack-Compose-Playground/material/modaldrawer)
* [NavigationRail](https://foso.github.io/Jetpack-Compose-Playground/material/navigationrail/)
* Progress Indicators: [CircularProgressIndicator](https://foso.github.io/Jetpack-Compose-Playground/material/circularprogressindicator), [LinearProgressIndicator](https://foso.github.io/Jetpack-Compose-Playground/material/linearprogressindicator/)
* [Scaffold](https://foso.github.io/Jetpack-Compose-Playground/material/scaffold)
* Selection Controls: [Checkbox](https://foso.github.io/Jetpack-Compose-Playground/material/checkbox), [RadioButton](https://foso.github.io/Jetpack-Compose-Playground/material/radiobutton), [Switch](https://foso.github.io/Jetpack-Compose-Playground/material/switch)
* [Slider](https://foso.github.io/Jetpack-Compose-Playground/material/slider/)
* [Snackbar](https://foso.github.io/Jetpack-Compose-Playground/material/snackbar/)
* [Surface](https://foso.github.io/Jetpack-Compose-Playground/material/surface/)
* [Text](https://foso.github.io/Jetpack-Compose-Playground/foundation/text/)
* [TextField](https://foso.github.io/Jetpack-Compose-Playground/material/textfield)
* [TopAppBar](https://foso.github.io/Jetpack-Compose-Playground/material/topappbar/)

### Cookbook

* [Overview](https://foso.github.io/Jetpack-Compose-Playground/cookbook/overview/)
* [Handle changes to a TextField](https://foso.github.io/Jetpack-Compose-Playground/cookbook/textfield_changes/)


> Some of the code samples in this Repository:

| Overview | DialogExample |  CircularProgress |
| ------------------ | --------------------------- | ------------------ |
|<img src="https://github.com/Foso/Jetpack-Compose-Playground/blob/master/docs/images/readme/DemoActivity.png" height="400" alt="Screenshot"/> | <img src="https://raw.githubusercontent.com/Foso/Jetpack-Compose-Playground/master/docs/images/DialogExample.png" height="400" alt="Screenshot"/>  | <img src="https://github.com/Foso/Jetpack-Compose-Playground/blob/master/docs/images/readme/circprog.png" height="400" alt="Screenshot"/> |

</p>

### Project Structure

* <kbd>[/app](https://github.com/Foso/Jetpack-Compose-Playground/tree/master/app)</kbd> - Android project directory

# Resources

## Talks
| Name                                    | Description  |
| ----------------------------------------- | ------------------------------------ |
| [Thinking in Compose](https://www.youtube.com/watch?v=SMOhl9RK0BA)  		    | Jetpack Compose is the new next generation UI toolkit. It uses a declarative component based paradigm for building UIs easily and quickly. It’s written entirely in Kotlin and embraces the style and ergonomics of the Kotlin language.  |
| [Compose by example](https://www.youtube.com/watch?v=DDd6IOlH3io)  		    | Jetpack Compose is a new declarative UI toolkit built for the demands of creating modern user interfaces. Get started with Compose and learn about the new APIs and Material components that make up the toolkit by examining concrete UIs we’ve created with it. We’ll walk through examples of theming, animation, layout and more, demonstrating how to customize and combine components to build real UIs. We’ll show how the new toolkit simplifies your development experience and enables new possibilities. |
| [Compose for existing apps](https://www.youtube.com/watch?v=PjQdFmiDgwk)  		    | Jetpack Compose is now in alpha and you might want to start adding it to your existing apps. In this talk, you'll learn how to do that! We'll cover topics such as: adding Compose to your existing Views and embedding Views in Compose, using your existing View theme and current app architecture in Compose, testing all of that code, and much more.  |
| [Jetpack Compose](https://www.youtube.com/watch?v=U5BwfqBpiWU)  		    | Jetpack Compose is Android’s new modern UI toolkit. Learn how Compose simplifies & accelerates your UI development, allowing you to create richer, more robust and responsive UIs. We outline our roadmap, what is ready for use right now, share our direction in areas that are still evolving, and show how the tight integration with tooling makes the development experience even better. Get up to speed with Compose and how it can help you to build better apps! |
| [droidcon Online 2020: Become A Composer By Brian Gardner ](https://www.droidcon.com/media-detail?video=412304809)  		    | |
| [KotlinConf 2019: The Compose Runtime, Demystified by Leland Richardson](https://www.youtube.com/watch?v=6BRlI5zfCCk)  		    | Jetpack Compose is an ambitious multi-team effort to reimagine Android's UI Toolkit more than 10 years after the Android Platform launched with the original UI Toolkit. Compose follows a declarative programming model, and the runtime is coupled with a Kotlin compiler plugin to enable a novel new approach to declarative programming. In this talk, Leland will go over the mechanics of how the Compose runtime and compiler plugin work together, demystifying how it can be used to enable efficient and performant user interfaces. In addition, this talk will describe how Compose can operate completely independent of the Android Platform and Compose UI, allowing it to be used as a general language feature for Incremental Computing and the management of tree-like data structures. |
| [KotlinConf 2019: Compose Yourself: Designing a Kotlin First UI Toolkit by Anna-Chiara & Clara](https://www.youtube.com/watch?v=WqnR_XhEiVI)  		    | #Jetpack Compose is an unbundled UI Toolkit for #Android, designed to simplify UI development. It combines a reactive programming model with the conciseness and ease of use of Kotlin. Learn directly from engineers on the project about the decisions that went into making this toolkit and how a Kotlin-first approach has influenced API design from the project's inception. |
| [What's New in Jetpack Compose (Android Dev Summit '19)](https://www.youtube.com/watch?v=dtm2h-_sNDQ&list=PLWz5rJ2EKKc_xXXubDti2eRnIKU0p7wHd&index=8&t=0s)  		    | Jetpack Compose was announced at Google I/O and the team has been hard at work ever since. This talk introduces Compose to new audiences, including what the project is and how it is taking shape. The talk also updates people who already know about Jetpack Compose, including how the project has evolved. |
| [Understanding Compose (Android Dev Summit '19)](https://www.youtube.com/watch?v=Q9MtlmmN4Q0)  		    | This session covers the benefits of a declarative reactive UI system like Jetpack Compose and how it applies to real problems that Android developers have today. Additionally, this talk expands on the programming model of Jetpack Compose and some of its implementation details the can help you understand how Compose works. |
| [#AskAndroid at Android Dev Summit 2019 - Jetpack Compose](https://www.youtube.com/watch?v=oEy6nJaMtLM)  		    | Missed the #AskAndroid livestream segment of Android Dev Summit 2019? Don’t worry, we got you covered. Hosts Lyla Fujiwara and Dan Galpin are joined by Anna-Chiara Bellini and Adam Powell to discuss Jetpack Compose questions submitted by Android developers online. Anna-Chiara Bellini is a product manager, and Adam Powell is an engineering lead.  |
| [Google IO19 - Declarative UI patterns](https://youtu.be/VsStyq4Lzxo)  		    | Explore how reactive and declarative paradigms can be applied to Android UI development, making it easier for developers to integrate these patterns into their Android apps with Kotlin. |
| [DroidconBerlin - Jetpack Compose — Next Gen Kotlin UI Toolkit for Android](https://www.droidcon.com/media-detail?video=353079951)  		    | |
| [DroidconBerlin -  Jumping into Jetpack Compose way too early to see what's inside](https://www.droidcon.com/media-detail?video=352686988)  		    | |
| [KotlinEverywhere - Jetpack Compose](https://www.youtube.com/watch?v=I5zRmCheVVg) 		    | |
| [DevFest Kolkata 2019 - Let's Talk Composing UI](https://www.youtube.com/watch?v=kfNC-MKAGzc) 		    | |

## Podcasts
| Name                                    | Episode | Description  |
| ----------------------------------------- | ------------------------------------ | -- |
| Android Developers Backstage | [Episode 147](http://androidbackstage.blogspot.com/2020/08/episode-147-jetpack-compose-alpha.html) | Jetpack Compose Alpha |
| Android Developers Backstage | [Episode 131](http://androidbackstage.blogspot.com/2020/01/episode-131-jetpack-compose-and.html) | Jetpack Compose and Declarative UIs |
| Android Developers Backstage | [Episode 115](http://androidbackstage.blogspot.com/2019/06/episode-115-jetpack-compose.html) 	| Jetpack Compose |
| Fragmented Podcast | [Episode 171](https://fragmentedpodcast.com/episodes/172/) | Jetpack Compose with Leland Richardson |
| The Kodeco Podcast | [S09 E09](https://podcasts.google.com/?feed=aHR0cHM6Ly93d3cucmF5d2VuZGVybGljaC5jb20vY2F0ZWdvcnkvcG9kY2FzdC9mZWVk&episode=aHR0cHM6Ly93d3cucmF5d2VuZGVybGljaC5jb20vP3A9MjMxMjI0&hl=en-IN&ep=6&at=1567914736470) | Google’s Android Toolkit Lead Developer Romain Guy |

## Other Links

| Name                                    | Description  |
| ----------------------------------------- | ------------------------------------ |
| [Jetpack Compose](https://developer.android.com/jetpack/compose)  		    | |
| [Jetpack Compose UI Readme](https://android.googlesource.com/platform/frameworks/support/+/refs/heads/androidx-master-dev/ui/README.md)  		    | |
| [Compose Readme](https://android.googlesource.com/platform/frameworks/support/+/refs/heads/androidx-master-dev/compose/) 		    | |
| [Video - Kotlin and Jetpack Compose](https://www.youtube.com/watch?v=KjQU_QrlbEI)  		    | |
| `#compose` channel on [Kotlin Slack](https://surveys.jetbrains.com/s3/kotlin-slack-sign-up)  		    | |
| [Compose from first Principles ](http://intelligiblebabble.com/compose-from-first-principles/)  		    | |
| [Jetpack Compose Tutorial ](https://developer.android.com/jetpack/compose)  		    | |
| [AndroidX Git Compose](https://android.googlesource.com/platform/frameworks/support/+/refs/heads/androidx-master-dev/compose/)  		    | |
| [Release Notes](https://developer.android.com/jetpack/androidx/releases/ui)  		    | |
| [Compse UI Docu](https://developer.android.com/reference/kotlin/androidx/ui/packages)  		    | |
| [Video - Jetpack compose - MVVM State management in a simple way](https://youtu.be/KTvP27FpXd0)  		    | |
| [Jetpack Compose Twitter Bot](https://twitter.com/ComposeBot)  		    | |
| [SSComposeCookBook](https://github.com/SimformSolutionsPvtLtd/SSComposeCookBook/)  		    | |
| [SSJetPackComposeProgressButton](https://github.com/SimformSolutionsPvtLtd/SSJetPackComposeProgressButton/)  		    | |
| [SSJetpackComposeSwipeableView](https://github.com/SimformSolutionsPvtLtd/SSJetpackComposeSwipeableView/)  		    | |
| [SSComposeOTPPinView](https://github.com/SimformSolutionsPvtLtd/SSComposeOTPPinView)  		    | |

Feel free to contribute!

## ✍️ Feedback

If you want to improve Compose, join the [Kotlin Slack](https://slack.kotlinlang.org) and the #compose channel or file a Compose bug on the [Google Issue Tracker](https://issuetracker.google.com/issues?q=componentid:612128)

### Find this project useful? :heart:
* Support it by clicking the :star: button on the upper right of this page. :v:

## 

<p>
  <div style="vertical-align: baseline;">This project is proudly supported by JetBrains OSS License</div>
  <a href="https://jb.gg/OpenSourceSupport"><img src="https://github.com/cherryleafroad/kmagick/blob/main/readme_files/jb_beam.png" height="150px" width="150px"/></a>
</p>

[License](https://github.com/Foso/Jetpack-Compose-Playground/blob/master/LICENSE)
-------

 ```
MIT License

Copyright (c) 2019 Jens Klingenberg

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

## Acknowledgments
Projects that helped me understand how to setup the project:
* [Mishkun/try-compose
](https://github.com/Mishkun/try-compose)

