Skip to content

Commit 515030d

Browse files
committedAug 21, 2020
New main README and project README fixes
Staged in https://github.com/JoseAlcerreca/compose-readme/blob/master/README.md Change-Id: I6315cd1b7a33a01b165722404c7a83c85bd3fd71
1 parent 6c46b3c commit 515030d

23 files changed

+55
-50
lines changed
 

‎JetNews/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ This screen dives into the Text API, showing how to use different fonts than the
5555
[`Typograhy`][5]. It also adds a bottom appbar, with custom actions.
5656

5757
[4]: app/src/main/java/com/example/jetnews/ui/article
58-
[5]: app/src/main/java/com/example/jetnews/ui/Typography.kt
58+
[5]: app/src/main/java/com/example/jetnews/ui/theme/Type.kt
5959

6060
### Interests screen
6161

‎Jetcaster/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ This sample contains 1 screen so far: the home screen. It is split into sub-scre
2626
### Dynamic theming
2727
The home screen currently implements dynamic theming, using the artwork of the currently selected podcast from the carousel to update the `primary` and `onPrimary` [colors](https://developer.android.com/reference/kotlin/androidx/compose/material/Colors). You can see it in action in the screenshots above: as the carousel item is changed, the background gradient is updated to match the artwork.
2828

29-
This is impemented in [`DynamicTheming.kt`](app/src/main/java/com/example/jetcaster/util/DynamicTheming.kt), which provides the `DynamicThemePrimaryColorsFromImage` composable, to automatically animate the theme colors based on the provided image URL, like so:
29+
This is implemented in [`DynamicTheming.kt`](app/src/main/java/com/example/jetcaster/util/DynamicTheming.kt), which provides the `DynamicThemePrimaryColorsFromImage` composable, to automatically animate the theme colors based on the provided image URL, like so:
3030

3131
``` kotlin
3232
val dominantColorState: DominantColorState = rememberDominantColorState()
@@ -81,7 +81,7 @@ The podcast data in this sample is dynamically fetched from a number of podcast
8181
The [`PodcastRepository`][podcastrepo] class is responsible for handling the data fetching of all podcast information:
8282

8383
- Each podcast is fetched using [OkHttp][okhttp], and then parsed using [Rome][rome], within [`PodcastFetcher`][fetcher].
84-
- The parsed entites are then added to the local data stores: [`PodcastStore`][podcaststore], [`EpisodeStore`][epstore] & [`CategoryStore`][catstore] for storage in the local [Room][room] [`JetcasterDatabase`][db] database.
84+
- The parsed entities are then added to the local data stores: [`PodcastStore`][podcaststore], [`EpisodeStore`][epstore] & [`CategoryStore`][catstore] for storage in the local [Room][room] [`JetcasterDatabase`][db] database.
8585

8686
### Follow podcasts
8787

‎Jetsurvey/README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ showcase text input, validation and state capabilities of Compose.
66

77
Screenshots
88
-----------
9-
<img src="/screenshots/welcome.png" width="425"/> <img src="/screenshots/light_signin.png" width="425"/> <img src="/screenshots/dark_signin.png" width="425"/>
10-
11-
<img src="/screenshots/signup_error.png" width="425"/> <img src="/screenshots/survey.gif" width="425"/>
9+
<img src="screenshots/survey.gif" width="425"/>
1210

1311
## Features
1412

‎Owl/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Compose makes it simple to create a library of components and use them throughou
3939
#### [Utilities](app/src/main/java/com/example/owl/ui/utils/)
4040
Owl implements some utility functions of interest:
4141
* [Window insets](https://goo.gle/compose-insets) will likely be provided by the Compose library at some point. Until then this demonstrates how it can be implemented.
42-
* [Navigation](app/src/main/java/com/example/owl/ui/Navigation.kt): an implementation of [Android Architecture Components Navigation](https://developer.android.com/guide/navigation) will be provided for Compose at some point. Until then this class provides a simple [`Navigator`](app/src/main/java/com/example/owl/ui/Navigation.kt#L32) with back-stack and a [`backHandler`](app/src/main/java/com/example/owl/ui/Navigation.kt#L79) effect.
42+
* [Navigation](app/src/main/java/com/example/owl/ui/utils/Navigation.kt): an implementation of [Android Architecture Components Navigation](https://developer.android.com/guide/navigation) will be provided for Compose at some point. Until then this class provides a simple [`Navigator`](app/src/main/java/com/example/owl/ui/utils/Navigation.kt#L32) with back-stack and a [`backHandler`](app/src/main/java/com/example/owl/ui/utils/Navigation.kt#L79) effect.
4343

4444
## Data
4545
Domain types are modelled in the [model package](app/src/main/java/com/example/owl/model), each containing static sample data exposed using fake `Repo`s objects.

‎README.md

+49-42
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,51 @@
1-
# Compose Samples Repository
1+
# Jetpack Compose Samples
2+
<img src="readme/samples_montage.gif" alt="Jetpack Compose Samples" width="1024" />
23

34
This repository contains a set of individual Android Studio projects to help you learn about
4-
[Jetpack Compose](https://developer.android.com/jetpack/compose), Android's new modern UI toolkit.
5-
6-
<img src="screenshots/samples_montage.gif">
7-
8-
## Samples
9-
10-
### [Jetnews](Jetnews/)
11-
A sample blog post viewer that demonstrates a variety of UI components, light/dark themes and a basic architecture.
12-
13-
### [Jetchat](Jetchat/)
14-
15-
Todo(jalc)
16-
17-
### [Jetsurvey](JetSurvey/)
18-
19-
A sample survey app showcasing text input, validation and state handling.
20-
21-
### [Jetsnack](Jetsnack/)
22-
23-
A sample snack-ordering app showcasing how to implement a custom design system.
24-
25-
### [Jetcaster](Jetcaster/)
26-
27-
A sample podcast app showcasing dynamic theming and a full featured architecture.
28-
29-
### [Owl](owl/)
30-
31-
A sample education app showcasing theming with Material Design.
32-
33-
### [Crane](Crane/)
34-
35-
A sample travel app showcasing Material components, draggable UI elements, interop with Android Views
36-
inside Compose and UI state handling.
37-
38-
### [Rally](Rally/)
39-
40-
Todo(jalc)
41-
42-
## Requirements
43-
44-
[Android Studio 4.2](https://developer.android.com/studio/preview/index.html) or newer.
5+
Compose in Android. Each sample demonstrates different use cases, complexity levels and APIs.
6+
7+
For more information, please [read the documentation](https://developer.android.com/jetpack/compose)
8+
9+
💻 Requirements
10+
------------
11+
[Android Studio 4.2 Canary](https://developer.android.com/studio/preview/index.html) or newer.
12+
13+
🧬 Samples
14+
------------
15+
16+
17+
| Project | |
18+
|:-----|---------|
19+
| <br><img src="readme/jetnews.png" alt="JetNews" width="240"></img> <br><br> A sample blog post viewer that demonstrates the use of Compose with a typical Material app and real-world architecture. <br><br> • Medium complexity<br>• Varied UI<br>• Light & dark themes<br>• Resource loading<br>• UI Testing <br><br> **[> Browse](JetNews/)**<br><br> | <img src="readme/screenshots/JetNews.png" width="320" alt="Jetnews sample demo"> |
20+
| | |
21+
| <br><img src="readme/jetchat.png" alt="Jetchat" width="240"></img> <br><br>A sample chat app that focuses on UI state patterns and text input.<br><br>• Low complexity<br>• Simple Material Design theme (Light & dark)<br>• Resource loading<br>• Back button handling<br>• Integration with Architecture Components: Navigation, Fragments, LiveData, ViewModel<br>• Animation<br>• UI Testing<br><br>**[> Browse](Jetchat/)** <br><br> | <img src="readme/screenshots/Jetchat.png" width="320" alt="Jetchat sample demo">|
22+
| | |
23+
| <br><img src="readme/jetsurvey.png" alt="Jetsurvey" width="240"></img> <br><br>A sample survey app that showcases text input, validation and UI state management in Compose.<br><br>• Low complexity<br>• `TextField` and form validation<br>• Snackbar implementation<br>• Element reusability and styling<br>• Various form elements<br><br><br>**[> Browse](Jetsurvey/)** <br><br> | <img src="readme/screenshots/Jetsurvey.png" width="320" alt="Jetsurvey sample demo"> |
24+
| | |
25+
| <br><img src="readme/jetsnack.png" alt="Jetsnack" width="240"></img> <br><br>Jetsnack is a sample snack ordering app built with Compose.<br><br>• Medium complexity<br>• Custom design system<br>• Custom layouts<br>• Animation<br><br>**[> Browse](Jetsnack/)** <br><br> | <img src="readme/screenshots/Jetsnack.png" width="320" alt="Jetsnack sample demo">|
26+
| | |
27+
| <br><img src="readme/jetcaster.png" alt="Jetcaster" width="240"></img> <br><br>A sample podcast app that features a full-featured, Redux-style architecture and showcases dynamic themes.<br><br>• Advanced sample<br>• Dynamic theming using podcast artwork<br>• Image fetching<br>• [`WindowInsets`](https://developer.android.com/reference/kotlin/android/view/WindowInsets) support<br>• Coroutines<br>• Local storage with Room<br><br>**[> Browse](Jetcaster/)** <br><br> | <img src="readme/screenshots/Jetcaster.png" width="320" alt="Jetcaster sample demo">|
28+
| | |
29+
| <br><img src="readme/rally.png" alt="Rally" width="240"></img> <br><br>A Compose implementation of the Rally Material study, a financial app that focuses on data, charts, reusability and animations.<br><br>• Low complexity<br>• Material theming with a dark-only theme<br>• Custom layouts and reusable elementss<br>• Charts and tables<br>• Animations<br>• Screenshot tests<br><br>**[> Browse](Rally/)** <br><br> | <img src="readme/screenshots/Rally.png" width="320" alt="Rally sample demo">|
30+
| | |
31+
| <br><img src="readme/crane.png" alt="Crane" width="240"></img> <br><br>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.<br><br>• Medium complexity<br>• Draggable UI elements<br>• Android Views inside Compose<br>• UI state handling<br>• UI Tests<br><br>**[> Browse](Crane/)** <br><br> | <img src="readme/screenshots/Crane.png" width="320" alt="Crane sample demo">|
32+
| | |
33+
| <br><img src="readme/owl.png" alt="Owl" width="240"></img> <br><br>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.<br><br>• Medium complexity<br>• Material theming & light/dark themes<br>• Custom layout<br>• Animation<br><br>**[> Browse](Owl/)** <br><br> | <img src="readme/screenshots/Owl.png" width="320" alt="Owl sample demo">|
34+
35+
36+
## License
37+
```
38+
Copyright 2020 The Android Open Source Project
39+
40+
Licensed under the Apache License, Version 2.0 (the "License");
41+
you may not use this file except in compliance with the License.
42+
You may obtain a copy of the License at
43+
44+
https://www.apache.org/licenses/LICENSE-2.0
45+
46+
Unless required by applicable law or agreed to in writing, software
47+
distributed under the License is distributed on an "AS IS" BASIS,
48+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
49+
See the License for the specific language governing permissions and
50+
limitations under the License.
51+
```

‎Rally/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ fun AccountsBody(accounts: List<Account>) {
4545
```
4646

4747
### Theming
48-
Rally follows [Material Design][materialtheming], customizing [colors](app/src/main/java/com/example/compose/rally/ui/theme/Color.kt) and [typography](app/src/main/java/com/example/compose/rally/ui/theme/Theme.kt) used in the app via the [RallyTheme](app/src/main/java/com/example/compose/rally/ui/theme/Theme.kt). Rally's design only contains a dark theme, therefore the theme does not contain any light colors.
48+
Rally follows [Material Design][materialtheming], customizing [colors](app/src/main/java/com/example/compose/rally/ui/theme/Color.kt) and [typography](app/src/main/java/com/example/compose/rally/ui/theme/RallyTheme.kt) used in the app via the [RallyTheme](app/src/main/java/com/example/compose/rally/ui/theme/RallyTheme.kt). Rally's design only contains a dark theme, therefore the theme does not contain any light colors.
4949

5050
### Charts and animations
5151
This sample features a donut chart that combines drawing using [`Canvas`](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Canvas) with animations combining two animated parameters: `AngleOffset` and `Shift`. This creates the animation with minimum boilerplate:

‎readme/crane.png

3.63 KB
Loading

‎readme/jetcaster.png

7.85 KB
Loading

‎readme/jetchat.png

3.99 KB
Loading

‎readme/jetnews.png

3.6 KB
Loading

‎readme/jetsnack.png

4.35 KB
Loading

‎readme/jetsurvey.png

4.83 KB
Loading

‎readme/owl.png

5.72 KB
Loading

‎readme/rally.png

3.6 KB
Loading
File renamed without changes.

‎readme/screenshots/Crane.png

68.7 KB
Loading

‎readme/screenshots/JetNews.png

84.1 KB
Loading

‎readme/screenshots/Jetcaster.png

85.5 KB
Loading

‎readme/screenshots/Jetchat.png

69.7 KB
Loading

‎readme/screenshots/Jetsnack.png

106 KB
Loading

‎readme/screenshots/Jetsurvey.png

34.3 KB
Loading

‎readme/screenshots/Owl.png

77.9 KB
Loading

‎readme/screenshots/Rally.png

44.3 KB
Loading

0 commit comments

Comments
 (0)
Please sign in to comment.