-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(widgets): add default colors for devices lower than S.
- Loading branch information
1 parent
fd03d4f
commit a1ecc39
Showing
8 changed files
with
58 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
plugins { | ||
id("conferences4hall.android.library") | ||
id("conferences4hall.android.library.compose") | ||
id("conferences4hall.quality") | ||
} | ||
|
||
android { | ||
namespace = "org.gdglille.devfest.android.widgets.style" | ||
} | ||
|
||
dependencies { | ||
implementation(projects.themeM3.style.theme) | ||
|
||
implementation(compose.material3) | ||
implementation(libs.bundles.androidx.glance) | ||
} |
12 changes: 12 additions & 0 deletions
12
...in/kotlin/org/gdglille/devfest/android/widgets/style/Conferences4HallGlanceColorScheme.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package org.gdglille.devfest.android.widgets.style | ||
|
||
import androidx.glance.material3.ColorProviders | ||
import org.gdglille.devfest.android.theme.m3.style.DarkColors | ||
import org.gdglille.devfest.android.theme.m3.style.LightColors | ||
|
||
object Conferences4HallGlanceColorScheme { | ||
val colors = ColorProviders( | ||
light = LightColors, | ||
dark = DarkColors | ||
) | ||
} |
22 changes: 22 additions & 0 deletions
22
...src/main/kotlin/org/gdglille/devfest/android/widgets/style/Conferences4HallGlanceTheme.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.gdglille.devfest.android.widgets.style | ||
|
||
import android.os.Build | ||
import androidx.compose.runtime.Composable | ||
import androidx.glance.GlanceComposable | ||
import androidx.glance.GlanceTheme | ||
|
||
@Composable | ||
fun Conferences4HallGlanceTheme( | ||
content: @GlanceComposable | ||
@Composable | ||
() -> Unit | ||
) { | ||
GlanceTheme( | ||
colors = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { | ||
GlanceTheme.colors | ||
} else { | ||
Conferences4HallGlanceColorScheme.colors | ||
}, | ||
content = content | ||
) | ||
} |