refactor: extract KeyboardThemeManager from GeneralKeyboardIME (Part 9) - #426 - #682
Merged
andrewtavis merged 2 commits intoAug 23, 2026
Conversation
angrezichatterbox
force-pushed
the
refactor/keyboard-theme-manager-426
branch
from
August 23, 2026 18:34
5d52e2a to
408f836
Compare
Member
|
Note @Mounil2005: The CI changelog check's working! Really cool for a first experience with it 😊 |
andrewtavis
approved these changes
Aug 23, 2026
andrewtavis
left a comment
Member
There was a problem hiding this comment.
praise: Checking this with @angrezichatterbox now, @prince-0408 😊 Thanks for the continued work on refactoring and coordinating the work to be done here! :) :)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR is Part 9 in modularizing
GeneralKeyboardIMEfor #426.It extracts navigation bar color configuration, window decor insets, light/dark appearance controllers, empty state banner drawables, multi-layer suggestion button styling, and relative luminance calculations out of
GeneralKeyboardIME.ktinto a standalone helper classKeyboardThemeManager.Detailed Changes Table
KeyboardThemeManager.ktapplyNavBarColor), empty-state banner themes (applyBannerTheme), multi-layer suggestion button styling (applyInformativeSuggestionStyle), single suggestion pill formatting (applySingleSuggestionStyle), word suggestion text colors (getSuggestionTextColor), and luminance calculations (isLightColor).GeneralKeyboardIME.ktinto a dedicated helper class.GeneralKeyboardIME.ktthemeManagerand delegated theme styling, banner formatting, navigation bar configuration, and suggestion button rendering (applyNavBarColor,applyBannerTheme,handlePluralIfNeeded,handleSingleType,setSuggestionButton). Removed directContextCompatdrawable/tint boilerplate and unused imports.GeneralKeyboardIME.ktwhile maintaining 100% backward compatibility for all callers.FloatingKeyboardHandler.ktime.applyNavBarColorPublic()call toime.applyNavBarColor()directly, allowing removal of the redundant forwarder method.KeyboardThemeManagerTest.ktisLightColor) forWHITE,BLACK,LTGRAY, andDKGRAY.Key Benefits
GeneralKeyboardIME.kt.Related Issue
Refactors part of #426