When ever bundle was reloaded, all currently registered screens
where recreated since they were still attached to the react context.
This commit adds, in a very hacky way, means to respond to bundle
reload events.
* Due to race condition when showing modal, buttons were added to
previous Toolbar.
* Minor refactor, moved `updateStyles` from BaseReactActivity to
StyleHelper class since it's now also used by RnnModal
Due to race condition between SetupToolbarButtonsTask and
onCreateOptionsMenu buttons did not get set for first pushed screen.
In order to set buttons we need a ref to Menu which is set in
onCreateOptionsMenu. Sometimes onCreateOptionsMenu got called after
onCreate of our activity where we setup the toolbar.
Adds BottomTabActivity which replaces TabActivity
Adds a dependency on `com.aurelhubert:ahbottomnavigation:1.2.3`
Uses iOS tabsStyle, with additional parameter that allows toggling of whether to show the titles of inactive tabs
Navigation views such as ToolBar, StatusBar, NavigationBar can now be
customized through a static JSON defined in each screen component.
Styling options introduced in this commit:
- ToolBar color
- StatusBar color
- NavigationBar color
- Buttons tint color
- Title color
- Tab normal text color
- Tab Selected text color
- Selected tab inidicator color
Don't keep activities in history stack + enable resources in release mode
From now on, calling start*Application will clear the activity stack and the new activity as
the root of an empty stack. This means we don't support "Modal" or opening screens in new activity.
Enabled resources (Toolbar icons) in release mode.
Navigator.push allows us to open a new screen. Currently it starts a new Activity with the screen
as it’s root view, but this is only a temporary behaviour. The intended behaviour is similar to
View Controllers on iOS which allows you to manage view hierarchies or a stack of fragments
managed by FragmentManager on Android.
The approach we took is fairly simple. Navigation is created natively in corresponding activity,
currently only TabActivity is supported, and we pass the styling parameters and screenId to it.
Each screen is rendered in its own ReactRootView and is wired to the same ReactInstanceManager,
so all screens share the same java script context.