Skip to content

Commit

Permalink
Glance appwidget background.
Browse files Browse the repository at this point in the history
  • Loading branch information
oxyroid committed Jul 7, 2024
1 parent b2ebbd3 commit a75453d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions androidApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ dependencies {
ksp(libs.androidx.hilt.compiler)
implementation(libs.androidx.hilt.work)

implementation("androidx.glance:glance-appwidget:1.0.0")
implementation("androidx.glance:glance-material3:1.0.0")
implementation(libs.androidx.glance.appwidget)
implementation(libs.androidx.glance.material3)

debugImplementation(libs.squareup.leakcanary)
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import androidx.glance.ImageProvider
import androidx.glance.action.clickable
import androidx.glance.appwidget.GlanceAppWidget
import androidx.glance.appwidget.action.actionStartActivity
import androidx.glance.appwidget.appWidgetBackground
import androidx.glance.appwidget.cornerRadius
import androidx.glance.appwidget.provideContent
import androidx.glance.background
Expand Down Expand Up @@ -71,6 +72,7 @@ class PlayRandomlyWidget : GlanceAppWidget() {
)
)
.background(GlanceTheme.colors.background)
.appWidgetBackground()
.padding(4.dp)
) {
val currentBitmap = bitmap
Expand Down
4 changes: 4 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ androidx-tvprovider = "1.0.0"
androidx-startup = "1.1.1"
androidx-paging = "3.3.0"

glance = "1.1.0-rc01"
google-accompanist = "0.35.1-alpha"
google-dagger = "2.51.1"

Expand Down Expand Up @@ -75,6 +76,9 @@ androidx-compose-material3-adaptive = { group = "androidx.compose.material3.adap
androidx-compose-material3-adaptive-layout = { group = "androidx.compose.material3.adaptive", name = "adaptive-layout", version.ref = "androidx-compose-material3-adaptive" }
androidx-compose-material3-adaptive-navigation = { group = "androidx.compose.material3.adaptive", name = "adaptive-navigation", version.ref = "androidx-compose-material3-adaptive" }

androidx-glance-appwidget = { module = "androidx.glance:glance-appwidget", version.ref = "glance" }
androidx-glance-material3 = { module = "androidx.glance:glance-material3", version.ref = "glance" }

androidx-navigation-compose = { group = "androidx.navigation", name = "navigation-compose", version.ref = "androidx-navigation" }
androidx-constraintlayout-compose = { group = "androidx.constraintlayout", name = "constraintlayout-compose", version.ref = "androidx-constraintlayout-compose" }

Expand Down

0 comments on commit a75453d

Please sign in to comment.