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 摘要。