Add full light and dark mode support for iOS and Android
This commit ensures both platforms properly support light and dark mode with automatic switching based on system settings. ## iOS Changes - Updated DesignSystem.swift to use adaptive system colors - Changed neutral colors to use UIKit system colors: - background: systemGroupedBackground - surface: secondarySystemGroupedBackground - text colors: label, secondaryLabel, tertiaryLabel - borders: separator, opaqueSeparator - Colors now automatically adapt to light/dark mode - Info.plist already configured to support both modes ## Android Changes - Updated AndroidManifest.xml app theme - Changed from Theme.Material.Light.NoActionBar to Theme.Material.NoActionBar - Allows app to respect system dark mode settings - Theme.kt already has complete light/dark color schemes - MyCribTheme automatically switches based on system settings ## Testing - iOS: Toggle Settings → Display & Brightness → Appearance - Android: Toggle Settings → Display → Dark theme - Both platforms automatically update colors 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@android:style/Theme.Material.Light.NoActionBar"
|
android:theme="@android:style/Theme.Material.NoActionBar"
|
||||||
android:networkSecurityConfig="@xml/network_security_config">
|
android:networkSecurityConfig="@xml/network_security_config">
|
||||||
<activity
|
<activity
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
// MARK: - Design System
|
// MARK: - Design System
|
||||||
// Modern, sleek design system for MyCrib
|
// Modern, sleek design system for MyCrib with Light and Dark mode support
|
||||||
|
|
||||||
struct AppColors {
|
struct AppColors {
|
||||||
// Primary Colors - Modern blue gradient
|
// Primary Colors - Modern blue gradient
|
||||||
@@ -19,17 +19,17 @@ struct AppColors {
|
|||||||
static let error = Color(hex: "EF4444") ?? .red
|
static let error = Color(hex: "EF4444") ?? .red
|
||||||
static let info = Color(hex: "3B82F6") ?? .blue
|
static let info = Color(hex: "3B82F6") ?? .blue
|
||||||
|
|
||||||
// Neutral Colors - Modern grays
|
// Adaptive Neutral Colors - Automatically adapt to light/dark mode
|
||||||
static let background = Color(hex: "F9FAFB") ?? Color(.systemGroupedBackground)
|
static let background = Color(uiColor: .systemGroupedBackground)
|
||||||
static let surface = Color.white
|
static let surface = Color(uiColor: .secondarySystemGroupedBackground)
|
||||||
static let surfaceSecondary = Color(hex: "F3F4F6") ?? Color(.secondarySystemGroupedBackground)
|
static let surfaceSecondary = Color(uiColor: .tertiarySystemGroupedBackground)
|
||||||
|
|
||||||
static let textPrimary = Color(hex: "111827") ?? Color(.label)
|
static let textPrimary = Color(uiColor: .label)
|
||||||
static let textSecondary = Color(hex: "6B7280") ?? Color(.secondaryLabel)
|
static let textSecondary = Color(uiColor: .secondaryLabel)
|
||||||
static let textTertiary = Color(hex: "9CA3AF") ?? Color(.tertiaryLabel)
|
static let textTertiary = Color(uiColor: .tertiaryLabel)
|
||||||
|
|
||||||
static let border = Color(hex: "E5E7EB") ?? Color(.separator)
|
static let border = Color(uiColor: .separator)
|
||||||
static let borderLight = Color(hex: "F3F4F6") ?? Color(.separator)
|
static let borderLight = Color(uiColor: .opaqueSeparator)
|
||||||
|
|
||||||
// Task Status Colors
|
// Task Status Colors
|
||||||
static let taskUpcoming = Color(hex: "3B82F6") ?? .blue
|
static let taskUpcoming = Color(hex: "3B82F6") ?? .blue
|
||||||
|
|||||||
Reference in New Issue
Block a user