mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-11 22:33:32 +08:00
For customizing back button image we use platform native functionality that is: `setBackIndicatorImage` on iOS and `setHomeAsUpIndicator` on Android. The reason we don't do that just by setting left item is that we get a couple of things for free such as handling RTL properly, working accessibility features, handling prop for hiding back button and a couple more. Unfortunately there are some downsides to that approach too. We need to install the back button as an Image component from the JS side, and the extract the image payload on the native side to set it with the navigator. This is specifically problematic in DEV mode where images are loaded asynchronously over HTTP from the packager. In order for that to work we had to employ a few hacks (more comments on that in the code).
README
If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm:
- Be sure to have the Android SDK and NDK installed
- Be sure to have a
local.propertiesfile in this folder that points to the Android SDK and NDK
ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle
sdk.dir=/Users/{username}/Library/Android/sdk
- Delete the
mavenfolder - Run
sudo ./gradlew installArchives - Verify that latest set of generated files is in the maven folder with the correct version number