Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
189 commits
Select commit Hold shift + click to select a range
d2d7a1d
Add core module.
arriolac Mar 15, 2024
0087b43
Add designsystem module.
arriolac Mar 15, 2024
3126572
🤖 Apply Spotless
arriolac Mar 15, 2024
7fb77a5
[Jetcaster] Create `core` shared module (#1285)
arriolac Mar 18, 2024
bef10b8
add tv-module
chikoski Mar 19, 2024
7630c33
Apply font and color settings defined in the designsystem module to t…
chikoski Mar 19, 2024
55bac65
Add license information
chikoski Mar 19, 2024
38b22d6
Fix format error in the tv-app module
chikoski Mar 19, 2024
e7e5406
[Jetcaster] Migrate from M2 to M3.
arriolac Mar 18, 2024
f56f782
🤖 Apply Spotless
arriolac Mar 19, 2024
583d2d0
Remove commented out code.
arriolac Mar 19, 2024
251d976
Remove mention of dynamic theming.
arriolac Mar 19, 2024
fe2d69c
Minor UI tweaks.
arriolac Mar 19, 2024
7c7d97e
🤖 Apply Spotless
arriolac Mar 19, 2024
d8cc8c9
PR feedback.
arriolac Mar 20, 2024
4a36c17
Fix status bar contrast.
arriolac Mar 20, 2024
c77667e
Add comment to update section to a carousel once better support is pr…
arriolac Mar 20, 2024
708aefe
🤖 Apply Spotless
arriolac Mar 20, 2024
21cffa3
[Jetcaster] Migrate from M2 to M3. (#1287)
arriolac Mar 20, 2024
6033cc8
Adding domain layer.
arriolac Mar 19, 2024
5499056
Add tests.
arriolac Mar 20, 2024
cabdb60
🤖 Apply Spotless
arriolac Mar 20, 2024
92c1b86
PR feedback.
arriolac Mar 21, 2024
b1bdaca
Update include clause to be consistent with the project standards
chikoski Mar 21, 2024
fe5ed81
Jetcaster/tv support (#1286)
chikoski Mar 21, 2024
7c5e521
Set the navigation graph to the tv-app
chikoski Mar 21, 2024
1c49ebc
Refactor based on feedback.
arriolac Mar 21, 2024
0d6394d
🤖 Apply Spotless
arriolac Mar 21, 2024
a7965dd
Add updated assets.
arriolac Mar 21, 2024
421f4e1
Update Jetcaster/app/src/main/java/com/example/jetcaster/ui/home/disc…
arriolac Mar 21, 2024
eae0554
Simplifying.
arriolac Mar 21, 2024
ccdb03d
[Jetcaster] Refactor: create domain models (#1289)
arriolac Mar 21, 2024
c3a5252
[Jetcaster] Update icons (#1291)
arriolac Mar 22, 2024
b236b5d
Implementation of the discover screen
chikoski Mar 25, 2024
ad08aac
Wear version of Jetcaster
kul3r4 Mar 21, 2024
acfc5b0
Merge branch 'jetcaster/all_form_factors' into jetcaster/all_form_fac…
kul3r4 Mar 25, 2024
196da0c
[Jetcaster]: Handle empty library state.
arriolac Mar 21, 2024
fa6fd4a
🤖 Apply Spotless
arriolac Mar 22, 2024
fe65afe
Update Jetcaster/app/src/main/java/com/example/jetcaster/ui/home/Home.kt
arriolac Mar 25, 2024
5897c0c
🤖 Apply Spotless
arriolac Mar 25, 2024
35f192c
PR Feedback.
arriolac Mar 25, 2024
25fa1ba
🤖 Apply Spotless
arriolac Mar 25, 2024
d971385
Add the library screen to TV app
chikoski Mar 26, 2024
861774f
Add podcast details screen to the TV app
chikoski Mar 26, 2024
297db8c
Add background to the podcast details screen
chikoski Mar 26, 2024
adfdca0
Wear version of Jetcaster (#1290)
kul3r4 Mar 26, 2024
e36547c
[Jetcaster] Handle no subscribed podcasts empty state (#1292)
arriolac Mar 26, 2024
aeaa1d5
[Jetcaster] Add support for playing an episode (mock)
arriolac Mar 22, 2024
a59f186
🤖 Apply Spotless
arriolac Mar 23, 2024
5fa6d06
Add support for queueing episodes.
arriolac Mar 23, 2024
08933f4
🤖 Apply Spotless
arriolac Mar 23, 2024
2bbed3c
🤖 Apply Spotless
arriolac Mar 25, 2024
3d221a2
Add javadoc for episodeAndPodcast.
arriolac Mar 26, 2024
03a4772
[Jetcaster] Add mock support for playing an episode (#1293)
arriolac Mar 26, 2024
4270387
Move the classes defining spaces, margins, and paddings in the app to…
chikoski Mar 27, 2024
2de5753
Fix the failure of tv-app:minifyReleaseWithR8 task
chikoski Mar 27, 2024
9bb8ab7
Add the library screen and the podcast details page to the TV app (#1…
chikoski Mar 27, 2024
a0fb0ae
Add search functionality to the TV app
chikoski Mar 28, 2024
f53a56a
Merge branch 'main' into jetcaster/all_form_factors
arriolac Mar 28, 2024
240bec8
Implement newly introduced methods
chikoski Mar 28, 2024
d5b2862
Update the code format
chikoski Mar 28, 2024
e08a026
Add search functionality to Jetcaster (#1298)
chikoski Mar 29, 2024
dc9acb9
[Jetcaster]: Podcast screen.
arriolac Mar 26, 2024
00b0456
🤖 Apply Spotless
arriolac Mar 26, 2024
7714e5d
Refactor screens to use external models.
arriolac Mar 27, 2024
3f2c2de
🤖 Apply Spotless
arriolac Mar 28, 2024
3649e93
Undo commented out code.
arriolac Mar 28, 2024
01a095c
Fix tests
arriolac Mar 29, 2024
6452db8
🤖 Apply Spotless
arriolac Mar 29, 2024
1c94c88
PR comments.
arriolac Mar 30, 2024
2764e06
🤖 Apply Spotless
arriolac Mar 30, 2024
61ef2c9
Add a screen to show the details of the selected episode
chikoski Apr 1, 2024
41cee47
Navigate to player when tapping episode item.
arriolac Apr 1, 2024
5d922e1
CAMAL
arriolac Mar 29, 2024
81a8ebf
Use Compose UI latest
arriolac Mar 29, 2024
49933d8
Add loading states.
arriolac Mar 29, 2024
ae2f2e5
🤖 Apply Spotless
arriolac Apr 1, 2024
2a65a17
Use Surface as root of Home screen.
arriolac Apr 1, 2024
40a6b47
Fix tests.
arriolac Apr 1, 2024
27c8ea6
🤖 Apply Spotless
arriolac Apr 1, 2024
6058f86
[Jetcaster]: Podcast screen (#1296)
arriolac Apr 1, 2024
9215a15
Remove TODO.
arriolac Apr 1, 2024
2a44a81
🤖 Apply Spotless
arriolac Apr 1, 2024
39d750b
Use Rows and Columns for EpisodeListItem to avoid crash.
arriolac Apr 1, 2024
afe8af7
PR feedback.
arriolac Apr 1, 2024
c89178c
🤖 Apply Spotless
arriolac Apr 1, 2024
8223314
[Jetcaster] Adding SupportingPaneScaffold to Home (#1303)
arriolac Apr 1, 2024
c90430c
Add a screen to show the details of the selected episode (#1304)
chikoski Apr 1, 2024
50f7662
Fix a build error due to resolution failure of BasicTextField2
chikoski Apr 2, 2024
ba16ae8
Fix layout glitch due to line break character in the category name
chikoski Apr 2, 2024
a6df1a1
Coead cleanup
chikoski Apr 2, 2024
c8b38f8
Format the code
chikoski Apr 2, 2024
bad6d5c
Fix: a build error happening on TV app module (#1307)
arriolac Apr 2, 2024
caf0dbe
UI Polish.
arriolac Apr 1, 2024
0b13233
🤖 Apply Spotless
arriolac Apr 1, 2024
4a9ab77
Add placeholder text for search bar.
arriolac Apr 2, 2024
de71ae3
[Jetcaster] UI Polish (#1306)
arriolac Apr 2, 2024
64ee70c
[Jetcaster]: Provide PodcastDetailsViewModel via factory.
arriolac Apr 2, 2024
1f7b898
🤖 Apply Spotless
arriolac Apr 2, 2024
96d8754
add home screen
kul3r4 Mar 26, 2024
d1f085c
Add Home screen and Episodes screen (#1301)
kul3r4 Apr 2, 2024
82ce7ca
Remove log.
arriolac Apr 2, 2024
92f9a03
[Jetcaster]: Provide PodcastDetailsViewModel via factory. (#1310)
arriolac Apr 2, 2024
4b90571
Hide back arrow in supporting pane when 2 panes shown
jdkoren Apr 3, 2024
c323b6c
[Jetcaster] Handling no podcast selected and extracting state for home
arriolac Apr 2, 2024
f2224d2
[Jetcaster] Handling no podcast selected and extracting state for hom…
arriolac Apr 3, 2024
8edcfff
Hide back arrow in supporting pane when 2 panes shown (#1312)
jdkoren Apr 3, 2024
a106ddc
Add hilt.
arriolac Apr 2, 2024
7634e9d
🤖 Apply Spotless
arriolac Apr 2, 2024
b136c75
Add Hilt to TV and Wear
arriolac Apr 3, 2024
f6c1e6b
🤖 Apply Spotless
arriolac Apr 3, 2024
4f1815c
[Jetcaster] Add Hilt to app, tv and wear modules (#1311)
arriolac Apr 4, 2024
f6403a3
Update button text in podcast details.
arriolac Apr 3, 2024
2c7e599
Hide home category toggle when there are no subscribed podcasts.
arriolac Apr 4, 2024
189b951
🤖 Apply Spotless
arriolac Apr 4, 2024
c59e2e4
Hide supporting pane on initial load
arriolac Apr 4, 2024
198dc15
Remove tabs from top app bar.
arriolac Apr 4, 2024
4e422a6
🤖 Apply Spotless
arriolac Apr 4, 2024
e68bf8d
Show single pane on phone in landscape
jdkoren Apr 4, 2024
11111eb
🤖 Apply Spotless
jdkoren Apr 5, 2024
71d7dce
adds navigation to player, cleanup
kul3r4 Apr 3, 2024
c599b2b
[Jetcaster] Wear - adds navigation to player, cleanup (#1316)
kul3r4 Apr 8, 2024
6286495
Explanatory comments
jdkoren Apr 8, 2024
aecebde
Show single pane on phone in landscape (#1321)
jdkoren Apr 8, 2024
79403f8
[Jetcaster] Hide home category toggle when there are no subscribed po…
arriolac Apr 8, 2024
d0b64d7
[Jetcaster]: Fix ambiguous WSC import.
arriolac Apr 8, 2024
5379e1d
🤖 Apply Spotless
arriolac Apr 8, 2024
d936bc2
[Jetcaster]: Fix ambiguous WSC import. (#1326)
arriolac Apr 9, 2024
818b8fc
Remove experimental annotations
chikoski Apr 5, 2024
8899463
Update parameter retrieval code to use flow
chikoski Apr 5, 2024
9f999d2
Add the player screen to TV app
chikoski Apr 8, 2024
5662615
Updated some components to be consistent with the naming convention.
chikoski Apr 9, 2024
b683f56
Fix format issues with spotlessApply
chikoski Apr 9, 2024
f06acaa
Remove duplicated attributes and parameters.
chikoski Apr 9, 2024
5079db0
Add @Transaction annotation to fix the failure on :core:DebugKotlin
chikoski Apr 9, 2024
56793d4
Add androidx.lifecycle:lifecycle-runtime-compose to the dependency list
chikoski Apr 9, 2024
f9b345b
Enable play/pause on the Player
kul3r4 Apr 8, 2024
eeef221
[Wear] Enable play/pause on the Player (#1325)
kul3r4 Apr 9, 2024
1dd9c82
Display radial gradient on home background.
arriolac Apr 9, 2024
d2f539a
🤖 Apply Spotless
arriolac Apr 9, 2024
8a6246e
Add the player screen to TV app (#1324)
chikoski Apr 10, 2024
89ef970
Update action of the episode selection to navigate the player screen.
chikoski Apr 10, 2024
250366b
Adds podcasts screen
kul3r4 Apr 9, 2024
9cbfdd7
[Wear] Adds podcasts screen (#1328)
kul3r4 Apr 10, 2024
8fc4824
[Jetcaster] Create model module and add PlayerImage to shared design …
arriolac Apr 10, 2024
3832b73
Fix wear model references.
arriolac Apr 10, 2024
3e11672
🤖 Apply Spotless
arriolac Apr 10, 2024
8ecc195
[Jetcaster] Create model module and add PlayerImage to shared design …
arriolac Apr 10, 2024
8ebfbaa
Update README.md images
margeeta Apr 10, 2024
9c2802e
[Jetcaster] Fix TV imports.
arriolac Apr 10, 2024
6743bff
🤖 Apply Spotless
arriolac Apr 10, 2024
c34f0a5
TV app: update action of the episode selection to navigate the player…
chikoski Apr 11, 2024
645459d
Merge branch 'jetcaster/all_form_factors' into chris/jetcaster/fix_tv
chikoski Apr 11, 2024
efc0031
🤖 Apply Spotless
chikoski Apr 11, 2024
d157e2f
[Jetcaster] Fix TV imports. (#1334)
arriolac Apr 11, 2024
6306b3a
[Jetcaster] Display radial gradient on home bg (#1329)
arriolac Apr 11, 2024
844e89d
[Jetcaster]: Fix imports.
arriolac Apr 11, 2024
7ceb7fa
[Jetcaster]: Fix imports. (#1337)
arriolac Apr 11, 2024
df2cd68
Unify WindowSizeClass usage
jdkoren Apr 10, 2024
ef15624
Remove material3-window-size-class dependency
jdkoren Apr 11, 2024
b09d709
Update README.md images (#1333)
arriolac Apr 12, 2024
bc6e74b
[Jetcaster] Refactoring HTML Elements in SummaryText
yongsuk44 Apr 12, 2024
3dbbf09
Unify WindowSizeClass usage (#1335)
jdkoren Apr 12, 2024
2767b3f
[Jetcaster] Update README.
arriolac Apr 5, 2024
8ce7a62
Fix typo.
arriolac Apr 9, 2024
5a409b3
Remove link to tablet.
arriolac Apr 12, 2024
af9038f
Update top-level README.
arriolac Apr 12, 2024
e2adb20
Merge branch 'main' into jetcaster/all_form_factors
arriolac Apr 12, 2024
ea77130
Merge remote-tracking branch 'origin/jetcaster/html-txt' into jetcast…
yongsuk44 Apr 12, 2024
129269a
[Jetcaster] Resolve conflicts - HtmlText
yongsuk44 Apr 12, 2024
5a82b73
[Jetcaster] Fix PodcastInformation Center Alignment
yongsuk44 Apr 12, 2024
8b3003b
Adds PodcastDetailsScreen
kul3r4 Apr 10, 2024
8550dce
[Jetcaster] Handling of HTML Elements in PodcastSummary on Foldable D…
arriolac Apr 12, 2024
41c1816
[Jetcaster] Update README. (#1327)
arriolac Apr 12, 2024
3384c6f
[Jetcaster] Add unit test for mock episode player.
arriolac Apr 10, 2024
bef840d
Remove unused code.
arriolac Apr 12, 2024
23a9f32
🤖 Apply Spotless
arriolac Apr 12, 2024
ca31c4a
[Wear] Adds PodcastDetailsScreen (#1336)
kul3r4 Apr 12, 2024
e369aa8
Remove unused method.
arriolac Apr 12, 2024
0d8140a
PR feedback.
arriolac Apr 12, 2024
7f8062e
🤖 Apply Spotless
arriolac Apr 12, 2024
046a497
Adds states for Player, adds queue button
kul3r4 Apr 12, 2024
34ff374
Adds states for Player, adds queue button (#1341)
kul3r4 Apr 14, 2024
edf86a1
[Jetcaster] Update player styling (#1340)
arriolac Apr 15, 2024
b018671
Adds queue screen
kul3r4 Apr 15, 2024
5e81ca2
[Wear] Adds queue screen (#1344)
kul3r4 Apr 15, 2024
a7bc08a
[Jetcaster]: Auto play episode on next.
arriolac Apr 16, 2024
3771d3e
🤖 Apply Spotless
arriolac Apr 16, 2024
893e2bc
[Jetcaster]: Auto play episode on next. (#1346)
arriolac Apr 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 9 additions & 34 deletions Jetcaster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,60 +3,34 @@
# Jetcaster sample 🎙️

Jetcaster is a sample podcast app, built with [Jetpack Compose][compose]. The goal of the sample is to
showcase dynamic theming and full featured architecture.
showcase building with Compose across multiple form factors (mobile, TV, and Wear) and full featured architecture.

To try out this sample app, use the latest stable version
of [Android Studio](https://developer.android.com/studio).
You can clone this repository or import the
project from Android Studio following the steps
[here](https://developer.android.com/jetpack/compose/setup#sample).

### Status: 🚧 In progress 🚧

Jetcaster is still in the early stages of development, and as such only one screen has been created so far. However,
most of the app's architecture has been implemented, as well as the data layer, and early stages of dynamic theming.


## Screenshots

<img src="docs/screenshots.png"/>
![readme_cover](https://github.com/android/compose-samples/assets/10263978/a58ab950-71aa-48e0-8bc7-85443a1b4f6b)

## Features

This sample contains 2 screens so far: the home screen, and a player screen.
This sample has 3 components: the home screen, the podcast details screen, and the player screen

The home screen is split into sub-screens for easy re-use:

- __Home__, allowing the user to see their followed podcasts (top carousel), and navigate between 'Your Library' and 'Discover'
- __Home__, allowing the user to see their subscribed podcasts (top carousel), and navigate between 'Your Library' and 'Discover'
- __Discover__, allowing the user to browse podcast categories
- __Podcast Category__, allowing the user to see a list of recent episodes for podcasts in a given category.

The player screen displays media controls and the currently "playing" podcast (the sample currently doesn't actually play any media).
The player screen layout is adapting to different form factors, including a tabletop layout on foldable devices:

<img src="docs/tabletop.png"/>

### Dynamic theming
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.

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:
Multiple panes will also be shown depending on the device's [window size class][wsc].

``` kotlin
val dominantColorState: DominantColorState = rememberDominantColorState()

DynamicThemePrimaryColorsFromImage(dominantColorState) {
var imageUrl = remember { mutableStateOf("") }

// When the image url changes, call updateColorsFromImageUrl()
launchInComposition(imageUrl) {
dominantColorState.updateColorsFromImageUrl(imageUrl)
}

// Content which will be dynamically themed....
}
```
The player screen displays media controls and the currently "playing" podcast (the sample currently **does not** actually play any media—the behavior is simply mocked).
The player screen layout is adapting to different form factors, including a tabletop layout on foldable devices:

Underneath, [`DominantColorState`](app/src/main/java/com/example/jetcaster/util/DynamicTheming.kt) uses the [Coil][coil] library to fetch the artwork image 🖼️, and then [Palette][palette] to extract the dominant colors from the image 🎨.
![readme_fold](https://github.com/android/compose-samples/assets/10263978/fe02248f-81ce-489b-a6d6-838438c8368e)


### Others
Expand Down Expand Up @@ -139,3 +113,4 @@ limitations under the License.
[rome]: https://rometools.github.io/rome/
[jdk8desugar]: https://developer.android.com/studio/write/java8-support#library-desugaring
[coil]: https://coil-kt.github.io/coil/
[wsc]: https://developer.android.com/guide/topics/large-screens/support-different-screen-sizes#window_size_classes
30 changes: 16 additions & 14 deletions Jetcaster/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.ksp)
alias(libs.plugins.hilt)
}

android {
Expand Down Expand Up @@ -84,6 +85,7 @@ android {
}

dependencies {
implementation(project(":core:model"))
val composeBom = platform(libs.androidx.compose.bom)
implementation(composeBom)
androidTestImplementation(composeBom)
Expand All @@ -95,14 +97,20 @@ dependencies {
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.palette)

implementation(libs.androidx.activity.compose)

implementation(libs.androidx.constraintlayout.compose)
// Dependency injection
implementation(libs.androidx.hilt.navigation.compose)
implementation(libs.hilt.android)
ksp(libs.hilt.compiler)

// Compose
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.compose.foundation)
implementation(libs.androidx.compose.material)
implementation(libs.androidx.compose.materialWindow)
implementation(libs.androidx.compose.material.iconsExtended)
implementation(libs.androidx.compose.material3)
implementation(libs.androidx.compose.material3.adaptive)
implementation(libs.androidx.compose.material3.adaptive.layout)
implementation(libs.androidx.compose.material3.adaptive.navigation)
implementation(libs.androidx.compose.ui)
implementation(libs.androidx.compose.ui.tooling.preview)
debugImplementation(libs.androidx.compose.ui.tooling)

Expand All @@ -112,20 +120,14 @@ dependencies {
implementation(libs.androidx.navigation.compose)

implementation(libs.androidx.window)
implementation(libs.androidx.window.core)

implementation(libs.accompanist.adaptive)

implementation(libs.coil.kt.compose)

implementation(libs.okhttp3)
implementation(libs.okhttp.logging)

implementation(libs.rometools.rome)
implementation(libs.rometools.modules)

implementation(libs.androidx.room.runtime)
implementation(libs.androidx.room.ktx)
implementation(project(":core"))
implementation(project(":designsystem"))

ksp(libs.androidx.room.compiler)
coreLibraryDesugaring(libs.core.jdk.desugaring)
}
114 changes: 0 additions & 114 deletions Jetcaster/app/src/main/java/com/example/jetcaster/Graph.kt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,16 @@ package com.example.jetcaster
import android.app.Application
import coil.ImageLoader
import coil.ImageLoaderFactory
import dagger.hilt.android.HiltAndroidApp
import javax.inject.Inject

/**
* Application which sets up our dependency [Graph] with a context.
*/
@HiltAndroidApp
class JetcasterApplication : Application(), ImageLoaderFactory {
override fun onCreate() {
super.onCreate()
Graph.provide(this)
}

override fun newImageLoader(): ImageLoader {
return ImageLoader.Builder(this)
// Disable `Cache-Control` header support as some podcast images disable disk caching.
.respectCacheHeaders(false)
.build()
}
@Inject lateinit var imageLoader: ImageLoader

override fun newImageLoader(): ImageLoader = imageLoader
}

This file was deleted.

Loading