Skip to content

Android: theme prop (light / dark / auto) #39

@LeslieOA

Description

@LeslieOA

Next slice of #32. Wire the `theme` prop ('light' | 'dark' | 'auto') so it actually drives Sora's color scheme on Android.

Scope

  • Bundle a light TextMate theme alongside the existing `darcula.json` (dark). Use Sora's sample app's `quietlight.json` — already pre-tested against Sora's strict-Gson `TMParserJSON`.
  • Extend `SoraTextMate` to register both themes at setup, and expose an `applyTheme(editor, theme)` that switches the active scheme via `ThemeRegistry.setTheme` + re-applies `TextMateColorScheme.create(...)` on the editor.
  • For `theme: 'auto'`, query `Configuration.uiMode & UI_MODE_NIGHT_MASK` to pick light/dark.
  • Replace the no-op `setTheme` stub in `SourceEditorViewManager.kt`.
  • Update `App.android.tsx` to add a theme picker UI matching iOS's pattern (segmented control with Auto / Light / Dark, or a simpler chip).

Refs #32. After this lands, only CI + docs remain on the #32 task list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    androidTested on AndroidenhancementNew feature or request

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions