This prevents the back button from being added too early when pushing screens.
If the back button is added before the actual push (current behaviour) the the previous screen's
title moves unexpectedly to make space for the back button.
Unmount title view when corresponding child component is unmounted (#3759)
Unmount Title component only when related child component is destroyed
Currently TopBar title component, background and buttons are unmounted when a new screen is pushed to the stack.
This causes a bug when props are passed to these components as props are cleared when child components unmount.
This commit fixes this bug for title components.
The wrong componentId was used to the Title's native react view, Since RNN
uses componentId to assign props to components, the component didn't get it's props.
* Revert "merging buttons fix"
This reverts commit 74077bbc55.
* Revert "fix undefined buttons"
This reverts commit e3b4d15a06.
* Revert "fix e2e"
This reverts commit 05b3f5808f.
* Revert "Handle merge buttons style"
This reverts commit 9c705402eb.
* Add background component with MATCH_PARENT height
* temporary solution for merging button color
This commit introduces two temporary options to control button colors
* rightButtonColor
* leftButtonColor
These options can be used to color buttons. Colors defined in buttons take
precedence over these two options.
* Get buttonColor options from resolved options
* leftButtonColor & rightButtonColor support - iOS
* Disabled color
* disabled buttons color support
* Rebase fixes
* empty commit
This allows users to set splash layouts in the Activities' onCreate method
by passing their splash view to setContentView in onCreate.
```java
public class MainActivity extends NavigationActivity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
View splash = new View(this);
splash.setBackgroundColor(Color.RED);
setContentView(splash);
}
}
```
[v2] Fix migration topBar fontSize example on docs (#3686)
On *Migration from V1 › Options* the `navBarTextFontSize` to topBar title fontSize example was set to 'red'. This PR fixes it to the default value, 18.
Implement Element transition on Android
This commit adds basic support for Element transition to Android.
Currently, only Shared Transition is supported and only when pushing screens.
There are a few caveats you need to be aware of if you intend to use
this feature in its current state:
1. Since elements need to be laid out before the transition can start, Set `waitForRender: true` when pushing the destination screen.
2. Fade animation has to be used when pushing screens with shared elements.
API
```js
options: {
animations: {
push: {
waitForRender: true,
content: {
alpha: {
from: 0,
to: 1,
duration: 250
}
}
}
},
customTransition: {
animations: [
]
}
}
```