Skip to content

Conversation

@Ubax
Copy link
Contributor

@Ubax Ubax commented Oct 24, 2025

Description

Adds special effects to bottom tabs implementation on Android

Screen.Recording.2025-10-24.at.13.34.17.mov

Changes

  1. Added ViewFinder helper, which has utils for finding ScrollView and Stack. The implementation is based on iOS one.
  2. Added popToRoot method to ScreenStack. It dispatches dismiss event for every non-root active screen on Stack. It is JS responsibility to remove this screen from stack. This way the dismiss can be prevented.
  3. Added handler for repeated tab press event.

Test code and steps to reproduce

Bottom tabs test app

Checklist

@Ubax Ubax changed the title feat: add initial implementation for scrollToTop effect on android feat(Android, Tabs): Add special effects to bottom tabs on Android Oct 24, 2025
@Ubax Ubax marked this pull request as ready for review October 24, 2025 11:41
@kkafar kkafar self-requested a review October 29, 2025 13:48
Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall. Only thing I'm worried about is the dismiss model, where we first notify JS & just then dismiss the screens.

I haven't made my mind yet, whether I wanna go this way or not. Will be back soon with more feedback.

import androidx.core.view.isNotEmpty
import com.swmansion.rnscreens.ScreenStack

class ViewFinder {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can just be object to make it a singleton.

Suggested change
class ViewFinder {
object ViewFinder {

You might also make these two standalone functions.

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.

2 participants