Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ff64a77
[Jetcaster] Update to SNAPSHOT 6891475 (#216)
chrisbanes Oct 8, 2020
f2eb002
[Crane] Update to SNAPSHOT 6891475 (#217)
manuelvicnt Oct 9, 2020
48b8213
[Jetchat] Update to SNAPSHOT 6891475
JoseAlcerreca Oct 9, 2020
2c47c1a
Spotless
JoseAlcerreca Oct 9, 2020
38eff0b
[Rally] Update to SNAPSHOT 6891475
JoseAlcerreca Oct 12, 2020
3ef25ab
[Jetsurvey] Bump to alpha05
florina-muntenescu Oct 13, 2020
1a0e2cd
[Jetsurvey] Using onSizeChanged to set the branding height
florina-muntenescu Oct 13, 2020
cd6cc13
Merge pull request #223 from android/fm/jetsurvey_alpha05
florina-muntenescu Oct 13, 2020
7285d77
[Jetsurvey] Bump to alpha05
florina-muntenescu Oct 13, 2020
94c4e96
[Jetsurvey] Using onSizeChanged to set the branding height
florina-muntenescu Oct 13, 2020
4f1f177
[Rally] Removes maven central snapshot repo
JoseAlcerreca Oct 13, 2020
abc776f
Merge branch 'dev_alpha05' of github.com:android/compose-samples into…
JoseAlcerreca Oct 13, 2020
eb1fde4
[Rally] Update to SNAPSHOT 6891475
JoseAlcerreca Oct 13, 2020
edf370e
[Jetchat] Removes maven central snapshot repo
JoseAlcerreca Oct 13, 2020
49af7f4
Merge remote-tracking branch 'github/dev_alpha05' into dev_jetchat_al…
JoseAlcerreca Oct 13, 2020
f7a193c
Merge pull request #218 from JoseAlcerreca/dev_jetchat_alpha05
JoseAlcerreca Oct 13, 2020
2a5305f
[Jetsnack] Update to snapshot 6901934.
nickbutcher Oct 13, 2020
6d1f8bd
[Jetsnack] Remove unused import.
nickbutcher Oct 13, 2020
e09d997
[Owl] Accept modifiers in search suggestion items.
nickbutcher Oct 13, 2020
64e0508
Merge pull request #224 from android/nb/jetsnack_alpha05
nickbutcher Oct 13, 2020
0e3edfc
[Owl] Update to snapshot 6901934.
nickbutcher Oct 13, 2020
40b99f8
Bump JetNews to alpha05 (#221)
objcode Oct 14, 2020
f59851e
Merge branch 'dev_alpha05' into nb/owl_alpha05
nickbutcher Oct 14, 2020
a3bfd5d
Merge pull request #225 from android/nb/owl_alpha05
nickbutcher Oct 14, 2020
a50a961
[Readme] Removes known issues (#222)
manuelvicnt Oct 14, 2020
5fe42bd
[All] Updates to alpha05 (#227)
manuelvicnt Oct 14, 2020
7143bfa
Merge branch 'main' into dev_alpha05
manuelvicnt Oct 14, 2020
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
Next Next commit
[Jetcaster] Update to SNAPSHOT 6891475 (#216)
* Update Jetcaster to SNAPSHOT 6891475
* Fix episode title being centered
  • Loading branch information
chrisbanes authored Oct 8, 2020
commit ff64a779a9f189e85f6c0b0e400ecc132696f87c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import androidx.compose.foundation.layout.preferredHeight
import androidx.compose.foundation.layout.preferredHeightIn
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.EmphasisAmbient
import androidx.compose.material.AmbientEmphasisLevels
import androidx.compose.material.IconButton
import androidx.compose.material.MaterialTheme
import androidx.compose.material.ProvideEmphasis
Expand All @@ -48,9 +48,9 @@ import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.AccountCircle
import androidx.compose.material.icons.filled.Search
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedTask
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.runtime.launchInComposition
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
Expand Down Expand Up @@ -119,7 +119,7 @@ fun HomeAppBar(
},
backgroundColor = backgroundColor,
actions = {
ProvideEmphasis(EmphasisAmbient.current.medium) {
ProvideEmphasis(AmbientEmphasisLevels.current.medium) {
IconButton(
onClick = { /* TODO: Open search */ },
icon = { Icon(Icons.Filled.Search) }
Expand Down Expand Up @@ -170,7 +170,7 @@ fun HomeContent(

// When the selected image url changes, call updateColorsFromImageUrl() or reset()
if (selectedImageUrl != null) {
launchInComposition(selectedImageUrl) {
LaunchedTask(selectedImageUrl) {
dominantColorState.updateColorsFromImageUrl(selectedImageUrl)
}
} else {
Expand Down Expand Up @@ -338,7 +338,7 @@ private fun FollowedPodcastCarouselItem(
)
}

ProvideEmphasis(EmphasisAmbient.current.high) {
ProvideEmphasis(AmbientEmphasisLevels.current.high) {
ToggleFollowPodcastIconButton(
onClick = onUnfollowedClick,
isFollowed = true, /* All podcasts are followed in this feed */
Expand All @@ -348,7 +348,7 @@ private fun FollowedPodcastCarouselItem(
}

if (lastEpisodeDate != null) {
ProvideEmphasis(EmphasisAmbient.current.medium) {
ProvideEmphasis(AmbientEmphasisLevels.current.medium) {
Text(
text = lastUpdated(lastEpisodeDate),
style = MaterialTheme.typography.caption,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

package com.example.jetcaster.ui.home.category

import androidx.compose.foundation.AmbientContentColor
import androidx.compose.foundation.Icon
import androidx.compose.foundation.Image
import androidx.compose.foundation.Text
import androidx.compose.foundation.clickable
import androidx.compose.foundation.contentColor
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ConstraintLayout
Expand All @@ -36,8 +36,8 @@ import androidx.compose.foundation.layout.preferredWidth
import androidx.compose.foundation.lazy.ExperimentalLazyDsl
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.LazyRowForIndexed
import androidx.compose.material.AmbientEmphasisLevels
import androidx.compose.material.Divider
import androidx.compose.material.EmphasisAmbient
import androidx.compose.material.IconButton
import androidx.compose.material.MaterialTheme
import androidx.compose.material.ProvideEmphasis
Expand Down Expand Up @@ -166,7 +166,7 @@ fun EpisodeListItem(
)
}

ProvideEmphasis(EmphasisAmbient.current.high) {
ProvideEmphasis(AmbientEmphasisLevels.current.high) {
Text(
text = episode.title,
maxLines = 2,
Expand All @@ -188,7 +188,7 @@ fun EpisodeListItem(

val titleImageBarrier = createBottomBarrier(podcastTitle, image)

ProvideEmphasis(EmphasisAmbient.current.medium) {
ProvideEmphasis(AmbientEmphasisLevels.current.medium) {
Text(
text = podcast.title,
maxLines = 2,
Expand All @@ -208,11 +208,11 @@ fun EpisodeListItem(
)
}

ProvideEmphasis(EmphasisAmbient.current.high) {
ProvideEmphasis(AmbientEmphasisLevels.current.high) {
Image(
asset = Icons.Rounded.PlayCircleFilled,
contentScale = ContentScale.Fit,
colorFilter = ColorFilter.tint(contentColor()),
colorFilter = ColorFilter.tint(AmbientContentColor.current),
modifier = Modifier
.clickable(indication = RippleIndication(bounded = false, radius = 24.dp)) {
/* TODO */
Expand All @@ -226,7 +226,7 @@ fun EpisodeListItem(
)
}

ProvideEmphasis(EmphasisAmbient.current.medium) {
ProvideEmphasis(AmbientEmphasisLevels.current.medium) {
Text(
text = when {
episode.duration != null -> {
Expand All @@ -245,11 +245,14 @@ fun EpisodeListItem(
overflow = TextOverflow.Ellipsis,
style = MaterialTheme.typography.caption,
modifier = Modifier.constrainAs(date) {
start.linkTo(playIcon.end, margin = 12.dp)
end.linkTo(addPlaylist.start, margin = 16.dp)
centerVerticallyTo(playIcon)

width = Dimension.fillToConstraints
linkTo(
start = playIcon.end,
startMargin = 12.dp,
end = addPlaylist.start,
endMargin = 16.dp,
bias = 0f // float this towards the start
)
}
)

Expand Down Expand Up @@ -323,7 +326,7 @@ private fun TopPodcastRowItem(
)
}

ProvideEmphasis(EmphasisAmbient.current.high) {
ProvideEmphasis(AmbientEmphasisLevels.current.high) {
ToggleFollowPodcastIconButton(
onClick = onToggleFollowClicked,
isFollowed = isFollowed,
Expand All @@ -332,7 +335,7 @@ private fun TopPodcastRowItem(
}
}

ProvideEmphasis(EmphasisAmbient.current.high) {
ProvideEmphasis(AmbientEmphasisLevels.current.high) {
Text(
text = podcastTitle,
style = MaterialTheme.typography.body2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
package com.example.jetcaster.util

import androidx.compose.animation.animate
import androidx.compose.foundation.AmbientContentColor
import androidx.compose.foundation.Icon
import androidx.compose.foundation.background
import androidx.compose.foundation.contentColor
import androidx.compose.foundation.layout.padding
import androidx.compose.material.EmphasisAmbient
import androidx.compose.material.AmbientEmphasisLevels
import androidx.compose.material.IconButton
import androidx.compose.material.MaterialTheme
import androidx.compose.material.icons.Icons
Expand Down Expand Up @@ -51,8 +51,8 @@ fun ToggleFollowPodcastIconButton(
},
tint = animate(
when {
isFollowed -> contentColor()
else -> EmphasisAmbient.current.high.applyEmphasis(Color.Black)
isFollowed -> AmbientContentColor.current
else -> AmbientEmphasisLevels.current.high.applyEmphasis(Color.Black)
}
),
modifier = Modifier
Expand Down
7 changes: 3 additions & 4 deletions Jetcaster/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,9 @@ subprojects {
mavenCentral()
jcenter()

if (!Libs.AndroidX.Compose.snapshot.isEmpty()) {
maven {
url "https://androidx.dev/snapshots/builds/${Libs.AndroidX.Compose.snapshot}/artifacts/ui/repository/"
}
// Jetpack Compose SNAPSHOTs
if (Libs.AndroidX.Compose.version.endsWith("SNAPSHOT")) {
maven { url Libs.AndroidX.Compose.snapshotUrl }
}

maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ object Libs {
const val material = "com.google.android.material:material:1.1.0"

object Accompanist {
private const val version = "0.3.0"
private const val version = "0.3.1.compose-6891475-SNAPSHOT"
const val coil = "dev.chrisbanes.accompanist:accompanist-coil:$version"
}

object Kotlin {
private const val version = "1.4.0"
private const val version = "1.4.10"
const val stdlib = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$version"
const val gradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$version"
const val extensions = "org.jetbrains.kotlin:kotlin-android-extensions:$version"
Expand All @@ -61,8 +61,12 @@ object Libs {
const val coreKtx = "androidx.core:core-ktx:1.5.0-alpha02"

object Compose {
const val snapshot = ""
const val version = "1.0.0-alpha04"
private const val snapshot = "6891475"
const val version = "1.0.0-SNAPSHOT"

@get:JvmStatic
val snapshotUrl: String
get() = "https://androidx.dev/snapshots/builds/$snapshot/artifacts/ui/repository/"

const val runtime = "androidx.compose.runtime:runtime:$version"
const val foundation = "androidx.compose.foundation:foundation:${version}"
Expand Down