wix / react-native-navigation

A complete native navigation solution for React Native
https://wix.github.io/react-native-navigation/
MIT License
13.03k stars 2.67k forks source link

Topbar not animating [Android] #6078

Open kyle-ssg opened 4 years ago

kyle-ssg commented 4 years ago

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

stale[bot] commented 4 years ago

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.

httpiga commented 4 years ago

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?

stale[bot] commented 4 years ago

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.

stale[bot] commented 4 years ago

The issue has been closed for inactivity.

kyle-ssg commented 4 years ago

@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.

pribeh commented 4 years ago

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

guyca commented 4 years ago

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.