Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[issue-406] Introduce Dynamic Color #777

Merged
merged 19 commits into from
Sep 29, 2022

Conversation

mona-apk
Copy link
Contributor

@mona-apk mona-apk commented Sep 27, 2022

Issue

Overview (Required)

  • Introduce Dynamic Color (dynamicDarkColorScheme)
  • Switching Dynamic Color in the setting screen

Links

Screenshot

Before After

@mona-apk
Copy link
Contributor Author

I will write more details later, sorry 🙏

@takahirom
Copy link
Member

Please run ./gradlew spotlessKotlinApply 🙏

@takahirom
Copy link
Member

takahirom commented Sep 27, 2022

It seems that you need to supress or do something for this lint👀
/Users/runner/work/conference-app-2022/conference-app-2022/core/designsystem/src/androidMain/kotlin/io/github/droidkaigi/confsched2022/designsystem/theme/Theme.kt:44: Error: Call requires API level 31 (current min is 23): dynamicDarkColorScheme [NewApi]
dynamicDarkColorScheme(LocalContext.current)

@takahirom
Copy link
Member

@mona-apk Thanks! I make some refactoring and add a trick.

@mona-apk
Copy link
Contributor Author

Thank you very much...!
I have been struggling with the implementation and would like to refer to this PR.

@mona-apk mona-apk changed the title [WIP] [issue-406] Introduce Dynamic Color [issue-406] Introduce Dynamic Color Sep 28, 2022
@github-actions github-actions bot temporarily deployed to deploygate-distribution September 28, 2022 02:42 Inactive
@mona-apk mona-apk marked this pull request as ready for review September 28, 2022 02:59
Copy link
Contributor Author

@mona-apk mona-apk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check, again 🙏

content: @Composable () -> Unit
) {
val colorScheme = if (isDynamicColorEnabled) {
dynamicDarkColorScheme(LocalContext.current)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems difficult to apply dynamicLightColorScheme because Color.White is set in Text Composables 🤔

@github-actions github-actions bot temporarily deployed to deploygate-distribution September 28, 2022 12:48 Inactive
@takahirom takahirom merged commit 15d31df into DroidKaigi:main Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dynamic color Theme
2 participants