// the find
hehonghui/Colorful
基于Theme的Android动态换肤库,无需重启Activity、无需自定义View,方便的实现日间、夜间模式。
A small Java library for hot-swapping Android themes without restarting the Activity. You define custom XML attributes, map views to those attributes at runtime via a builder, then call setTheme() to switch. Targets day/night mode as the primary use case.
The no-Activity-restart approach is genuinely useful — it avoids the jarring recreation flicker that the standard recreate() causes. The builder API is clean and explicit: you declare exactly which views get which attributes, so there are no magic reflective surprises. Works with RecyclerView item views via ViewGroupSetter, which covers the awkward case most theming libs ignore.
Abandoned since 2017 — Android has shipped AppCompat DayNight, Material3, and forced-dark mode since then, all of which handle this better with zero extra code. The manual view registration is tedious at scale: you have to wire up every single view by ID, which breaks the moment you have deep hierarchies or dynamic layouts. No Gradle/Maven distribution — you're copying source files into your project. Predates View Binding, Compose, and ConstraintLayout, so the demo and assumptions are outdated enough that you'd be adapting more than adopting.