Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Dynamic Colors doesn't update

未关闭
#560 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
63/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
android, kotlin
领域
mobile-dev

调研方向

Start by reading latin/common/Colors.kt and the KeyboardSwitcher.updateKeyboardThemeAndContextThemeWrapper() path called from onStartInputView; compare how the settings screen and keyboard obtain their contexts and check colors. Reproduce the reported palette change, then verify that opening the keyboard picks up the new colors without force-stopping LeanType.

由索引模型根据 Issue 内容生成。

描述

bug

As said by claude
Describe the bug
When the system Material You palette changes while LeanType is running, the keyboard with the Dynamic colors theme keeps showing the old colors. LeanType's settings screen updates to the new palette right away, but the keyboard doesn't update until LeanType is force-stopped.

To Reproduce

  1. Select the Dynamic colors keyboard theme.
  2. Change the system Material You palette. In my case, ColorBlendr (Shizuku mode) re-applies colors each time Paperize sets a new static wallpaper. Changing colors manually in ColorBlendr gives the same result.
  3. Open LeanType settings: the new colors are shown correctly.
  4. Open the keyboard in any text field: it still shows the previous palette.
  5. Force-stop LeanType and open the keyboard again: the new colors appear.

Expected behavior
The keyboard picks up the new system palette the next time it's shown, like the settings screen does.

Screenshots
N/A

App version & Flavor
[version, e.g. v4.2.x] / standard

Device Info

  • Model: Samsung Galaxy Z Fold 6
  • OS version: [Android version] / One UI [version]

Additional context (possible cause)
From reading the source, this might be the cause (unconfirmed):

  • DynamicColors (latin/common/Colors.kt) reads system_accent* / system_neutral* once in its constructor.
  • KeyboardSwitcher.updateKeyboardThemeAndContextThemeWrapper() checks mColors.haveColorsChanged(context) on onStartInputView, but the context passed in is displayContext, which is created once in onInitializeInterface() and reused.
  • If that long-lived context keeps returning the old system_* values after the theme overlay changes, haveColorsChanged() returns false and the theme never reloads. The settings activity gets a fresh context, so it isn't affected.

Workaround: force-stopping LeanType loads the current colors.

主要语言
Kotlin
星标
1k
派生
59
平均合并
13 小时 11 分钟
30 天内合并 PR
47

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

LeanBitLab/LeanType 的其他 Issue

查看 LeanBitLab/LeanType 的全部 Issue

相似的 Issue

更多 Kotlin Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。