feat(Android, Stack v5): add support for extended tinting and enforce M3 icon size for back button#4126
Open
kligarski wants to merge 4 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Android Stack v5 header back button customization API to support stateful tinting (normal/pressed/focused) and enforces Material 3 icon sizing by reusing a shared drawable-resizing utility.
Changes:
- Renames
backButtonTintColortobackButtonTintColorNormaland addsbackButtonTintColorPressed/backButtonTintColorFocusedacross TS types and Android native implementation. - Extracts icon scaling logic into a shared Android utility and applies it to toolbar menu icons and back button icons.
- Updates the single-feature test app + scenario documentation to cover the new tint props and runtime updates.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/fabric/gamma/stack/StackHeaderConfigAndroidNativeComponent.ts | Updates Fabric native props to expose ...TintColorNormal/Pressed/Focused. |
| src/components/gamma/stack/header/StackHeaderConfig.android.types.ts | Updates public Android types/docs for new back button tint props. |
| apps/src/tests/single-feature-tests/stack-v5/test-stack-back-button-android/scenario.md | Expands manual test steps for normal/pressed/focused tint behavior and keyboard focus testing. |
| apps/src/tests/single-feature-tests/stack-v5/test-stack-back-button-android/index.tsx | Updates the test screen controls/config to use the new tint props. |
| android/src/main/java/com/swmansion/rnscreens/gamma/stack/header/toolbar/StackHeaderToolbarMenuCoordinator.kt | Switches to shared getResizedDrawable utility for menu icons. |
| android/src/main/java/com/swmansion/rnscreens/gamma/stack/header/StackHeaderDrawableUtils.kt | Introduces shared drawable resizing utility enforcing 24dp height. |
| android/src/main/java/com/swmansion/rnscreens/gamma/stack/header/StackHeaderCoordinator.kt | Implements stateful back button tinting and applies resizing to custom back button icons. |
| android/src/main/java/com/swmansion/rnscreens/gamma/stack/header/config/StackHeaderConfigViewManager.kt | Adds new prop setters for backButtonTintColorNormal/Pressed/Focused. |
| android/src/main/java/com/swmansion/rnscreens/gamma/stack/header/config/StackHeaderConfigProviding.kt | Updates config interface to expose the new tint fields. |
| android/src/main/java/com/swmansion/rnscreens/gamma/stack/header/config/StackHeaderConfig.kt | Stores the new tint fields on the config view implementation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
t0maboro
approved these changes
Jun 9, 2026
| * @summary Tint color applied to the back button icon when it is pressed. | ||
| * | ||
| * @remarks | ||
| * Due to native platform limitations, if you set this prop, you must also |
Contributor
There was a problem hiding this comment.
In TabsAppearanceApplicator, we use a fallback color from resources if one isn't provided. Can we apply the same approach to these icons to avoid transparent color?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds support for customizing
pressed,focusedtint color for back button. Enforces M3 spec back button icon size. Fixes scaling logic to handle both custom images and drawable resources.Changes
backButtonTintColor{Pressed,Focused}, rename previous prop to...NormalBefore & after - visual documentation
before.mp4
after.mp4
Test plan
Run
test-stack-back-button-android.Checklist