React-native-navigation: Topbar not animating [Android]

Created on 28 Mar 2020  ·  7Comments  ·  Source: wix/react-native-navigation

Issue Description

As far as I can tell, this has always been an issue but perhaps I'm misinterpreting how animations are supposed to work on android.

Given the following code I would expect the topbar to animate.

Steps to Reproduce / Code Snippets / Screenshots

Navigation.setRoot({
  root: {
    id: 'root',
    stack: {
      children: [
        {
          component: {
            name: '/',
            options: {
              topBar: {
                title: {
                  text: 'Pushed screen title',
                },
              },
            },
          },
        },
      ],
    },
  },
});

Navigation.push(this.props.componentId, {
  stack: {
    options: {
      animations: {
        push: {
          enabled: true,
          topBar: {
            enabled: true,
            x: {
              duration: 1000,
              from: DeviceWidth,
              to: 0,
            },
          },
          content: {
            enabled: true,
            x: {
              duration: 1000,
              from: DeviceWidth,
              to: 0,
            },
          },
        },
      },
    },
    children: [
      {
        component: {
          name: '/',
          options: {
            topBar: {
              title: {
                text: 'Pushed screen title ' + screen++,
              },
            },
          },
        },
      },
    ],
  },
});

However regardless of if the new screen is a separate stack, or the options are placed within the component the navbar stays static.


Environment

  • React Native Navigation version: 6.3.2
  • React Native version: 0.61.5
  • Platform(s) (iOS, Android, or both?): Android
  • Device info (Simulator/Device? OS version? Debug/Release?): All
Animations Android acceptebug

Most helpful comment

@guyca hate to spam you with requests but is there any intention to looking at this in the future for RNN? It's sort of putting me off using this for the next project since it makes the fidelity of Android rather bad, the immediate change in the navbar and no animation looks really janky in some cases.

There are several duplicate closed tickets referencing this.

All 7 comments

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest version and report back. Thank you for your contributions.

I'm observing the same behavior but I expect the tabBar of the new stack would slide along with the screen. Is there a way to force this?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest version and report back. Thank you for your contributions.

The issue has been closed for inactivity.

@guyca hate to spam you with requests but is there any intention to looking at this in the future for RNN? It's sort of putting me off using this for the next project since it makes the fidelity of Android rather bad, the immediate change in the navbar and no animation looks really janky in some cases.

There are several duplicate closed tickets referencing this.

Any update on this? We can't even shut override animations on android in the latest versions such as to add our own.

Hey guys, sorry for the radio silence on this one. Indeed the current animations api and layout design doesn't support this use case.
We planed on rethinking the current API in Q3 but this task will probably be delayed to Q4.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zhanguangao picture zhanguangao  ·  3Comments

switchtrue picture switchtrue  ·  3Comments

yayanartha picture yayanartha  ·  3Comments

charlesluo2014 picture charlesluo2014  ·  3Comments

viper4595 picture viper4595  ·  3Comments