How hard is it to add cutom material-you like themes setting to the app? (themes similar…
- User
How hard is it to add cutom material-you like themes setting to the app? (themes similar to tachiyomi app setting)
Assistant
Based on the provided repository files, implementing Material You-like theme settings would require moderate effort since MaterialFiles already has a robust theme customization system in place. Let me break down the key components and what would be needed:
Current Implementation:
- The app already has:
- A comprehensive theme system with multiple color options (20 material colors defined in
ThemeColor.kt) - Support for light/dark themes
- A theme preference system
- Theme switching functionality
- Custom theme generation script (
generate-custom-themes.sh)
To add Material You-like theming similar to [Redacted Person], you would need to:
- Add Material You (Dynamic Colors) support:
- Add dynamic color support in the theme system
- Modify
CustomThemeHelper.ktto handle dynamic color extraction - Add a preference option to toggle between dynamic colors and preset colors
- Update the Theme Selection UI:
- Add color preview circles/swatches for each theme option
- Implement a grid-based theme selector similar to Tachiyomi
- Add visual feedback for selected theme
- Modify existing theme files:
- Update
themes.xmlandthemes_custom.xmlto support Material You attributes - Add new theme styles for dynamic color support
- Potentially update the
ThemeColorenum to include dynamic color options
Example implementation outline:
[Redacted// Add to ThemeColor.kt enum class ThemeColor(@ColorRes val resourceId: Int) { SYSTEM_AUTO(-1), // For Material You COLOR_PRIMARY(R.color.color_primary), // ... existing colors ... } // Add to Settings val MATERIAL_YOU_ENABLED = LiveDataPreference(...) // Update CustomThemeHelper fun applyTheme(activity: Activity) { if (Settings.MATERIAL_YOU_ENABLED.value) { applyDynamicColors(activity) } else { applyCustomTheme(activity) } }The effort required is moderate because:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.