Skip to content

Commit

Permalink
Merge pull request #1206 from yschimke/fix_tile_layout
Browse files Browse the repository at this point in the history
Improve tile layout
  • Loading branch information
joreilly authored Mar 24, 2024
2 parents 84655bf + e86242e commit da36c3e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ multiplatform-settings = "1.1.1"
nav-compose = "2.7.7"
okio = "3.9.0"
protolayout-expression = "1.1.0"
protolayout-material = "1.2.0-alpha01"
protolayout-proto = "1.1.0"
robolectric = "4.11.1"
roborazzi-gradle-plugin = "1.11.0"
Expand Down Expand Up @@ -60,6 +61,7 @@ androidx-lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-lived
androidx-lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "androidx-lifecycle" }
androidx-protolayout-expression = { module = "androidx.wear.protolayout:protolayout-expression", version.ref = "protolayout-expression" }
androidx-protolayout-expression-pipeline = { module = "androidx.wear.protolayout:protolayout-expression-pipeline", version.ref = "protolayout-expression" }
androidx-protolayout-material = { module = "androidx.wear.protolayout:protolayout-material", version.ref = "protolayout-material" }
androidx-protolayout-proto = { module = "androidx.wear.protolayout:protolayout-proto", version.ref = "protolayout-proto" }
androidx-tiles-tooling-preview = { module = "androidx.wear.tiles:tiles-tooling-preview", version.ref = "tiles-tooling-preview" }
androidx-work-runtime-ktx = { module = "androidx.work:work-runtime-ktx", version.ref = "work-runtime-ktx" }
Expand Down
2 changes: 2 additions & 0 deletions wearApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ dependencies {
implementation(libs.room.runtime)
implementation(libs.coil.base)

implementation(libs.androidx.protolayout.material)

coreLibraryDesugaring(libs.desugar)

debugImplementation(libs.compose.ui.manifest)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class CurrentSessionsTileRenderer(
.setChipColors(ChipColors.primaryChipColors(theme))
.build()
)
.setResponsiveContentInsetEnabled(true)
.build()

fun renderLoginTile(
Expand All @@ -98,6 +99,7 @@ class CurrentSessionsTileRenderer(
.setChipColors(ChipColors.primaryChipColors(theme))
.build()
)
.setResponsiveContentInsetEnabled(true)
.build()

fun renderNoConferenceTile(
Expand All @@ -120,11 +122,13 @@ class CurrentSessionsTileRenderer(
.setChipColors(ChipColors.primaryChipColors(theme))
.build()
)
.setResponsiveContentInsetEnabled(true)
.build()

fun conferenceLabel(state: String) = Text.Builder(context, state)
.setTypography(TYPOGRAPHY_TITLE2)
.setColor(ColorBuilders.argb(theme.primary))
.setMaxLines(2)
.build()

fun message(state: String) = Text.Builder(context, state)
Expand Down

0 comments on commit da36c3e

Please sign in to comment.