Skip to content

feat: handle unstyled darkmode on Android - #305

Merged
okwasniewski merged 1 commit into
mainfrom
feat/handle-darkmode
Feb 17, 2025
Merged

okwasniewski merged 1 commit into
mainfrom
feat/handle-darkmode

Conversation

@okwasniewski

Copy link
Copy Markdown
Collaborator

PR Description

This PR handles unstyled dark mode on Android, and should fix #227

Now when user doesn't change anything related to styling the tabs will adapt to the default styling (especially useful for Material You)

How to test?

Change dark mode

Screenshots

CleanShot.2025-02-14.at.16.50.34.mp4

@changeset-bot

changeset-bot Bot commented Feb 17, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: fd7a2b6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
react-native-bottom-tabs Patch
@bottom-tabs/expo-template Patch
@bottom-tabs/react-navigation Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@okwasniewski
okwasniewski merged commit 69e17fc into main Feb 17, 2025
@okwasniewski
okwasniewski deleted the feat/handle-darkmode branch February 17, 2025 11:44
@kamui545

kamui545 commented Feb 19, 2025 •

Copy link
Copy Markdown

@okwasniewski I am not sure if this PR is the issue, but after upgrading to the new version, I have blank screens after toggling theme if the screen was not "mounted" already. (expo-router)

How to reproduce:

  1. Open app
  2. Toggle theme
  3. Navigate to a tab, it should be blank.

What I noticed is:

  • If you do not change theme, it works, the screen is visible.
  • if you change theme AFTER navigating to the tabs, they will be visible.
  • If I remove labeled={false}, the issue disappear, maybe it is related to hasCustomAppearance ?

Also, somehow the bottom tab theme still do not change even though this PR should have fixed that.
Maybe I am missing something... 🤷‍♂️

@okwasniewski

Copy link
Copy Markdown
Collaborator Author

@kamui545 That's weird.. can you open a new issue?

@AuroPick

Copy link
Copy Markdown

This PR works, but it still does not update when you change the appearance using the React Native Appearance API. You need to remount the bottom tabs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Android] Tabs do not react to color scheme change

3 participants