We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
No description provided.
The text was updated successfully, but these errors were encountered:
For anyone looking to implement dark theme support right now, it's already possible (and quite easy) to do so by using a custom ColorProvider.
Example:
class CustomColorProvider : ColorProvider { override fun getChangeTypeBackgroundColor(changeType: ChangeType): Int { return when(changeType) { UNRELEASED -> { R.color.colorChangelogUnreleased } ADDED -> { R.color.colorChangelogAdded } CHANGED -> { R.color.colorChangelogChanged } DEPRECATED -> { R.color.colorChangelogDeprecated } REMOVED -> { R.color.colorChangelogRemoved } FIXED -> { R.color.colorChangelogFixed } SECURITY -> { R.color.colorChangelogSecurity } } } override fun getBackgroundColor(): Int { return R.color.colorElevatedBackground } override fun getDescriptionColor(): Int { return R.color.colorOnSurface } override fun getTitleColor(displayOptions: DisplayOptions): Int { return R.color.colorOnSurface } }
In values\colors.xml:
values\colors.xml
<!-- Changelog --> <color name="colorChangelogUnreleased">#9797A1</color> <color name="colorChangelogAdded">#58B119</color> <color name="colorChangelogChanged">#10BDEA</color> <color name="colorChangelogDeprecated">#E77336</color> <color name="colorChangelogRemoved">@color/colorElevatedBackground</color> <color name="colorChangelogFixed">#CB165B</color> <color name="colorChangelogSecurity">#FF00BD</color> <color name="colorElevatedBackground">#FFFFFF</color> <color name="colorOnSurface">#DE000000</color>
In the night version of your colors.xml values:
night
colors.xml
<!-- Changelog --> <color name="colorChangelogUnreleased">#333337</color> <color name="colorChangelogAdded">#265406</color> <color name="colorChangelogChanged">#013949</color> <color name="colorChangelogDeprecated">#773817</color> <color name="colorChangelogRemoved">@color/colorElevatedBackground</color> <color name="colorChangelogFixed">#6A062C</color> <color name="colorChangelogSecurity">#8F0068</color> <color name="colorElevatedBackground">#37383b</color> <color name="colorElevatedBackground">#37383b</color>
Of course you're free to use any colors you'd like.
Finally:
NoticeBoard(this).pin { // other attributes... colorProvider(CustomColorProvider()) // other attributes... }
Sorry, something went wrong.
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: