├── .circleci └── config.yml ├── .eslintignore ├── .eslintrc.js ├── .flowconfig ├── .gitattributes ├── .gitignore ├── .npmignore ├── .prettierrc ├── .vscode └── settings.json ├── LICENSE ├── README.md ├── android ├── .project ├── .settings │ └── org.eclipse.buildship.core.prefs ├── build.gradle └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── com │ └── reactnativecommunity │ └── toolbarandroid │ ├── BUCK │ ├── DrawableWithIntrinsicSize.java │ ├── ReactToolbar.java │ ├── ReactToolbarManager.java │ ├── ReactToolbarPackage.java │ └── events │ └── ToolbarClickEvent.java ├── babel.config.js ├── doc └── toolbarandroid.md ├── example ├── ToolbarAndroidExample-060 │ ├── .buckconfig │ ├── .eslintrc.js │ ├── .flowconfig │ ├── .gitattributes │ ├── .gitignore │ ├── .watchmanconfig │ ├── README.md │ ├── ToolbarAndroidExample │ │ ├── ToolbarAndroidExample.js │ │ ├── ic_menu_black_24dp.png │ │ ├── index.js │ │ └── relay.png │ ├── __tests__ │ │ └── App-test.js │ ├── android │ │ ├── .project │ │ ├── .settings │ │ │ └── org.eclipse.buildship.core.prefs │ │ ├── app │ │ │ ├── .classpath │ │ │ ├── .project │ │ │ ├── .settings │ │ │ │ └── org.eclipse.buildship.core.prefs │ │ │ ├── _BUCK │ │ │ ├── build.gradle │ │ │ ├── build_defs.bzl │ │ │ ├── proguard-rules.pro │ │ │ └── src │ │ │ │ ├── debug │ │ │ │ └── AndroidManifest.xml │ │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── toolbarandroidexample060 │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ └── MainApplication.java │ │ │ │ └── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ └── values │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ ├── build.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ └── settings.gradle │ ├── app.json │ ├── babel.config.js │ ├── index.js │ ├── ios │ │ ├── Podfile │ │ ├── Podfile.lock │ │ ├── ToolbarAndroidExample060-tvOS │ │ │ └── Info.plist │ │ ├── ToolbarAndroidExample060-tvOSTests │ │ │ └── Info.plist │ │ ├── ToolbarAndroidExample060.xcodeproj │ │ │ ├── project.pbxproj │ │ │ └── xcshareddata │ │ │ │ └── xcschemes │ │ │ │ ├── ToolbarAndroidExample060-tvOS.xcscheme │ │ │ │ └── ToolbarAndroidExample060.xcscheme │ │ ├── ToolbarAndroidExample060.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ ├── ToolbarAndroidExample060 │ │ │ ├── AppDelegate.h │ │ │ ├── AppDelegate.m │ │ │ ├── Base.lproj │ │ │ │ └── LaunchScreen.xib │ │ │ ├── Images.xcassets │ │ │ │ ├── AppIcon.appiconset │ │ │ │ │ └── Contents.json │ │ │ │ └── Contents.json │ │ │ ├── Info.plist │ │ │ └── main.m │ │ └── ToolbarAndroidExample060Tests │ │ │ ├── Info.plist │ │ │ └── ToolbarAndroidExample060Tests.m │ ├── metro.config.js │ ├── package.json │ └── yarn.lock ├── ToolbarAndroidExample-061 │ ├── .buckconfig │ ├── .eslintrc.js │ ├── .flowconfig │ ├── .gitattributes │ ├── .gitignore │ ├── .prettierrc.js │ ├── .watchmanconfig │ ├── README.md │ ├── ToolbarAndroidExample │ │ ├── ToolbarAndroidExample.js │ │ ├── ic_menu_black_24dp.png │ │ ├── index.js │ │ └── relay.png │ ├── __tests__ │ │ └── App-test.js │ ├── android │ │ ├── .project │ │ ├── .settings │ │ │ └── org.eclipse.buildship.core.prefs │ │ ├── app │ │ │ ├── _BUCK │ │ │ ├── build.gradle │ │ │ ├── build_defs.bzl │ │ │ ├── debug.keystore │ │ │ ├── proguard-rules.pro │ │ │ └── src │ │ │ │ ├── debug │ │ │ │ └── AndroidManifest.xml │ │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── toolbarandroidexample061 │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ └── MainApplication.java │ │ │ │ └── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ └── values │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ ├── build.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ └── settings.gradle │ ├── app.json │ ├── babel.config.js │ ├── index.js │ ├── ios │ │ ├── Podfile │ │ ├── Podfile.lock │ │ ├── ToolbarAndroidExample061-tvOS │ │ │ └── Info.plist │ │ ├── ToolbarAndroidExample061-tvOSTests │ │ │ └── Info.plist │ │ ├── ToolbarAndroidExample061.xcodeproj │ │ │ ├── project.pbxproj │ │ │ └── xcshareddata │ │ │ │ └── xcschemes │ │ │ │ ├── ToolbarAndroidExample061-tvOS.xcscheme │ │ │ │ └── ToolbarAndroidExample061.xcscheme │ │ ├── ToolbarAndroidExample061.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ ├── ToolbarAndroidExample061 │ │ │ ├── AppDelegate.h │ │ │ ├── AppDelegate.m │ │ │ ├── Base.lproj │ │ │ │ └── LaunchScreen.xib │ │ │ ├── Images.xcassets │ │ │ │ ├── AppIcon.appiconset │ │ │ │ │ └── Contents.json │ │ │ │ └── Contents.json │ │ │ ├── Info.plist │ │ │ └── main.m │ │ └── ToolbarAndroidExample061Tests │ │ │ ├── Info.plist │ │ │ └── ToolbarAndroidExample061Tests.m │ ├── metro.config.js │ ├── package.json │ └── yarn.lock ├── ToolbarAndroidExample-065 │ ├── .buckconfig │ ├── .editorconfig │ ├── .eslintrc.js │ ├── .flowconfig │ ├── .gitattributes │ ├── .gitignore │ ├── .prettierrc.js │ ├── .watchmanconfig │ ├── ToolbarAndroidExample │ │ ├── ToolbarAndroidExample.js │ │ ├── ic_menu_black_24dp.png │ │ ├── index.js │ │ └── relay.png │ ├── __tests__ │ │ └── App-test.js │ ├── android │ │ ├── .project │ │ ├── .settings │ │ │ └── org.eclipse.buildship.core.prefs │ │ ├── app │ │ │ ├── .classpath │ │ │ ├── .project │ │ │ ├── .settings │ │ │ │ └── org.eclipse.buildship.core.prefs │ │ │ ├── BUCK │ │ │ ├── build.gradle │ │ │ ├── build_defs.bzl │ │ │ ├── debug.keystore │ │ │ ├── proguard-rules.pro │ │ │ └── src │ │ │ │ ├── debug │ │ │ │ ├── AndroidManifest.xml │ │ │ │ └── java │ │ │ │ │ └── com │ │ │ │ │ └── toolbarandroidexample │ │ │ │ │ └── ReactNativeFlipper.java │ │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── toolbarandroidexample │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ └── MainApplication.java │ │ │ │ └── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ └── values │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ ├── build.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ └── settings.gradle │ ├── app.json │ ├── babel.config.js │ ├── index.js │ ├── ios │ │ ├── Podfile │ │ ├── Podfile.lock │ │ ├── ToolbarAndroidExample.xcodeproj │ │ │ ├── project.pbxproj │ │ │ └── xcshareddata │ │ │ │ └── xcschemes │ │ │ │ └── ToolbarAndroidExample.xcscheme │ │ ├── ToolbarAndroidExample.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ ├── ToolbarAndroidExample │ │ │ ├── AppDelegate.h │ │ │ ├── AppDelegate.m │ │ │ ├── Images.xcassets │ │ │ │ ├── AppIcon.appiconset │ │ │ │ │ └── Contents.json │ │ │ │ └── Contents.json │ │ │ ├── Info.plist │ │ │ ├── LaunchScreen.storyboard │ │ │ └── main.m │ │ └── ToolbarAndroidExampleTests │ │ │ ├── Info.plist │ │ │ └── ToolbarAndroidExampleTests.m │ ├── metro.config.js │ ├── package.json │ └── yarn.lock ├── ToolbarAndroidExample-expo-063 │ ├── .buckconfig │ ├── .gitattributes │ ├── .gitignore │ ├── App.js │ ├── ToolbarAndroidExample │ │ ├── ToolbarAndroidExample.js │ │ ├── ic_menu_black_24dp.png │ │ ├── index.js │ │ └── relay.png │ ├── __tests__ │ │ └── App.js │ ├── android │ │ ├── .project │ │ ├── .settings │ │ │ └── org.eclipse.buildship.core.prefs │ │ ├── app │ │ │ ├── .classpath │ │ │ ├── .project │ │ │ ├── .settings │ │ │ │ └── org.eclipse.buildship.core.prefs │ │ │ ├── BUCK │ │ │ ├── build.gradle │ │ │ ├── build_defs.bzl │ │ │ ├── proguard-rules.pro │ │ │ └── src │ │ │ │ ├── debug │ │ │ │ ├── AndroidManifest.xml │ │ │ │ └── java │ │ │ │ │ └── com │ │ │ │ │ └── toolbarandroidexampleexpo063 │ │ │ │ │ └── ReactNativeFlipper.java │ │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── toolbarandroidexampleexpo063 │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ ├── MainApplication.java │ │ │ │ │ └── generated │ │ │ │ │ └── BasePackageList.java │ │ │ │ └── res │ │ │ │ ├── drawable │ │ │ │ ├── splashscreen.xml │ │ │ │ └── splashscreen_image.png │ │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ └── values │ │ │ │ ├── colors.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ ├── build.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ └── settings.gradle │ ├── app.json │ ├── babel.config.js │ ├── index.js │ ├── ios │ │ ├── Podfile │ │ ├── Podfile.lock │ │ ├── ToolbarAndroidExampleexpo063.xcodeproj │ │ │ ├── project.pbxproj │ │ │ └── xcshareddata │ │ │ │ └── xcschemes │ │ │ │ └── ToolbarAndroidExampleexpo063.xcscheme │ │ ├── ToolbarAndroidExampleexpo063.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ └── ToolbarAndroidExampleexpo063 │ │ │ ├── AppDelegate.h │ │ │ ├── AppDelegate.m │ │ │ ├── Base.lproj │ │ │ └── LaunchScreen.xib │ │ │ ├── Images.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ ├── Contents.json │ │ │ ├── SplashScreen.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── splashscreen.png │ │ │ └── SplashScreenBackground.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── background.png │ │ │ ├── Info.plist │ │ │ ├── SplashScreen.storyboard │ │ │ ├── Supporting │ │ │ └── Expo.plist │ │ │ └── main.m │ ├── metro.config.js │ ├── package.json │ └── yarn.lock └── scripts │ └── update-local-pkg.sh ├── index.d.ts ├── index.js ├── ios ├── RNCToolbarAndroid.h ├── RNCToolbarAndroid.m ├── RNCToolbarAndroid.xcodeproj │ └── project.pbxproj └── RNCToolbarAndroid.xcworkspace │ └── contents.xcworkspacedata ├── js ├── ToolbarAndroid.android.js ├── ToolbarAndroid.ios.js ├── ToolbarAndroid.web.js ├── ToolbarAndroidNativeComponent.js └── __test__ │ ├── ToolbarAndroid.test.js │ ├── __snapshots__ │ └── ToolbarAndroid.test.js.snap │ └── ic_menu_black_24dp.png ├── package.json ├── screenShots └── ToolbarAndroidExample.png ├── toolbar-android.podspec ├── tsconfig.json └── yarn.lock /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root:true, 3 | extends:["@react-native-community"] 4 | }; 5 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | ; We fork some components by platform 3 | .*/*[.]android.js 4 | 5 | ; Ignore "BUCK" generated dirs 6 | /\.buckd/ 7 | 8 | ; Ignore unexpected extra "@providesModule" 9 | .*/node_modules/.*/node_modules/fbjs/.* 10 | 11 | ; Ignore duplicate module providers 12 | ; For RN Apps installed via npm, "Libraries" folder is inside 13 | ; "node_modules/react-native" but in the source repo it is in the root 14 | .*/Libraries/react-native/React.js 15 | 16 | ; Ignore polyfills 17 | .*/Libraries/polyfills/.* 18 | 19 | ; Ignore metro 20 | .*/node_modules/metro/.* 21 | 22 | ; Ignore examples 23 | .*/example 24 | 25 | [include] 26 | 27 | [libs] 28 | node_modules/react-native/Libraries/react-native/react-native-interface.js 29 | node_modules/react-native/flow/ 30 | node_modules/react-native/flow-github/ 31 | 32 | [options] 33 | emoji=true 34 | 35 | esproposal.optional_chaining=enable 36 | esproposal.nullish_coalescing=enable 37 | 38 | module.system=haste 39 | module.system.haste.use_name_reducers=true 40 | # get basename 41 | module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1' 42 | # strip .js or .js.flow suffix 43 | module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1' 44 | # strip .ios suffix 45 | module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1' 46 | module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1' 47 | module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1' 48 | module.system.haste.paths.blacklist=.*/__tests__/.* 49 | module.system.haste.paths.blacklist=.*/__mocks__/.* 50 | module.system.haste.paths.blacklist=/node_modules/react-native/Libraries/Animated/src/polyfills/.* 51 | module.system.haste.paths.whitelist=/node_modules/react-native/Libraries/.* 52 | 53 | munge_underscores=true 54 | 55 | module.name_mapper='\(@react-native-community/slider\)' -> '/js/Slider.js' 56 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' 57 | 58 | module.file_ext=.js 59 | module.file_ext=.jsx 60 | module.file_ext=.json 61 | module.file_ext=.native.js 62 | 63 | suppress_type=$FlowIssue 64 | suppress_type=$FlowFixMe 65 | suppress_type=$FlowFixMeProps 66 | suppress_type=$FlowFixMeState 67 | 68 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) 69 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ 70 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy 71 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError 72 | 73 | [version] 74 | ^0.86.0 75 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # OSX 3 | # 4 | .DS_Store 5 | 6 | # node.js 7 | # 8 | node_modules/ 9 | npm-debug.log 10 | yarn-error.log 11 | 12 | 13 | # Xcode 14 | # 15 | build/ 16 | *.pbxuser 17 | !default.pbxuser 18 | *.mode1v3 19 | !default.mode1v3 20 | *.mode2v3 21 | !default.mode2v3 22 | *.perspectivev3 23 | !default.perspectivev3 24 | xcuserdata 25 | *.xccheckout 26 | *.moved-aside 27 | DerivedData 28 | *.hmap 29 | *.ipa 30 | *.xcuserstate 31 | project.xcworkspace 32 | *.tgz 33 | 34 | 35 | # Android/IntelliJ 36 | # 37 | build/ 38 | .idea 39 | .gradle 40 | local.properties 41 | *.iml 42 | 43 | # BUCK 44 | buck-out/ 45 | \.buckd/ 46 | *.keystore 47 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | # JS 2 | node_modules 3 | yarn.lock 4 | 5 | # Project files 6 | CONTRIBUTING.md 7 | CODE_OF_CONDUCT.md 8 | README.md 9 | 10 | # Config files 11 | .babelrc 12 | babel.config.js 13 | .editorconfig 14 | .eslintrc 15 | .flowconfig 16 | .watchmanconfig 17 | jsconfig.json 18 | .npmrc 19 | .gitattributes 20 | .circleci 21 | *.coverage.json 22 | .opensource 23 | .circleci 24 | .eslintignore 25 | codecov.yml 26 | 27 | # Example 28 | example/ 29 | 30 | #ScreenShots 31 | screenShots/ 32 | 33 | # Android 34 | android/*/build/ 35 | android/gradlew 36 | android/build 37 | android/gradlew.bat 38 | android/gradle/ 39 | android/com_crashlytics_export_strings.xml 40 | android/local.properties 41 | android/.gradle/ 42 | android/.signing/ 43 | android/.idea/gradle.xml 44 | android/.idea/libraries/ 45 | android/.idea/workspace.xml 46 | android/.idea/tasks.xml 47 | android/.idea/.name 48 | android/.idea/compiler.xml 49 | android/.idea/copyright/profiles_settings.xml 50 | android/.idea/encodings.xml 51 | android/.idea/misc.xml 52 | android/.idea/modules.xml 53 | android/.idea/scopes/scope_settings.xml 54 | android/.idea/vcs.xml 55 | android/*.iml 56 | android/.settings 57 | 58 | # iOS 59 | ios/*.xcodeproj/xcuserdata 60 | *.pbxuser 61 | *.mode1v3 62 | *.mode2v3 63 | *.perspectivev3 64 | *.xcuserstate 65 | project.xcworkspace/ 66 | xcuserdata/ 67 | 68 | # Misc 69 | .DS_Store 70 | .DS_Store? 71 | *.DS_Store 72 | coverage.android.json 73 | coverage.ios.json 74 | coverage 75 | npm-debug.log 76 | .github 77 | ._* 78 | .Spotlight-V100 79 | .Trashes 80 | ehthumbs.db 81 | Thumbs.dbandroid/gradle 82 | docs 83 | .idea 84 | tests/ 85 | bin/test.js 86 | codorials 87 | .vscode 88 | .nyc_output 89 | .tmp 90 | *.tgz -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "requirePragma": true, 3 | "singleQuote": true, 4 | "trailingComma": "all", 5 | "bracketSpacing": false, 6 | "jsxBracketSameLine": true, 7 | "parser": "flow" 8 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "javascript.validate.enable": false 3 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 react-native-community 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # `@react-native-community/toolbar-android` 2 | [![CircleCI](https://circleci.com/gh/react-native-toolbar-android/toolbar-android/tree/master.svg?style=svg)](https://circleci.com/gh/react-native-toolbar-android/toolbar-android/tree/master) ![Supports Android](https://img.shields.io/badge/platforms-android-lightgrey.svg) ![MIT License](https://img.shields.io/npm/l/@react-native-community/toolbar-android.svg) [![npm version](https://img.shields.io/npm/v/@react-native-community/toolbar-android.svg?style=flat)](https://www.npmjs.com/package/@react-native-community/toolbar-android) [![Lean Core Extracted](https://img.shields.io/badge/Lean%20Core-Extracted-brightgreen.svg)](https://github.com/facebook/react-native/issues/23313) 3 | 4 | ## What is it? 5 | A React component that wraps the Android-only [Toolbar widget](https://developer.android.com/reference/android/widget/Toolbar). 6 | 7 | This is extracted from react-native per [lean core](https://github.com/facebook/react-native/issues/23313) initiative, which removed `ToolbarAndroid` at v0.61. The goal of this repo is to house the original component and continue to improve and maintain a lean wrapper with zero dependency other than react and react-native. 8 | 9 | 10 | ![Alt text](screenShots/ToolbarAndroidExample.png) 11 | 12 | ## Getting started 13 | 14 | `yarn add @react-native-community/toolbar-android` 15 | 16 | or 17 | 18 | `npm install @react-native-community/toolbar-android --save` 19 | 20 | Now link the native code with your project: 21 | 22 | ``` 23 | # RN >= 0.60 24 | npx pod-install 25 | 26 | # RN < 0.60 27 | react-native link @react-native-community/toolbar-android 28 | ``` 29 | 30 | ### Manual installation 31 | 32 |
33 | Manually link the library on Android 34 | 35 | #### `android/settings.gradle` 36 | ```groovy 37 | include ':react-native-community-toolbar-android' 38 | project(':react-native-community-toolbar-android').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/toolbar-android/android') 39 | ``` 40 | 41 | #### `android/app/build.gradle` 42 | ```groovy 43 | dependencies { 44 | ... 45 | implementation project(':react-native-community-toolbar-android') 46 | } 47 | ``` 48 | 49 | #### `android/app/src/main/.../MainApplication.java` 50 | On top, where imports are: 51 | 52 | ```java 53 | import com.reactnativecommunity.toolbarandroid.ReactToolbarPackage; 54 | ``` 55 | 56 | Add the `toolbar-android` class to your list of exported packages. 57 | 58 | ```java 59 | @Override 60 | protected List getPackages() { 61 | return Arrays.asList( 62 | new MainReactPackage(), 63 | new ReactToolbarPackage() 64 | ); 65 | } 66 | ``` 67 |
68 | 69 | ## Migrating from the core `react-native` module 70 | This module was created when the ToolbarAndroid was split out from the core of React Native. To migrate to this module you need to follow the installation instructions above and then change you imports from: 71 | 72 | ```javascript 73 | import { ToolbarAndroid } from 'react-native'; 74 | ``` 75 | 76 | to: 77 | 78 | ```javascript 79 | import ToolbarAndroid from '@react-native-community/toolbar-android'; 80 | ``` 81 | 82 | ## Usage 83 | 84 | see [ToolbarAndroid](./doc/toolbarandroid.md) 85 | 86 | ## Contributors 87 | 88 | This module was extracted from `react-native` core. 89 | 90 | ## License 91 | The library is released under the MIT licence. For more information see `LICENSE`. 92 | -------------------------------------------------------------------------------- /android/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | android_ 4 | Project android_ created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.buildship.core.gradleprojectbuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.buildship.core.gradleprojectnature 16 | 17 | 18 | 19 | 1630614539697 20 | 21 | 30 22 | 23 | org.eclipse.core.resources.regexFilterMatcher 24 | node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /android/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | arguments= 2 | auto.sync=false 3 | build.scans.enabled=false 4 | connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(7.0-rc-1)) 5 | connection.project.dir= 6 | eclipse.preferences.version=1 7 | gradle.user.home= 8 | java.home=/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home 9 | jvm.arguments= 10 | offline.mode=false 11 | override.workspace.settings=true 12 | show.console.view=true 13 | show.executions.view=true 14 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | 2 | buildscript { 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.4.2' 10 | } 11 | } 12 | 13 | apply plugin: 'com.android.library' 14 | 15 | def safeExtGet(prop, fallback) { 16 | rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback 17 | } 18 | 19 | android { 20 | compileSdkVersion safeExtGet("compileSdkVersion", 28) 21 | buildToolsVersion safeExtGet("buildToolsVersion", "28.0.3") 22 | 23 | defaultConfig { 24 | minSdkVersion safeExtGet("minSdkVersion", 16) 25 | targetSdkVersion safeExtGet("targetSdkVersion", 28) 26 | versionCode 1 27 | versionName "1.0" 28 | } 29 | 30 | lintOptions { 31 | abortOnError false 32 | } 33 | } 34 | 35 | repositories { 36 | mavenCentral() 37 | } 38 | 39 | dependencies { 40 | implementation 'com.facebook.react:react-native:+' 41 | } 42 | 43 | -------------------------------------------------------------------------------- /android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /android/src/main/java/com/reactnativecommunity/toolbarandroid/BUCK: -------------------------------------------------------------------------------- 1 | load("//tools/build_defs/oss:rn_defs.bzl", "YOGA_TARGET", "react_native_dep", "react_native_target", "rn_android_library") 2 | 3 | rn_android_library( 4 | name = "toolbar", 5 | srcs = glob(["**/*.java"]), 6 | is_androidx = True, 7 | provided_deps = [ 8 | react_native_dep("third-party/android/androidx:annotation"), 9 | react_native_dep("third-party/android/androidx:appcompat"), 10 | react_native_dep("third-party/android/androidx:core"), 11 | react_native_dep("third-party/android/androidx:fragment"), 12 | react_native_dep("third-party/android/androidx:legacy-support-core-ui"), 13 | react_native_dep("third-party/android/androidx:legacy-support-core-utils"), 14 | ], 15 | visibility = [ 16 | "PUBLIC", 17 | ], 18 | deps = [ 19 | YOGA_TARGET, 20 | react_native_dep("libraries/fresco/fresco-react-native:fbcore"), 21 | react_native_dep("libraries/fresco/fresco-react-native:fresco-drawee"), 22 | react_native_dep("libraries/fresco/fresco-react-native:fresco-react-native"), 23 | react_native_dep("libraries/fresco/fresco-react-native:imagepipeline"), 24 | react_native_dep("third-party/java/jsr-305:jsr-305"), 25 | react_native_target("java/com/facebook/react/bridge:bridge"), 26 | react_native_target("java/com/facebook/react/common:common"), 27 | react_native_target("java/com/facebook/react/uimanager:uimanager"), 28 | react_native_target("java/com/facebook/react/uimanager/annotations:annotations"), 29 | ], 30 | ) 31 | -------------------------------------------------------------------------------- /android/src/main/java/com/reactnativecommunity/toolbarandroid/DrawableWithIntrinsicSize.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | package com.reactnativecommunity.toolbarandroid; 9 | 10 | import android.graphics.drawable.Drawable; 11 | 12 | import com.facebook.drawee.drawable.ForwardingDrawable; 13 | import com.facebook.imagepipeline.image.ImageInfo; 14 | import com.facebook.react.uimanager.PixelUtil; 15 | 16 | /** 17 | * Fresco currently sets drawables' intrinsic size to (-1, -1). This is to guarantee that scaling is 18 | * performed correctly. In the case of the Toolbar, we don't have access to the widget's internal 19 | * ImageView, which has width/height set to WRAP_CONTENT, which relies on intrinsic size. 20 | * 21 | * To work around this we have this class which just wraps another Drawable, but returns the correct 22 | * dimensions in getIntrinsicWidth/Height. This makes WRAP_CONTENT work in Toolbar's internals. 23 | * 24 | * This drawable uses the size of a loaded image to determine the intrinsic size. It therefore can't 25 | * be used safely until *after* an image has loaded, and must be replaced when the image is 26 | * replaced. 27 | */ 28 | public class DrawableWithIntrinsicSize extends ForwardingDrawable implements Drawable.Callback { 29 | 30 | private final ImageInfo mImageInfo; 31 | 32 | public DrawableWithIntrinsicSize(Drawable drawable, ImageInfo imageInfo) { 33 | super(drawable); 34 | mImageInfo = imageInfo; 35 | } 36 | 37 | @Override 38 | public int getIntrinsicWidth() { 39 | return mImageInfo.getWidth(); 40 | } 41 | 42 | @Override 43 | public int getIntrinsicHeight() { 44 | return mImageInfo.getHeight(); 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /android/src/main/java/com/reactnativecommunity/toolbarandroid/ReactToolbarPackage.java: -------------------------------------------------------------------------------- 1 | 2 | package com.reactnativecommunity.toolbarandroid; 3 | 4 | import java.util.Arrays; 5 | import java.util.Collections; 6 | import java.util.List; 7 | 8 | import com.facebook.react.ReactPackage; 9 | import com.facebook.react.bridge.NativeModule; 10 | import com.facebook.react.bridge.ReactApplicationContext; 11 | import com.facebook.react.uimanager.ViewManager; 12 | import com.facebook.react.bridge.JavaScriptModule; 13 | 14 | public class ReactToolbarPackage implements ReactPackage { 15 | @Override 16 | public List createNativeModules(ReactApplicationContext reactContext) { 17 | return Collections.emptyList(); 18 | } 19 | 20 | // Deprecated from RN 0.47 21 | public List> createJSModules() { 22 | return Collections.emptyList(); 23 | } 24 | 25 | @Override 26 | public List createViewManagers(ReactApplicationContext reactContext) { 27 | return Arrays.asList(new ReactToolbarManager()); 28 | } 29 | } -------------------------------------------------------------------------------- /android/src/main/java/com/reactnativecommunity/toolbarandroid/events/ToolbarClickEvent.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | package com.reactnativecommunity.toolbarandroid.events; 8 | 9 | import com.facebook.react.bridge.WritableMap; 10 | import com.facebook.react.bridge.WritableNativeMap; 11 | import com.facebook.react.uimanager.events.Event; 12 | import com.facebook.react.uimanager.events.RCTEventEmitter; 13 | 14 | /** 15 | * Represents a click on the toolbar. 16 | * Position is meaningful when the click happened on a menu 17 | */ 18 | public class ToolbarClickEvent extends Event { 19 | 20 | private static final String EVENT_NAME = "topSelect"; 21 | private final int position; 22 | 23 | public ToolbarClickEvent(int viewId, int position) { 24 | super(viewId); 25 | this.position = position; 26 | } 27 | 28 | public int getPosition() { 29 | return position; 30 | } 31 | 32 | @Override 33 | public String getEventName() { 34 | return EVENT_NAME; 35 | } 36 | 37 | @Override 38 | public boolean canCoalesce() { 39 | return false; 40 | } 41 | 42 | @Override 43 | public void dispatch(RCTEventEmitter rctEventEmitter) { 44 | WritableMap event = new WritableNativeMap(); 45 | event.putInt("position", getPosition()); 46 | rctEventEmitter.receiveEvent(getViewTag(), getEventName(), event); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | plugins: ['@babel/plugin-proposal-class-properties'], 4 | }; 5 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: '@react-native-community', 4 | }; 5 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | project.xcworkspace 24 | 25 | # Android/IntelliJ 26 | # 27 | build/ 28 | .idea 29 | .gradle 30 | local.properties 31 | *.iml 32 | 33 | # node.js 34 | # 35 | node_modules/ 36 | npm-debug.log 37 | yarn-error.log 38 | 39 | # BUCK 40 | buck-out/ 41 | \.buckd/ 42 | *.keystore 43 | 44 | # fastlane 45 | # 46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 47 | # screenshots whenever they are needed. 48 | # For more information about the recommended setup visit: 49 | # https://docs.fastlane.tools/best-practices/source-control/ 50 | 51 | */fastlane/report.xml 52 | */fastlane/Preview.html 53 | */fastlane/screenshots 54 | 55 | # Bundle artifact 56 | *.jsbundle 57 | 58 | # CocoaPods 59 | /ios/Pods/ 60 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/README.md: -------------------------------------------------------------------------------- 1 | 2 | # Examples 3 | These examples are meant to test with the local toolbar-android changes. 4 | 5 | # How to run: 6 | 7 | - install `@react-native-community/toolbar-android` from local repo: `yarn sync` (this is a passive sync, i.e. you need to do this manually when you want to test the changes) 8 | - test: `yarn test` 9 | - run: `yarn ios` or `yarn android` -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/ToolbarAndroidExample/ToolbarAndroidExample.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample React Native App 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | * @flow 7 | * @lint-ignore-every XPLATJSCOPYRIGHT1 8 | */ 9 | 10 | import React, {Component} from 'react'; 11 | import {Platform, StyleSheet, Text, View} from 'react-native'; 12 | 13 | import ToolbarAndroid from '@react-native-community/toolbar-android'; 14 | 15 | const instructions = Platform.select({ 16 | ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu', 17 | android: 18 | 'Double tap R on your keyboard to reload,\n' + 19 | 'Shake or press menu button for dev menu!', 20 | }); 21 | const initialMessage = Platform.select({ 22 | ios: 'Toolbar-Android is no-op in iOS', 23 | android: 'Click on the toolbar icons above to test...', 24 | }); 25 | 26 | type Props = {}; 27 | type State = { 28 | message: string, 29 | }; 30 | export default class ToolbarAndroidExample extends Component { 31 | constructor(props: any) { 32 | super(props); 33 | 34 | this.state = {message: initialMessage}; 35 | } 36 | 37 | render() { 38 | return ( 39 | 40 | this.setState({message: 'Menu is clicked'})} 48 | onActionSelected={position => 49 | this.setState({message: `action ${position} is clicked`}) 50 | } 51 | /> 52 | 53 | 54 | Welcome to React Native ToolbarAndroid Example! 55 | 56 | {this.state.message} 57 | {instructions} 58 | 59 | 60 | ); 61 | } 62 | } 63 | 64 | const styles = StyleSheet.create({ 65 | container: { 66 | flex: 1, 67 | }, 68 | toolbar: { 69 | backgroundColor: '#E9EAED', 70 | height: 56, 71 | }, 72 | centerContainer: { 73 | flex: 1, 74 | justifyContent: 'center', 75 | alignItems: 'center', 76 | backgroundColor: '#F5FCFF', 77 | }, 78 | welcome: { 79 | fontSize: 20, 80 | textAlign: 'center', 81 | margin: 10, 82 | }, 83 | instructions: { 84 | textAlign: 'center', 85 | color: '#333333', 86 | marginBottom: 5, 87 | }, 88 | message: { 89 | color: 'red', 90 | fontSize: 15, 91 | margin: 8, 92 | }, 93 | }); 94 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/ToolbarAndroidExample/ic_menu_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-060/ToolbarAndroidExample/ic_menu_black_24dp.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/ToolbarAndroidExample/index.js: -------------------------------------------------------------------------------- 1 | import ToolbarAndroidExample from './ToolbarAndroidExample'; 2 | 3 | export default ToolbarAndroidExample; 4 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/ToolbarAndroidExample/relay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-060/ToolbarAndroidExample/relay.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/__tests__/App-test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import 'react-native'; 6 | import React from 'react'; 7 | import App from '../ToolbarAndroidExample'; 8 | 9 | // Note: test renderer must be required after react-native. 10 | import renderer from 'react-test-renderer'; 11 | 12 | it('renders correctly', () => { 13 | renderer.create(); 14 | }); 15 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/android/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | ToolbarAndroidExample060 4 | Project android created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.buildship.core.gradleprojectbuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.buildship.core.gradleprojectnature 16 | 17 | 18 | 19 | 1630614539689 20 | 21 | 30 22 | 23 | org.eclipse.core.resources.regexFilterMatcher 24 | node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/android/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | arguments= 2 | auto.sync=false 3 | build.scans.enabled=false 4 | connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) 5 | connection.project.dir= 6 | eclipse.preferences.version=1 7 | gradle.user.home= 8 | java.home=/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home 9 | jvm.arguments= 10 | offline.mode=false 11 | override.workspace.settings=true 12 | show.console.view=true 13 | show.executions.view=true 14 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/android/app/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/android/app/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | app 4 | Project app created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.buildship.core.gradleprojectbuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.buildship.core.gradleprojectnature 22 | 23 | 24 | 25 | 1630614539700 26 | 27 | 30 28 | 29 | org.eclipse.core.resources.regexFilterMatcher 30 | node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/android/app/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | connection.project.dir=.. 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/android/app/_BUCK: -------------------------------------------------------------------------------- 1 | # To learn about Buck see [Docs](https://buckbuild.com/). 2 | # To run your application with Buck: 3 | # - install Buck 4 | # - `npm start` - to start the packager 5 | # - `cd android` 6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 8 | # - `buck install -r android/app` - compile, install and run application 9 | # 10 | 11 | load(":build_defs.bzl", "create_aar_targets", "create_jar_targets") 12 | 13 | lib_deps = [] 14 | 15 | create_aar_targets(glob(["libs/*.aar"])) 16 | 17 | create_jar_targets(glob(["libs/*.jar"])) 18 | 19 | android_library( 20 | name = "all-libs", 21 | exported_deps = lib_deps, 22 | ) 23 | 24 | android_library( 25 | name = "app-code", 26 | srcs = glob([ 27 | "src/main/java/**/*.java", 28 | ]), 29 | deps = [ 30 | ":all-libs", 31 | ":build_config", 32 | ":res", 33 | ], 34 | ) 35 | 36 | android_build_config( 37 | name = "build_config", 38 | package = "com.toolbarandroidexample060", 39 | ) 40 | 41 | android_resource( 42 | name = "res", 43 | package = "com.toolbarandroidexample060", 44 | res = "src/main/res", 45 | ) 46 | 47 | android_binary( 48 | name = "app", 49 | keystore = "//android/keystores:debug", 50 | manifest = "src/main/AndroidManifest.xml", 51 | package_type = "debug", 52 | deps = [ 53 | ":app-code", 54 | ], 55 | ) 56 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/android/app/build_defs.bzl: -------------------------------------------------------------------------------- 1 | """Helper definitions to glob .aar and .jar targets""" 2 | 3 | def create_aar_targets(aarfiles): 4 | for aarfile in aarfiles: 5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] 6 | lib_deps.append(":" + name) 7 | android_prebuilt_aar( 8 | name = name, 9 | aar = aarfile, 10 | ) 11 | 12 | def create_jar_targets(jarfiles): 13 | for jarfile in jarfiles: 14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")] 15 | lib_deps.append(":" + name) 16 | prebuilt_jar( 17 | name = name, 18 | binary_jar = jarfile, 19 | ) 20 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 13 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/android/app/src/main/java/com/toolbarandroidexample060/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.toolbarandroidexample060; 2 | 3 | import com.facebook.react.ReactActivity; 4 | 5 | public class MainActivity extends ReactActivity { 6 | 7 | /** 8 | * Returns the name of the main component registered from JavaScript. 9 | * This is used to schedule rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "ToolbarAndroidExample060"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/android/app/src/main/java/com/toolbarandroidexample060/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.toolbarandroidexample060; 2 | 3 | import android.app.Application; 4 | 5 | import com.facebook.react.PackageList; 6 | import com.facebook.react.ReactApplication; 7 | import com.facebook.react.ReactNativeHost; 8 | import com.facebook.react.ReactPackage; 9 | import com.facebook.soloader.SoLoader; 10 | 11 | import java.util.List; 12 | 13 | public class MainApplication extends Application implements ReactApplication { 14 | 15 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { 16 | @Override 17 | public boolean getUseDeveloperSupport() { 18 | return BuildConfig.DEBUG; 19 | } 20 | 21 | @Override 22 | protected List getPackages() { 23 | @SuppressWarnings("UnnecessaryLocalVariable") 24 | List packages = new PackageList(this).getPackages(); 25 | // Packages that cannot be autolinked yet can be added manually here, for example: 26 | // packages.add(new MyReactNativePackage()); 27 | return packages; 28 | } 29 | 30 | @Override 31 | protected String getJSMainModuleName() { 32 | return "index"; 33 | } 34 | }; 35 | 36 | @Override 37 | public ReactNativeHost getReactNativeHost() { 38 | return mReactNativeHost; 39 | } 40 | 41 | @Override 42 | public void onCreate() { 43 | super.onCreate(); 44 | SoLoader.init(this, /* native exopackage */ false); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-060/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-060/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-060/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-060/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-060/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-060/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-060/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-060/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-060/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-060/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ToolbarAndroidExample060 3 | 4 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext { 5 | buildToolsVersion = "28.0.3" 6 | minSdkVersion = 16 7 | compileSdkVersion = 28 8 | targetSdkVersion = 28 9 | supportLibVersion = "28.0.0" 10 | } 11 | repositories { 12 | google() 13 | jcenter() 14 | } 15 | dependencies { 16 | classpath("com.android.tools.build:gradle:3.4.1") 17 | 18 | // NOTE: Do not place your application dependencies here; they belong 19 | // in the individual module build.gradle files 20 | } 21 | } 22 | 23 | allprojects { 24 | repositories { 25 | mavenLocal() 26 | maven { 27 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 28 | url("$rootDir/../node_modules/react-native/android") 29 | } 30 | maven { 31 | // Android JSC is installed from npm 32 | url("$rootDir/../node_modules/jsc-android/dist") 33 | } 34 | 35 | google() 36 | jcenter() 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | android.useAndroidX=true 21 | android.enableJetifier=true 22 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-060/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem http://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 33 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 34 | 35 | @rem Find java.exe 36 | if defined JAVA_HOME goto findJavaFromJavaHome 37 | 38 | set JAVA_EXE=java.exe 39 | %JAVA_EXE% -version >NUL 2>&1 40 | if "%ERRORLEVEL%" == "0" goto init 41 | 42 | echo. 43 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 44 | echo. 45 | echo Please set the JAVA_HOME variable in your environment to match the 46 | echo location of your Java installation. 47 | 48 | goto fail 49 | 50 | :findJavaFromJavaHome 51 | set JAVA_HOME=%JAVA_HOME:"=% 52 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 53 | 54 | if exist "%JAVA_EXE%" goto init 55 | 56 | echo. 57 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 58 | echo. 59 | echo Please set the JAVA_HOME variable in your environment to match the 60 | echo location of your Java installation. 61 | 62 | goto fail 63 | 64 | :init 65 | @rem Get command-line arguments, handling Windows variants 66 | 67 | if not "%OS%" == "Windows_NT" goto win9xME_args 68 | 69 | :win9xME_args 70 | @rem Slurp the command line arguments. 71 | set CMD_LINE_ARGS= 72 | set _SKIP=2 73 | 74 | :win9xME_args_slurp 75 | if "x%~1" == "x" goto execute 76 | 77 | set CMD_LINE_ARGS=%* 78 | 79 | :execute 80 | @rem Setup the command line 81 | 82 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 83 | 84 | @rem Execute Gradle 85 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 86 | 87 | :end 88 | @rem End local scope for the variables with windows NT shell 89 | if "%ERRORLEVEL%"=="0" goto mainEnd 90 | 91 | :fail 92 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 93 | rem the _cmd.exe /c_ return code! 94 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 95 | exit /b 1 96 | 97 | :mainEnd 98 | if "%OS%"=="Windows_NT" endlocal 99 | 100 | :omega 101 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'ToolbarAndroidExample060' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ToolbarAndroidExample060", 3 | "displayName": "ToolbarAndroidExample060" 4 | } -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import {AppRegistry} from 'react-native'; 6 | // import App from './App'; 7 | import ToolbarAndroidExample from './ToolbarAndroidExample'; 8 | import {name as appName} from './app.json'; 9 | 10 | AppRegistry.registerComponent(appName, () => ToolbarAndroidExample); 11 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/ios/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '9.0' 2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' 3 | 4 | target 'ToolbarAndroidExample060' do 5 | # Pods for ToolbarAndroidExample060 6 | pod 'React', :path => '../node_modules/react-native/' 7 | pod 'React-Core', :path => '../node_modules/react-native/React' 8 | pod 'React-DevSupport', :path => '../node_modules/react-native/React' 9 | pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook' 10 | pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS' 11 | pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation' 12 | pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob' 13 | pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image' 14 | pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS' 15 | pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network' 16 | pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings' 17 | pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text' 18 | pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration' 19 | pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket' 20 | 21 | pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact' 22 | pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi' 23 | pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor' 24 | pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector' 25 | pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga' 26 | 27 | pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec' 28 | pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec' 29 | pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec' 30 | 31 | target 'ToolbarAndroidExample060Tests' do 32 | inherit! :search_paths 33 | # Pods for testing 34 | end 35 | 36 | use_native_modules! 37 | end 38 | 39 | target 'ToolbarAndroidExample060-tvOS' do 40 | # Pods for ToolbarAndroidExample060-tvOS 41 | 42 | target 'ToolbarAndroidExample060-tvOSTests' do 43 | inherit! :search_paths 44 | # Pods for testing 45 | end 46 | 47 | end 48 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/ios/ToolbarAndroidExample060-tvOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | NSAppTransportSecurity 26 | 27 | NSExceptionDomains 28 | 29 | localhost 30 | 31 | NSExceptionAllowsInsecureHTTPLoads 32 | 33 | 34 | 35 | 36 | NSLocationWhenInUseUsageDescription 37 | 38 | UILaunchStoryboardName 39 | LaunchScreen 40 | UIRequiredDeviceCapabilities 41 | 42 | armv7 43 | 44 | UISupportedInterfaceOrientations 45 | 46 | UIInterfaceOrientationPortrait 47 | UIInterfaceOrientationLandscapeLeft 48 | UIInterfaceOrientationLandscapeRight 49 | 50 | UIViewControllerBasedStatusBarAppearance 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/ios/ToolbarAndroidExample060-tvOSTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/ios/ToolbarAndroidExample060.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/ios/ToolbarAndroidExample060/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (nonatomic, strong) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/ios/ToolbarAndroidExample060/AppDelegate.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import "AppDelegate.h" 9 | 10 | #import 11 | #import 12 | #import 13 | 14 | @implementation AppDelegate 15 | 16 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 17 | { 18 | RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; 19 | RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge 20 | moduleName:@"ToolbarAndroidExample060" 21 | initialProperties:nil]; 22 | 23 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; 24 | 25 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 26 | UIViewController *rootViewController = [UIViewController new]; 27 | rootViewController.view = rootView; 28 | self.window.rootViewController = rootViewController; 29 | [self.window makeKeyAndVisible]; 30 | return YES; 31 | } 32 | 33 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge 34 | { 35 | #if DEBUG 36 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; 37 | #else 38 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 39 | #endif 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/ios/ToolbarAndroidExample060/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/ios/ToolbarAndroidExample060/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/ios/ToolbarAndroidExample060/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ToolbarAndroidExample060 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | NSAppTransportSecurity 28 | 29 | NSAllowsArbitraryLoads 30 | 31 | NSExceptionDomains 32 | 33 | localhost 34 | 35 | NSExceptionAllowsInsecureHTTPLoads 36 | 37 | 38 | 39 | 40 | NSLocationWhenInUseUsageDescription 41 | 42 | UILaunchStoryboardName 43 | LaunchScreen 44 | UIRequiredDeviceCapabilities 45 | 46 | armv7 47 | 48 | UISupportedInterfaceOrientations 49 | 50 | UIInterfaceOrientationPortrait 51 | UIInterfaceOrientationLandscapeLeft 52 | UIInterfaceOrientationLandscapeRight 53 | 54 | UIViewControllerBasedStatusBarAppearance 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/ios/ToolbarAndroidExample060/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/ios/ToolbarAndroidExample060Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/ios/ToolbarAndroidExample060Tests/ToolbarAndroidExample060Tests.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | #import 10 | 11 | #import 12 | #import 13 | 14 | #define TIMEOUT_SECONDS 600 15 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!" 16 | 17 | @interface ToolbarAndroidExample060Tests : XCTestCase 18 | 19 | @end 20 | 21 | @implementation ToolbarAndroidExample060Tests 22 | 23 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 24 | { 25 | if (test(view)) { 26 | return YES; 27 | } 28 | for (UIView *subview in [view subviews]) { 29 | if ([self findSubviewInView:subview matching:test]) { 30 | return YES; 31 | } 32 | } 33 | return NO; 34 | } 35 | 36 | - (void)testRendersWelcomeScreen 37 | { 38 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; 39 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 40 | BOOL foundElement = NO; 41 | 42 | __block NSString *redboxError = nil; 43 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 44 | if (level >= RCTLogLevelError) { 45 | redboxError = message; 46 | } 47 | }); 48 | 49 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 50 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 51 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 52 | 53 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 54 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 55 | return YES; 56 | } 57 | return NO; 58 | }]; 59 | } 60 | 61 | RCTSetLogFunction(RCTDefaultLogFunction); 62 | 63 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 64 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 65 | } 66 | 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/metro.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Metro configuration for React Native 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | */ 7 | 8 | module.exports = { 9 | transformer: { 10 | getTransformOptions: async () => ({ 11 | transform: { 12 | experimentalImportSupport: false, 13 | inlineRequires: false, 14 | }, 15 | }), 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-060/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ToolbarAndroidExample060", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "sync": "../scripts/update-local-pkg.sh ../..", 7 | "android": "react-native run-android", 8 | "ios": "react-native run-ios", 9 | "start": "react-native start", 10 | "test": "jest", 11 | "lint": "eslint ." 12 | }, 13 | "dependencies": { 14 | "@react-native-community/toolbar-android": "file:../../react-native-community-toolbar-android-current.tgz", 15 | "react": "16.8.6", 16 | "react-native": "0.60.0" 17 | }, 18 | "devDependencies": { 19 | "@babel/core": "^7.3.3", 20 | "@babel/runtime": "^7.3.1", 21 | "@react-native-community/eslint-config": "^0.0.3", 22 | "babel-jest": "^24.1.0", 23 | "jest": "^24.1.0", 24 | "metro-react-native-babel-preset": "^0.54.1", 25 | "react-test-renderer": "16.8.6" 26 | }, 27 | "jest": { 28 | "preset": "react-native" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: '@react-native-community', 4 | }; 5 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | ; We fork some components by platform 3 | .*/*[.]android.js 4 | 5 | ; Ignore "BUCK" generated dirs 6 | /\.buckd/ 7 | 8 | ; Ignore polyfills 9 | node_modules/react-native/Libraries/polyfills/.* 10 | 11 | ; These should not be required directly 12 | ; require from fbjs/lib instead: require('fbjs/lib/warning') 13 | node_modules/warning/.* 14 | 15 | ; Flow doesn't support platforms 16 | .*/Libraries/Utilities/LoadingView.js 17 | 18 | [untyped] 19 | .*/node_modules/@react-native-community/cli/.*/.* 20 | 21 | [include] 22 | 23 | [libs] 24 | node_modules/react-native/Libraries/react-native/react-native-interface.js 25 | node_modules/react-native/flow/ 26 | 27 | [options] 28 | emoji=true 29 | 30 | esproposal.optional_chaining=enable 31 | esproposal.nullish_coalescing=enable 32 | 33 | module.file_ext=.js 34 | module.file_ext=.json 35 | module.file_ext=.ios.js 36 | 37 | munge_underscores=true 38 | 39 | module.name_mapper='^react-native$' -> '/node_modules/react-native/Libraries/react-native/react-native-implementation' 40 | module.name_mapper='^react-native/\(.*\)$' -> '/node_modules/react-native/\1' 41 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '/node_modules/react-native/Libraries/Image/RelativeImageStub' 42 | 43 | suppress_type=$FlowIssue 44 | suppress_type=$FlowFixMe 45 | suppress_type=$FlowFixMeProps 46 | suppress_type=$FlowFixMeState 47 | 48 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\) 49 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+ 50 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError 51 | 52 | [lints] 53 | sketchy-null-number=warn 54 | sketchy-null-mixed=warn 55 | sketchy-number=warn 56 | untyped-type-import=warn 57 | nonstrict-import=warn 58 | deprecated-type=warn 59 | unsafe-getters-setters=warn 60 | inexact-spread=warn 61 | unnecessary-invariant=warn 62 | signature-verification-failure=warn 63 | deprecated-utility=error 64 | 65 | [strict] 66 | deprecated-type 67 | nonstrict-import 68 | sketchy-null 69 | unclear-type 70 | unsafe-getters-setters 71 | untyped-import 72 | untyped-type-import 73 | 74 | [version] 75 | ^0.105.0 76 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | 24 | # Android/IntelliJ 25 | # 26 | build/ 27 | .idea 28 | .gradle 29 | local.properties 30 | *.iml 31 | 32 | # node.js 33 | # 34 | node_modules/ 35 | npm-debug.log 36 | yarn-error.log 37 | 38 | # BUCK 39 | buck-out/ 40 | \.buckd/ 41 | *.keystore 42 | !debug.keystore 43 | 44 | # fastlane 45 | # 46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 47 | # screenshots whenever they are needed. 48 | # For more information about the recommended setup visit: 49 | # https://docs.fastlane.tools/best-practices/source-control/ 50 | 51 | */fastlane/report.xml 52 | */fastlane/Preview.html 53 | */fastlane/screenshots 54 | 55 | # Bundle artifact 56 | *.jsbundle 57 | 58 | # CocoaPods 59 | /ios/Pods/ 60 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | bracketSpacing: false, 3 | jsxBracketSameLine: true, 4 | singleQuote: true, 5 | trailingComma: 'all', 6 | }; 7 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/README.md: -------------------------------------------------------------------------------- 1 | 2 | # Examples 3 | These examples are meant to test with the local toolbar-android changes. 4 | 5 | # How to run: 6 | 7 | - install `@react-native-community/toolbar-android` from local repo: `yarn sync` (this is a passive sync, i.e. you need to do this manually when you want to test the changes) 8 | - test: `yarn test` 9 | - run: `yarn ios` or `yarn android` -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/ToolbarAndroidExample/ToolbarAndroidExample.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample React Native App 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | * @flow 7 | * @lint-ignore-every XPLATJSCOPYRIGHT1 8 | */ 9 | 10 | import React, {Component} from 'react'; 11 | import {Platform, StyleSheet, Text, View} from 'react-native'; 12 | 13 | import ToolbarAndroid from '@react-native-community/toolbar-android'; 14 | 15 | const instructions = Platform.select({ 16 | ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu', 17 | android: 18 | 'Double tap R on your keyboard to reload,\n' + 19 | 'Shake or press menu button for dev menu!', 20 | }); 21 | const initialMessage = Platform.select({ 22 | ios: 'Toolbar-Android is no-op in iOS', 23 | android: 'Click on the toolbar icons above to test...', 24 | }); 25 | 26 | type Props = {}; 27 | type State = { 28 | message: string, 29 | }; 30 | export default class ToolbarAndroidExample extends Component { 31 | constructor(props: any) { 32 | super(props); 33 | 34 | this.state = {message: initialMessage}; 35 | } 36 | 37 | render() { 38 | return ( 39 | 40 | this.setState({message: 'Menu is clicked'})} 48 | onActionSelected={position => 49 | this.setState({message: `action ${position} is clicked`}) 50 | } 51 | /> 52 | 53 | 54 | Welcome to React Native ToolbarAndroid Example! 55 | 56 | {this.state.message} 57 | {instructions} 58 | 59 | 60 | ); 61 | } 62 | } 63 | 64 | const styles = StyleSheet.create({ 65 | container: { 66 | flex: 1, 67 | }, 68 | toolbar: { 69 | backgroundColor: '#E9EAED', 70 | height: 56, 71 | }, 72 | centerContainer: { 73 | flex: 1, 74 | justifyContent: 'center', 75 | alignItems: 'center', 76 | backgroundColor: '#F5FCFF', 77 | }, 78 | welcome: { 79 | fontSize: 20, 80 | textAlign: 'center', 81 | margin: 10, 82 | }, 83 | instructions: { 84 | textAlign: 'center', 85 | color: '#333333', 86 | marginBottom: 5, 87 | }, 88 | message: { 89 | color: 'red', 90 | fontSize: 15, 91 | margin: 8, 92 | }, 93 | }); 94 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/ToolbarAndroidExample/ic_menu_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-061/ToolbarAndroidExample/ic_menu_black_24dp.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/ToolbarAndroidExample/index.js: -------------------------------------------------------------------------------- 1 | import ToolbarAndroidExample from './ToolbarAndroidExample'; 2 | 3 | export default ToolbarAndroidExample; 4 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/ToolbarAndroidExample/relay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-061/ToolbarAndroidExample/relay.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/__tests__/App-test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import 'react-native'; 6 | import React from 'react'; 7 | import App from '../ToolbarAndroidExample'; 8 | 9 | // Note: test renderer must be required after react-native. 10 | import renderer from 'react-test-renderer'; 11 | 12 | it('renders correctly', () => { 13 | renderer.create(); 14 | }); 15 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/android/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | android 4 | Project android created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.buildship.core.gradleprojectbuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.buildship.core.gradleprojectnature 16 | 17 | 18 | 19 | 1630614539692 20 | 21 | 30 22 | 23 | org.eclipse.core.resources.regexFilterMatcher 24 | node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/android/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | arguments= 2 | auto.sync=false 3 | build.scans.enabled=false 4 | connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) 5 | connection.project.dir= 6 | eclipse.preferences.version=1 7 | gradle.user.home= 8 | java.home=/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home 9 | jvm.arguments= 10 | offline.mode=false 11 | override.workspace.settings=true 12 | show.console.view=true 13 | show.executions.view=true 14 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/android/app/_BUCK: -------------------------------------------------------------------------------- 1 | # To learn about Buck see [Docs](https://buckbuild.com/). 2 | # To run your application with Buck: 3 | # - install Buck 4 | # - `npm start` - to start the packager 5 | # - `cd android` 6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 8 | # - `buck install -r android/app` - compile, install and run application 9 | # 10 | 11 | load(":build_defs.bzl", "create_aar_targets", "create_jar_targets") 12 | 13 | lib_deps = [] 14 | 15 | create_aar_targets(glob(["libs/*.aar"])) 16 | 17 | create_jar_targets(glob(["libs/*.jar"])) 18 | 19 | android_library( 20 | name = "all-libs", 21 | exported_deps = lib_deps, 22 | ) 23 | 24 | android_library( 25 | name = "app-code", 26 | srcs = glob([ 27 | "src/main/java/**/*.java", 28 | ]), 29 | deps = [ 30 | ":all-libs", 31 | ":build_config", 32 | ":res", 33 | ], 34 | ) 35 | 36 | android_build_config( 37 | name = "build_config", 38 | package = "com.toolbarandroidexample061", 39 | ) 40 | 41 | android_resource( 42 | name = "res", 43 | package = "com.toolbarandroidexample061", 44 | res = "src/main/res", 45 | ) 46 | 47 | android_binary( 48 | name = "app", 49 | keystore = "//android/keystores:debug", 50 | manifest = "src/main/AndroidManifest.xml", 51 | package_type = "debug", 52 | deps = [ 53 | ":app-code", 54 | ], 55 | ) 56 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/android/app/build_defs.bzl: -------------------------------------------------------------------------------- 1 | """Helper definitions to glob .aar and .jar targets""" 2 | 3 | def create_aar_targets(aarfiles): 4 | for aarfile in aarfiles: 5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] 6 | lib_deps.append(":" + name) 7 | android_prebuilt_aar( 8 | name = name, 9 | aar = aarfile, 10 | ) 11 | 12 | def create_jar_targets(jarfiles): 13 | for jarfile in jarfiles: 14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")] 15 | lib_deps.append(":" + name) 16 | prebuilt_jar( 17 | name = name, 18 | binary_jar = jarfile, 19 | ) 20 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-061/android/app/debug.keystore -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 13 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/android/app/src/main/java/com/toolbarandroidexample061/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.toolbarandroidexample061; 2 | 3 | import com.facebook.react.ReactActivity; 4 | 5 | public class MainActivity extends ReactActivity { 6 | 7 | /** 8 | * Returns the name of the main component registered from JavaScript. This is used to schedule 9 | * rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "ToolbarAndroidExample061"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/android/app/src/main/java/com/toolbarandroidexample061/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.toolbarandroidexample061; 2 | 3 | import android.app.Application; 4 | import android.content.Context; 5 | import com.facebook.react.PackageList; 6 | import com.facebook.react.ReactApplication; 7 | import com.facebook.react.ReactNativeHost; 8 | import com.facebook.react.ReactPackage; 9 | import com.facebook.soloader.SoLoader; 10 | import java.lang.reflect.InvocationTargetException; 11 | import java.util.List; 12 | 13 | public class MainApplication extends Application implements ReactApplication { 14 | 15 | private final ReactNativeHost mReactNativeHost = 16 | new ReactNativeHost(this) { 17 | @Override 18 | public boolean getUseDeveloperSupport() { 19 | return BuildConfig.DEBUG; 20 | } 21 | 22 | @Override 23 | protected List getPackages() { 24 | @SuppressWarnings("UnnecessaryLocalVariable") 25 | List packages = new PackageList(this).getPackages(); 26 | // Packages that cannot be autolinked yet can be added manually here, for example: 27 | // packages.add(new MyReactNativePackage()); 28 | return packages; 29 | } 30 | 31 | @Override 32 | protected String getJSMainModuleName() { 33 | return "index"; 34 | } 35 | }; 36 | 37 | @Override 38 | public ReactNativeHost getReactNativeHost() { 39 | return mReactNativeHost; 40 | } 41 | 42 | @Override 43 | public void onCreate() { 44 | super.onCreate(); 45 | SoLoader.init(this, /* native exopackage */ false); 46 | initializeFlipper(this); // Remove this line if you don't want Flipper enabled 47 | } 48 | 49 | /** 50 | * Loads Flipper in React Native templates. 51 | * 52 | * @param context 53 | */ 54 | private static void initializeFlipper(Context context) { 55 | if (BuildConfig.DEBUG) { 56 | try { 57 | /* 58 | We use reflection here to pick up the class that initializes Flipper, 59 | since Flipper library is not available in release mode 60 | */ 61 | Class aClass = Class.forName("com.facebook.flipper.ReactNativeFlipper"); 62 | aClass.getMethod("initializeFlipper", Context.class).invoke(null, context); 63 | } catch (ClassNotFoundException e) { 64 | e.printStackTrace(); 65 | } catch (NoSuchMethodException e) { 66 | e.printStackTrace(); 67 | } catch (IllegalAccessException e) { 68 | e.printStackTrace(); 69 | } catch (InvocationTargetException e) { 70 | e.printStackTrace(); 71 | } 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-061/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-061/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-061/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-061/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-061/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-061/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-061/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-061/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-061/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-061/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ToolbarAndroidExample061 3 | 4 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext { 5 | buildToolsVersion = "28.0.3" 6 | minSdkVersion = 16 7 | compileSdkVersion = 28 8 | targetSdkVersion = 28 9 | } 10 | repositories { 11 | google() 12 | jcenter() 13 | } 14 | dependencies { 15 | classpath("com.android.tools.build:gradle:3.4.2") 16 | 17 | // NOTE: Do not place your application dependencies here; they belong 18 | // in the individual module build.gradle files 19 | } 20 | } 21 | 22 | allprojects { 23 | repositories { 24 | mavenLocal() 25 | maven { 26 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 27 | url("$rootDir/../node_modules/react-native/android") 28 | } 29 | maven { 30 | // Android JSC is installed from npm 31 | url("$rootDir/../node_modules/jsc-android/dist") 32 | } 33 | 34 | google() 35 | jcenter() 36 | maven { url 'https://jitpack.io' } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | android.useAndroidX=true 21 | android.enableJetifier=true 22 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-061/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem http://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 33 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 34 | 35 | @rem Find java.exe 36 | if defined JAVA_HOME goto findJavaFromJavaHome 37 | 38 | set JAVA_EXE=java.exe 39 | %JAVA_EXE% -version >NUL 2>&1 40 | if "%ERRORLEVEL%" == "0" goto init 41 | 42 | echo. 43 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 44 | echo. 45 | echo Please set the JAVA_HOME variable in your environment to match the 46 | echo location of your Java installation. 47 | 48 | goto fail 49 | 50 | :findJavaFromJavaHome 51 | set JAVA_HOME=%JAVA_HOME:"=% 52 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 53 | 54 | if exist "%JAVA_EXE%" goto init 55 | 56 | echo. 57 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 58 | echo. 59 | echo Please set the JAVA_HOME variable in your environment to match the 60 | echo location of your Java installation. 61 | 62 | goto fail 63 | 64 | :init 65 | @rem Get command-line arguments, handling Windows variants 66 | 67 | if not "%OS%" == "Windows_NT" goto win9xME_args 68 | 69 | :win9xME_args 70 | @rem Slurp the command line arguments. 71 | set CMD_LINE_ARGS= 72 | set _SKIP=2 73 | 74 | :win9xME_args_slurp 75 | if "x%~1" == "x" goto execute 76 | 77 | set CMD_LINE_ARGS=%* 78 | 79 | :execute 80 | @rem Setup the command line 81 | 82 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 83 | 84 | @rem Execute Gradle 85 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 86 | 87 | :end 88 | @rem End local scope for the variables with windows NT shell 89 | if "%ERRORLEVEL%"=="0" goto mainEnd 90 | 91 | :fail 92 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 93 | rem the _cmd.exe /c_ return code! 94 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 95 | exit /b 1 96 | 97 | :mainEnd 98 | if "%OS%"=="Windows_NT" endlocal 99 | 100 | :omega 101 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'ToolbarAndroidExample061' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ToolbarAndroidExample061", 3 | "displayName": "ToolbarAndroidExample061" 4 | } -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import {AppRegistry} from 'react-native'; 6 | // import App from './App'; 7 | import ToolbarAndroidExample from './ToolbarAndroidExample'; 8 | import {name as appName} from './app.json'; 9 | 10 | AppRegistry.registerComponent(appName, () => ToolbarAndroidExample); 11 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/ios/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '9.0' 2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' 3 | 4 | target 'ToolbarAndroidExample061' do 5 | # Pods for ToolbarAndroidExample061 6 | pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector" 7 | pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec" 8 | pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired" 9 | pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety" 10 | pod 'React', :path => '../node_modules/react-native/' 11 | pod 'React-Core', :path => '../node_modules/react-native/' 12 | pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules' 13 | pod 'React-Core/DevSupport', :path => '../node_modules/react-native/' 14 | pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS' 15 | pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation' 16 | pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob' 17 | pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image' 18 | pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS' 19 | pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network' 20 | pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings' 21 | pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text' 22 | pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration' 23 | pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/' 24 | 25 | pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact' 26 | pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi' 27 | pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor' 28 | pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector' 29 | pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon" 30 | pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon" 31 | pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga' 32 | 33 | pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec' 34 | pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec' 35 | pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec' 36 | 37 | target 'ToolbarAndroidExample061Tests' do 38 | inherit! :search_paths 39 | # Pods for testing 40 | end 41 | 42 | use_native_modules! 43 | end 44 | 45 | target 'ToolbarAndroidExample061-tvOS' do 46 | # Pods for ToolbarAndroidExample061-tvOS 47 | 48 | target 'ToolbarAndroidExample061-tvOSTests' do 49 | inherit! :search_paths 50 | # Pods for testing 51 | end 52 | 53 | end 54 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/ios/ToolbarAndroidExample061-tvOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | NSAppTransportSecurity 26 | 27 | NSExceptionDomains 28 | 29 | localhost 30 | 31 | NSExceptionAllowsInsecureHTTPLoads 32 | 33 | 34 | 35 | 36 | NSLocationWhenInUseUsageDescription 37 | 38 | UILaunchStoryboardName 39 | LaunchScreen 40 | UIRequiredDeviceCapabilities 41 | 42 | armv7 43 | 44 | UISupportedInterfaceOrientations 45 | 46 | UIInterfaceOrientationPortrait 47 | UIInterfaceOrientationLandscapeLeft 48 | UIInterfaceOrientationLandscapeRight 49 | 50 | UIViewControllerBasedStatusBarAppearance 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/ios/ToolbarAndroidExample061-tvOSTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/ios/ToolbarAndroidExample061.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/ios/ToolbarAndroidExample061.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/ios/ToolbarAndroidExample061/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (nonatomic, strong) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/ios/ToolbarAndroidExample061/AppDelegate.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import "AppDelegate.h" 9 | 10 | #import 11 | #import 12 | #import 13 | 14 | @implementation AppDelegate 15 | 16 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 17 | { 18 | RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; 19 | RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge 20 | moduleName:@"ToolbarAndroidExample061" 21 | initialProperties:nil]; 22 | 23 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; 24 | 25 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 26 | UIViewController *rootViewController = [UIViewController new]; 27 | rootViewController.view = rootView; 28 | self.window.rootViewController = rootViewController; 29 | [self.window makeKeyAndVisible]; 30 | return YES; 31 | } 32 | 33 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge 34 | { 35 | #if DEBUG 36 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; 37 | #else 38 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 39 | #endif 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/ios/ToolbarAndroidExample061/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/ios/ToolbarAndroidExample061/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/ios/ToolbarAndroidExample061/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ToolbarAndroidExample061 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | NSAppTransportSecurity 28 | 29 | NSAllowsArbitraryLoads 30 | 31 | NSExceptionDomains 32 | 33 | localhost 34 | 35 | NSExceptionAllowsInsecureHTTPLoads 36 | 37 | 38 | 39 | 40 | NSLocationWhenInUseUsageDescription 41 | 42 | UILaunchStoryboardName 43 | LaunchScreen 44 | UIRequiredDeviceCapabilities 45 | 46 | armv7 47 | 48 | UISupportedInterfaceOrientations 49 | 50 | UIInterfaceOrientationPortrait 51 | UIInterfaceOrientationLandscapeLeft 52 | UIInterfaceOrientationLandscapeRight 53 | 54 | UIViewControllerBasedStatusBarAppearance 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/ios/ToolbarAndroidExample061/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/ios/ToolbarAndroidExample061Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/ios/ToolbarAndroidExample061Tests/ToolbarAndroidExample061Tests.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | #import 10 | 11 | #import 12 | #import 13 | 14 | #define TIMEOUT_SECONDS 600 15 | #define TEXT_TO_LOOK_FOR @"Welcome to React" 16 | 17 | @interface ToolbarAndroidExample061Tests : XCTestCase 18 | 19 | @end 20 | 21 | @implementation ToolbarAndroidExample061Tests 22 | 23 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 24 | { 25 | if (test(view)) { 26 | return YES; 27 | } 28 | for (UIView *subview in [view subviews]) { 29 | if ([self findSubviewInView:subview matching:test]) { 30 | return YES; 31 | } 32 | } 33 | return NO; 34 | } 35 | 36 | - (void)testRendersWelcomeScreen 37 | { 38 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; 39 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 40 | BOOL foundElement = NO; 41 | 42 | __block NSString *redboxError = nil; 43 | #ifdef DEBUG 44 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 45 | if (level >= RCTLogLevelError) { 46 | redboxError = message; 47 | } 48 | }); 49 | #endif 50 | 51 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 52 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 53 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 54 | 55 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 56 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 57 | return YES; 58 | } 59 | return NO; 60 | }]; 61 | } 62 | 63 | #ifdef DEBUG 64 | RCTSetLogFunction(RCTDefaultLogFunction); 65 | #endif 66 | 67 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 68 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 69 | } 70 | 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/metro.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Metro configuration for React Native 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | */ 7 | 8 | module.exports = { 9 | transformer: { 10 | getTransformOptions: async () => ({ 11 | transform: { 12 | experimentalImportSupport: false, 13 | inlineRequires: false, 14 | }, 15 | }), 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-061/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ToolbarAndroidExample061", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "sync": "../scripts/update-local-pkg.sh ../..", 7 | "android": "react-native run-android", 8 | "ios": "react-native run-ios", 9 | "start": "react-native start", 10 | "test": "jest", 11 | "lint": "eslint ." 12 | }, 13 | "dependencies": { 14 | "@react-native-community/toolbar-android": "file:../../react-native-community-toolbar-android-current.tgz", 15 | "react": "16.9.0", 16 | "react-native": "0.61.5" 17 | }, 18 | "devDependencies": { 19 | "@babel/core": "^7.6.2", 20 | "@babel/runtime": "^7.6.2", 21 | "@react-native-community/eslint-config": "^0.0.5", 22 | "babel-jest": "^24.9.0", 23 | "eslint": "^6.5.1", 24 | "jest": "^24.9.0", 25 | "metro-react-native-babel-preset": "^0.56.0", 26 | "react-test-renderer": "16.9.0" 27 | }, 28 | "jest": { 29 | "preset": "react-native" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/.editorconfig: -------------------------------------------------------------------------------- 1 | # Windows files 2 | [*.bat] 3 | end_of_line = crlf 4 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: '@react-native-community', 4 | }; 5 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | ; We fork some components by platform 3 | .*/*[.]android.js 4 | 5 | ; Ignore "BUCK" generated dirs 6 | /\.buckd/ 7 | 8 | ; Ignore polyfills 9 | node_modules/react-native/Libraries/polyfills/.* 10 | 11 | ; Flow doesn't support platforms 12 | .*/Libraries/Utilities/LoadingView.js 13 | 14 | [untyped] 15 | .*/node_modules/@react-native-community/cli/.*/.* 16 | 17 | [include] 18 | 19 | [libs] 20 | node_modules/react-native/interface.js 21 | node_modules/react-native/flow/ 22 | 23 | [options] 24 | emoji=true 25 | 26 | exact_by_default=true 27 | 28 | module.file_ext=.js 29 | module.file_ext=.json 30 | module.file_ext=.ios.js 31 | 32 | munge_underscores=true 33 | 34 | module.name_mapper='^react-native/\(.*\)$' -> '/node_modules/react-native/\1' 35 | module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '/node_modules/react-native/Libraries/Image/RelativeImageStub' 36 | 37 | suppress_type=$FlowIssue 38 | suppress_type=$FlowFixMe 39 | suppress_type=$FlowFixMeProps 40 | suppress_type=$FlowFixMeState 41 | 42 | [lints] 43 | sketchy-null-number=warn 44 | sketchy-null-mixed=warn 45 | sketchy-number=warn 46 | untyped-type-import=warn 47 | nonstrict-import=warn 48 | deprecated-type=warn 49 | unsafe-getters-setters=warn 50 | unnecessary-invariant=warn 51 | signature-verification-failure=warn 52 | 53 | [strict] 54 | deprecated-type 55 | nonstrict-import 56 | sketchy-null 57 | unclear-type 58 | unsafe-getters-setters 59 | untyped-import 60 | untyped-type-import 61 | 62 | [version] 63 | ^0.149.0 64 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/.gitattributes: -------------------------------------------------------------------------------- 1 | # Windows files should use crlf line endings 2 | # https://help.github.com/articles/dealing-with-line-endings/ 3 | *.bat text eol=crlf 4 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | 24 | # Android/IntelliJ 25 | # 26 | build/ 27 | .idea 28 | .gradle 29 | local.properties 30 | *.iml 31 | 32 | # node.js 33 | # 34 | node_modules/ 35 | npm-debug.log 36 | yarn-error.log 37 | 38 | # BUCK 39 | buck-out/ 40 | \.buckd/ 41 | *.keystore 42 | !debug.keystore 43 | 44 | # fastlane 45 | # 46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 47 | # screenshots whenever they are needed. 48 | # For more information about the recommended setup visit: 49 | # https://docs.fastlane.tools/best-practices/source-control/ 50 | 51 | */fastlane/report.xml 52 | */fastlane/Preview.html 53 | */fastlane/screenshots 54 | 55 | # Bundle artifact 56 | *.jsbundle 57 | 58 | # CocoaPods 59 | /ios/Pods/ 60 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | bracketSpacing: false, 3 | jsxBracketSameLine: true, 4 | singleQuote: true, 5 | trailingComma: 'all', 6 | arrowParens: 'avoid', 7 | }; 8 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/ToolbarAndroidExample/ToolbarAndroidExample.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample React Native App 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | * @flow 7 | * @lint-ignore-every XPLATJSCOPYRIGHT1 8 | */ 9 | 10 | import React, {Component} from 'react'; 11 | import {Platform, StyleSheet, Text, View} from 'react-native'; 12 | 13 | import ToolbarAndroid from '@react-native-community/toolbar-android'; 14 | 15 | const instructions = Platform.select({ 16 | ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu', 17 | android: 18 | 'Double tap R on your keyboard to reload,\n' + 19 | 'Shake or press menu button for dev menu!', 20 | }); 21 | const initialMessage = Platform.select({ 22 | ios: 'Toolbar-Android is no-op in iOS', 23 | android: 'Click on the toolbar icons above to test...', 24 | }); 25 | 26 | type Props = {}; 27 | type State = { 28 | message: string, 29 | }; 30 | export default class ToolbarAndroidExample extends Component { 31 | constructor(props: any) { 32 | super(props); 33 | 34 | this.state = {message: initialMessage}; 35 | } 36 | 37 | render() { 38 | return ( 39 | 40 | this.setState({message: 'Menu is clicked'})} 48 | onActionSelected={position => 49 | this.setState({message: `action ${position} is clicked`}) 50 | } 51 | /> 52 | 53 | 54 | Welcome to React Native ToolbarAndroid Example! 55 | 56 | {this.state.message} 57 | {instructions} 58 | 59 | 60 | ); 61 | } 62 | } 63 | 64 | const styles = StyleSheet.create({ 65 | container: { 66 | flex: 1, 67 | }, 68 | toolbar: { 69 | backgroundColor: '#E9EAED', 70 | height: 56, 71 | }, 72 | centerContainer: { 73 | flex: 1, 74 | justifyContent: 'center', 75 | alignItems: 'center', 76 | backgroundColor: '#F5FCFF', 77 | }, 78 | welcome: { 79 | fontSize: 20, 80 | textAlign: 'center', 81 | margin: 10, 82 | }, 83 | instructions: { 84 | textAlign: 'center', 85 | color: '#333333', 86 | marginBottom: 5, 87 | }, 88 | message: { 89 | color: 'red', 90 | fontSize: 15, 91 | margin: 8, 92 | }, 93 | }); 94 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/ToolbarAndroidExample/ic_menu_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-065/ToolbarAndroidExample/ic_menu_black_24dp.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/ToolbarAndroidExample/index.js: -------------------------------------------------------------------------------- 1 | import ToolbarAndroidExample from './ToolbarAndroidExample'; 2 | 3 | export default ToolbarAndroidExample; 4 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/ToolbarAndroidExample/relay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-065/ToolbarAndroidExample/relay.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/__tests__/App-test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import 'react-native'; 6 | import React from 'react'; 7 | import App from '../ToolbarAndroidExample'; 8 | 9 | // Note: test renderer must be required after react-native. 10 | import renderer from 'react-test-renderer'; 11 | 12 | it('renders correctly', () => { 13 | renderer.create(); 14 | }); 15 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/android/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | ToolbarAndroidExample 4 | Project android__ created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.buildship.core.gradleprojectbuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.buildship.core.gradleprojectnature 16 | 17 | 18 | 19 | 0 20 | 21 | 30 22 | 23 | org.eclipse.core.resources.regexFilterMatcher 24 | node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/android/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | arguments= 2 | auto.sync=false 3 | build.scans.enabled=false 4 | connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) 5 | connection.project.dir= 6 | eclipse.preferences.version=1 7 | gradle.user.home= 8 | java.home=/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home 9 | jvm.arguments= 10 | offline.mode=false 11 | override.workspace.settings=true 12 | show.console.view=true 13 | show.executions.view=true 14 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/android/app/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/android/app/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | ToolbarAndroidExample-app 4 | Project ToolbarAndroidExample-app created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.buildship.core.gradleprojectbuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.buildship.core.gradleprojectnature 22 | 23 | 24 | 25 | 1630694511090 26 | 27 | 30 28 | 29 | org.eclipse.core.resources.regexFilterMatcher 30 | node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/android/app/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | connection.project.dir=.. 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/android/app/BUCK: -------------------------------------------------------------------------------- 1 | # To learn about Buck see [Docs](https://buckbuild.com/). 2 | # To run your application with Buck: 3 | # - install Buck 4 | # - `npm start` - to start the packager 5 | # - `cd android` 6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 8 | # - `buck install -r android/app` - compile, install and run application 9 | # 10 | 11 | load(":build_defs.bzl", "create_aar_targets", "create_jar_targets") 12 | 13 | lib_deps = [] 14 | 15 | create_aar_targets(glob(["libs/*.aar"])) 16 | 17 | create_jar_targets(glob(["libs/*.jar"])) 18 | 19 | android_library( 20 | name = "all-libs", 21 | exported_deps = lib_deps, 22 | ) 23 | 24 | android_library( 25 | name = "app-code", 26 | srcs = glob([ 27 | "src/main/java/**/*.java", 28 | ]), 29 | deps = [ 30 | ":all-libs", 31 | ":build_config", 32 | ":res", 33 | ], 34 | ) 35 | 36 | android_build_config( 37 | name = "build_config", 38 | package = "com.toolbarandroidexample", 39 | ) 40 | 41 | android_resource( 42 | name = "res", 43 | package = "com.toolbarandroidexample", 44 | res = "src/main/res", 45 | ) 46 | 47 | android_binary( 48 | name = "app", 49 | keystore = "//android/keystores:debug", 50 | manifest = "src/main/AndroidManifest.xml", 51 | package_type = "debug", 52 | deps = [ 53 | ":app-code", 54 | ], 55 | ) 56 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/android/app/build_defs.bzl: -------------------------------------------------------------------------------- 1 | """Helper definitions to glob .aar and .jar targets""" 2 | 3 | def create_aar_targets(aarfiles): 4 | for aarfile in aarfiles: 5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] 6 | lib_deps.append(":" + name) 7 | android_prebuilt_aar( 8 | name = name, 9 | aar = aarfile, 10 | ) 11 | 12 | def create_jar_targets(jarfiles): 13 | for jarfile in jarfiles: 14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")] 15 | lib_deps.append(":" + name) 16 | prebuilt_jar( 17 | name = name, 18 | binary_jar = jarfile, 19 | ) 20 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-065/android/app/debug.keystore -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 13 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/android/app/src/main/java/com/toolbarandroidexample/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.toolbarandroidexample; 2 | 3 | import com.facebook.react.ReactActivity; 4 | 5 | public class MainActivity extends ReactActivity { 6 | 7 | /** 8 | * Returns the name of the main component registered from JavaScript. This is used to schedule 9 | * rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "ToolbarAndroidExample"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/android/app/src/main/java/com/toolbarandroidexample/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.toolbarandroidexample; 2 | 3 | import android.app.Application; 4 | import android.content.Context; 5 | import com.facebook.react.PackageList; 6 | import com.facebook.react.ReactApplication; 7 | import com.facebook.react.ReactInstanceManager; 8 | import com.facebook.react.ReactNativeHost; 9 | import com.facebook.react.ReactPackage; 10 | import com.facebook.soloader.SoLoader; 11 | import java.lang.reflect.InvocationTargetException; 12 | import java.util.List; 13 | 14 | public class MainApplication extends Application implements ReactApplication { 15 | 16 | private final ReactNativeHost mReactNativeHost = 17 | new ReactNativeHost(this) { 18 | @Override 19 | public boolean getUseDeveloperSupport() { 20 | return BuildConfig.DEBUG; 21 | } 22 | 23 | @Override 24 | protected List getPackages() { 25 | @SuppressWarnings("UnnecessaryLocalVariable") 26 | List packages = new PackageList(this).getPackages(); 27 | // Packages that cannot be autolinked yet can be added manually here, for example: 28 | // packages.add(new MyReactNativePackage()); 29 | return packages; 30 | } 31 | 32 | @Override 33 | protected String getJSMainModuleName() { 34 | return "index"; 35 | } 36 | }; 37 | 38 | @Override 39 | public ReactNativeHost getReactNativeHost() { 40 | return mReactNativeHost; 41 | } 42 | 43 | @Override 44 | public void onCreate() { 45 | super.onCreate(); 46 | SoLoader.init(this, /* native exopackage */ false); 47 | initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); 48 | } 49 | 50 | /** 51 | * Loads Flipper in React Native templates. Call this in the onCreate method with something like 52 | * initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); 53 | * 54 | * @param context 55 | * @param reactInstanceManager 56 | */ 57 | private static void initializeFlipper( 58 | Context context, ReactInstanceManager reactInstanceManager) { 59 | if (BuildConfig.DEBUG) { 60 | try { 61 | /* 62 | We use reflection here to pick up the class that initializes Flipper, 63 | since Flipper library is not available in release mode 64 | */ 65 | Class aClass = Class.forName("com.toolbarandroidexample.ReactNativeFlipper"); 66 | aClass 67 | .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class) 68 | .invoke(null, context, reactInstanceManager); 69 | } catch (ClassNotFoundException e) { 70 | e.printStackTrace(); 71 | } catch (NoSuchMethodException e) { 72 | e.printStackTrace(); 73 | } catch (IllegalAccessException e) { 74 | e.printStackTrace(); 75 | } catch (InvocationTargetException e) { 76 | e.printStackTrace(); 77 | } 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-065/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-065/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-065/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-065/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-065/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-065/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-065/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-065/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-065/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-065/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ToolbarAndroidExample 3 | 4 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext { 5 | buildToolsVersion = "30.0.2" 6 | minSdkVersion = 21 7 | compileSdkVersion = 30 8 | targetSdkVersion = 30 9 | ndkVersion = "20.1.5948944" 10 | } 11 | repositories { 12 | google() 13 | mavenCentral() 14 | } 15 | dependencies { 16 | classpath("com.android.tools.build:gradle:4.2.1") 17 | // NOTE: Do not place your application dependencies here; they belong 18 | // in the individual module build.gradle files 19 | } 20 | } 21 | 22 | allprojects { 23 | repositories { 24 | mavenCentral() 25 | mavenLocal() 26 | maven { 27 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 28 | url("$rootDir/../node_modules/react-native/android") 29 | } 30 | maven { 31 | // Android JSC is installed from npm 32 | url("$rootDir/../node_modules/jsc-android/dist") 33 | } 34 | 35 | google() 36 | maven { url 'https://www.jitpack.io' } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | # AndroidX package structure to make it clearer which packages are bundled with the 21 | # Android operating system, and which are packaged with your app's APK 22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 23 | android.useAndroidX=true 24 | # Automatically convert third-party libraries to use AndroidX 25 | android.enableJetifier=true 26 | 27 | # Version of flipper SDK to use with React Native 28 | FLIPPER_VERSION=0.93.0 29 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-065/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto execute 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto execute 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :execute 68 | @rem Setup the command line 69 | 70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71 | 72 | 73 | @rem Execute Gradle 74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75 | 76 | :end 77 | @rem End local scope for the variables with windows NT shell 78 | if "%ERRORLEVEL%"=="0" goto mainEnd 79 | 80 | :fail 81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 | rem the _cmd.exe /c_ return code! 83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 84 | exit /b 1 85 | 86 | :mainEnd 87 | if "%OS%"=="Windows_NT" endlocal 88 | 89 | :omega 90 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'ToolbarAndroidExample' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ToolbarAndroidExample", 3 | "displayName": "ToolbarAndroidExample" 4 | } -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import {AppRegistry} from 'react-native'; 6 | import ToolbarAndroidExample from './ToolbarAndroidExample'; 7 | import {name as appName} from './app.json'; 8 | 9 | AppRegistry.registerComponent(appName, () => ToolbarAndroidExample); 10 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/ios/Podfile: -------------------------------------------------------------------------------- 1 | require_relative '../node_modules/react-native/scripts/react_native_pods' 2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' 3 | 4 | platform :ios, '11.0' 5 | 6 | target 'ToolbarAndroidExample' do 7 | config = use_native_modules! 8 | 9 | use_react_native!( 10 | :path => config[:reactNativePath], 11 | # to enable hermes on iOS, change `false` to `true` and then install pods 12 | :hermes_enabled => false 13 | ) 14 | 15 | target 'ToolbarAndroidExampleTests' do 16 | inherit! :complete 17 | # Pods for testing 18 | end 19 | 20 | # Enables Flipper. 21 | # 22 | # Note that if you have use_frameworks! enabled, Flipper will not work and 23 | # you should disable the next line. 24 | use_flipper!() 25 | 26 | post_install do |installer| 27 | react_native_post_install(installer) 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/ios/ToolbarAndroidExample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/ios/ToolbarAndroidExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : UIResponder 5 | 6 | @property (nonatomic, strong) UIWindow *window; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/ios/ToolbarAndroidExample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | 3 | #import 4 | #import 5 | #import 6 | 7 | #ifdef FB_SONARKIT_ENABLED 8 | #import 9 | #import 10 | #import 11 | #import 12 | #import 13 | #import 14 | 15 | static void InitializeFlipper(UIApplication *application) { 16 | FlipperClient *client = [FlipperClient sharedClient]; 17 | SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults]; 18 | [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]]; 19 | [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]]; 20 | [client addPlugin:[FlipperKitReactPlugin new]]; 21 | [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]]; 22 | [client start]; 23 | } 24 | #endif 25 | 26 | @implementation AppDelegate 27 | 28 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 29 | { 30 | #ifdef FB_SONARKIT_ENABLED 31 | InitializeFlipper(application); 32 | #endif 33 | 34 | RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; 35 | RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge 36 | moduleName:@"ToolbarAndroidExample" 37 | initialProperties:nil]; 38 | 39 | if (@available(iOS 13.0, *)) { 40 | rootView.backgroundColor = [UIColor systemBackgroundColor]; 41 | } else { 42 | rootView.backgroundColor = [UIColor whiteColor]; 43 | } 44 | 45 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 46 | UIViewController *rootViewController = [UIViewController new]; 47 | rootViewController.view = rootView; 48 | self.window.rootViewController = rootViewController; 49 | [self.window makeKeyAndVisible]; 50 | return YES; 51 | } 52 | 53 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge 54 | { 55 | #if DEBUG 56 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; 57 | #else 58 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 59 | #endif 60 | } 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/ios/ToolbarAndroidExample/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/ios/ToolbarAndroidExample/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/ios/ToolbarAndroidExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ToolbarAndroidExample 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | NSAppTransportSecurity 28 | 29 | NSExceptionDomains 30 | 31 | localhost 32 | 33 | NSExceptionAllowsInsecureHTTPLoads 34 | 35 | 36 | 37 | 38 | NSLocationWhenInUseUsageDescription 39 | 40 | UILaunchStoryboardName 41 | LaunchScreen 42 | UIRequiredDeviceCapabilities 43 | 44 | armv7 45 | 46 | UISupportedInterfaceOrientations 47 | 48 | UIInterfaceOrientationPortrait 49 | UIInterfaceOrientationLandscapeLeft 50 | UIInterfaceOrientationLandscapeRight 51 | 52 | UIViewControllerBasedStatusBarAppearance 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/ios/ToolbarAndroidExample/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char * argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/ios/ToolbarAndroidExampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/ios/ToolbarAndroidExampleTests/ToolbarAndroidExampleTests.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import 5 | #import 6 | 7 | #define TIMEOUT_SECONDS 600 8 | #define TEXT_TO_LOOK_FOR @"Welcome to React" 9 | 10 | @interface ToolbarAndroidExampleTests : XCTestCase 11 | 12 | @end 13 | 14 | @implementation ToolbarAndroidExampleTests 15 | 16 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 17 | { 18 | if (test(view)) { 19 | return YES; 20 | } 21 | for (UIView *subview in [view subviews]) { 22 | if ([self findSubviewInView:subview matching:test]) { 23 | return YES; 24 | } 25 | } 26 | return NO; 27 | } 28 | 29 | - (void)testRendersWelcomeScreen 30 | { 31 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; 32 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 33 | BOOL foundElement = NO; 34 | 35 | __block NSString *redboxError = nil; 36 | #ifdef DEBUG 37 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 38 | if (level >= RCTLogLevelError) { 39 | redboxError = message; 40 | } 41 | }); 42 | #endif 43 | 44 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 45 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 46 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 47 | 48 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 49 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 50 | return YES; 51 | } 52 | return NO; 53 | }]; 54 | } 55 | 56 | #ifdef DEBUG 57 | RCTSetLogFunction(RCTDefaultLogFunction); 58 | #endif 59 | 60 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 61 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 62 | } 63 | 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/metro.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Metro configuration for React Native 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | */ 7 | 8 | module.exports = { 9 | transformer: { 10 | getTransformOptions: async () => ({ 11 | transform: { 12 | experimentalImportSupport: false, 13 | inlineRequires: true, 14 | }, 15 | }), 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-065/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ToolbarAndroidExample065", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "sync": "../scripts/update-local-pkg.sh ../..", 7 | "android": "react-native run-android", 8 | "ios": "react-native run-ios", 9 | "start": "react-native start", 10 | "test": "jest", 11 | "lint": "eslint ." 12 | }, 13 | "dependencies": { 14 | "@react-native-community/toolbar-android": "file:../../react-native-community-toolbar-android-current.tgz", 15 | "react": "17.0.2", 16 | "react-native": "0.65.1" 17 | }, 18 | "devDependencies": { 19 | "@babel/core": "^7.15.0", 20 | "@babel/runtime": "^7.15.3", 21 | "@react-native-community/eslint-config": "^3.0.1", 22 | "babel-jest": "^27.1.0", 23 | "eslint": "^7.32.0", 24 | "jest": "^27.1.0", 25 | "metro-react-native-babel-preset": "^0.66.2", 26 | "react-native-codegen": "^0.0.7", 27 | "react-test-renderer": "17.0.2" 28 | }, 29 | "jest": { 30 | "preset": "react-native" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | project.xcworkspace 24 | 25 | # Android/IntelliJ 26 | # 27 | build/ 28 | .idea 29 | .gradle 30 | local.properties 31 | *.iml 32 | 33 | # node.js 34 | # 35 | node_modules/ 36 | npm-debug.log 37 | yarn-error.log 38 | 39 | # BUCK 40 | buck-out/ 41 | \.buckd/ 42 | *.keystore 43 | 44 | # fastlane 45 | # 46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 47 | # screenshots whenever they are needed. 48 | # For more information about the recommended setup visit: 49 | # https://docs.fastlane.tools/best-practices/source-control/ 50 | 51 | */fastlane/report.xml 52 | */fastlane/Preview.html 53 | */fastlane/screenshots 54 | 55 | # Bundle artifacts 56 | *.jsbundle 57 | 58 | # CocoaPods 59 | /ios/Pods/ 60 | 61 | # Expo 62 | .expo/* 63 | web-build/ 64 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/App.js: -------------------------------------------------------------------------------- 1 | import {StatusBar} from 'expo-status-bar'; 2 | import React from 'react'; 3 | import {StyleSheet, Text, View} from 'react-native'; 4 | 5 | export default function App() { 6 | return ( 7 | 8 | Open up App.js to start working on your app! 9 | 10 | 11 | ); 12 | } 13 | 14 | const styles = StyleSheet.create({ 15 | container: { 16 | flex: 1, 17 | backgroundColor: '#fff', 18 | alignItems: 'center', 19 | justifyContent: 'center', 20 | }, 21 | }); 22 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/ToolbarAndroidExample/ToolbarAndroidExample.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample React Native App 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | * @flow 7 | * @lint-ignore-every XPLATJSCOPYRIGHT1 8 | */ 9 | 10 | import React, {Component} from 'react'; 11 | import {Platform, StyleSheet, Text, View} from 'react-native'; 12 | 13 | import ToolbarAndroid from '@react-native-community/toolbar-android'; 14 | 15 | const instructions = Platform.select({ 16 | ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu', 17 | android: 18 | 'Double tap R on your keyboard to reload,\n' + 19 | 'Shake or press menu button for dev menu!', 20 | }); 21 | const initialMessage = Platform.select({ 22 | ios: 'Toolbar-Android is no-op in iOS', 23 | android: 'Click on the toolbar icons above to test...', 24 | }); 25 | 26 | type Props = {}; 27 | type State = { 28 | message: string, 29 | }; 30 | export default class ToolbarAndroidExample extends Component { 31 | constructor(props: any) { 32 | super(props); 33 | 34 | this.state = {message: initialMessage}; 35 | } 36 | 37 | render() { 38 | return ( 39 | 40 | this.setState({message: 'Menu is clicked'})} 48 | onActionSelected={position => 49 | this.setState({message: `action ${position} is clicked`}) 50 | } 51 | /> 52 | 53 | 54 | Welcome to React Native ToolbarAndroid Example! 55 | 56 | {this.state.message} 57 | {instructions} 58 | 59 | 60 | ); 61 | } 62 | } 63 | 64 | const styles = StyleSheet.create({ 65 | container: { 66 | flex: 1, 67 | }, 68 | toolbar: { 69 | backgroundColor: '#E9EAED', 70 | height: 56, 71 | }, 72 | centerContainer: { 73 | flex: 1, 74 | justifyContent: 'center', 75 | alignItems: 'center', 76 | backgroundColor: '#F5FCFF', 77 | }, 78 | welcome: { 79 | fontSize: 20, 80 | textAlign: 'center', 81 | margin: 10, 82 | }, 83 | instructions: { 84 | textAlign: 'center', 85 | color: '#333333', 86 | marginBottom: 5, 87 | }, 88 | message: { 89 | color: 'red', 90 | fontSize: 15, 91 | margin: 8, 92 | }, 93 | }); 94 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/ToolbarAndroidExample/ic_menu_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-expo-063/ToolbarAndroidExample/ic_menu_black_24dp.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/ToolbarAndroidExample/index.js: -------------------------------------------------------------------------------- 1 | import ToolbarAndroidExample from './ToolbarAndroidExample'; 2 | 3 | export default ToolbarAndroidExample; 4 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/ToolbarAndroidExample/relay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-expo-063/ToolbarAndroidExample/relay.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/__tests__/App.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import App from '../App'; 4 | 5 | // Note: test renderer must be required after react-native. 6 | import renderer from 'react-test-renderer'; 7 | 8 | it('renders correctly', () => { 9 | renderer.create(); 10 | }); 11 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | ToolbarAndroidExampleexpo063 4 | Project android_ created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.buildship.core.gradleprojectbuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.buildship.core.gradleprojectnature 16 | 17 | 18 | 19 | 0 20 | 21 | 30 22 | 23 | org.eclipse.core.resources.regexFilterMatcher 24 | node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | arguments= 2 | auto.sync=false 3 | build.scans.enabled=false 4 | connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) 5 | connection.project.dir= 6 | eclipse.preferences.version=1 7 | gradle.user.home= 8 | java.home=/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home 9 | jvm.arguments= 10 | offline.mode=false 11 | override.workspace.settings=true 12 | show.console.view=true 13 | show.executions.view=true 14 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/app/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/app/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | ToolbarAndroidExampleexpo063-app 4 | Project ToolbarAndroidExampleexpo063-app created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.buildship.core.gradleprojectbuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.buildship.core.gradleprojectnature 22 | 23 | 24 | 25 | 1630694511165 26 | 27 | 30 28 | 29 | org.eclipse.core.resources.regexFilterMatcher 30 | node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/app/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | connection.project.dir=.. 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/app/BUCK: -------------------------------------------------------------------------------- 1 | # To learn about Buck see [Docs](https://buckbuild.com/). 2 | # To run your application with Buck: 3 | # - install Buck 4 | # - `npm start` - to start the packager 5 | # - `cd android` 6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 8 | # - `buck install -r android/app` - compile, install and run application 9 | # 10 | 11 | load(":build_defs.bzl", "create_aar_targets", "create_jar_targets") 12 | 13 | lib_deps = [] 14 | 15 | create_aar_targets(glob(["libs/*.aar"])) 16 | 17 | create_jar_targets(glob(["libs/*.jar"])) 18 | 19 | android_library( 20 | name = "all-libs", 21 | exported_deps = lib_deps, 22 | ) 23 | 24 | android_library( 25 | name = "app-code", 26 | srcs = glob([ 27 | "src/main/java/**/*.java", 28 | ]), 29 | deps = [ 30 | ":all-libs", 31 | ":build_config", 32 | ":res", 33 | ], 34 | ) 35 | 36 | android_build_config( 37 | name = "build_config", 38 | package = "com.toolbarandroidexampleexpo063", 39 | ) 40 | 41 | android_resource( 42 | name = "res", 43 | package = "com.toolbarandroidexampleexpo063", 44 | res = "src/main/res", 45 | ) 46 | 47 | android_binary( 48 | name = "app", 49 | keystore = "//android/keystores:debug", 50 | manifest = "src/main/AndroidManifest.xml", 51 | package_type = "debug", 52 | deps = [ 53 | ":app-code", 54 | ], 55 | ) 56 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/app/build_defs.bzl: -------------------------------------------------------------------------------- 1 | """Helper definitions to glob .aar and .jar targets""" 2 | 3 | def create_aar_targets(aarfiles): 4 | for aarfile in aarfiles: 5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] 6 | lib_deps.append(":" + name) 7 | android_prebuilt_aar( 8 | name = name, 9 | aar = aarfile, 10 | ) 11 | 12 | def create_jar_targets(jarfiles): 13 | for jarfile in jarfiles: 14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")] 15 | lib_deps.append(":" + name) 16 | prebuilt_jar( 17 | name = name, 18 | binary_jar = jarfile, 19 | ) 20 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 32 | 33 | 34 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/app/src/main/java/com/toolbarandroidexampleexpo063/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.toolbarandroidexampleexpo063; 2 | 3 | import android.os.Bundle; 4 | 5 | import com.facebook.react.ReactActivity; 6 | import com.facebook.react.ReactActivityDelegate; 7 | import com.facebook.react.ReactRootView; 8 | import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView; 9 | 10 | import expo.modules.splashscreen.singletons.SplashScreen; 11 | import expo.modules.splashscreen.SplashScreenImageResizeMode; 12 | 13 | public class MainActivity extends ReactActivity { 14 | @Override 15 | protected void onCreate(Bundle savedInstanceState) { 16 | super.onCreate(savedInstanceState); 17 | // SplashScreen.show(...) has to be called after super.onCreate(...) 18 | // Below line is handled by '@expo/configure-splash-screen' command and it's discouraged to modify it manually 19 | SplashScreen.show(this, SplashScreenImageResizeMode.CONTAIN, ReactRootView.class, false); 20 | } 21 | 22 | 23 | /** 24 | * Returns the name of the main component registered from JavaScript. 25 | * This is used to schedule rendering of the component. 26 | */ 27 | @Override 28 | protected String getMainComponentName() { 29 | return "main"; 30 | } 31 | 32 | @Override 33 | protected ReactActivityDelegate createReactActivityDelegate() { 34 | return new ReactActivityDelegate(this, getMainComponentName()) { 35 | @Override 36 | protected ReactRootView createRootView() { 37 | return new RNGestureHandlerEnabledRootView(MainActivity.this); 38 | } 39 | }; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/app/src/main/java/com/toolbarandroidexampleexpo063/generated/BasePackageList.java: -------------------------------------------------------------------------------- 1 | package com.toolbarandroidexampleexpo063.generated; 2 | 3 | import java.util.Arrays; 4 | import java.util.List; 5 | import org.unimodules.core.interfaces.Package; 6 | 7 | public class BasePackageList { 8 | public List getPackageList() { 9 | return Arrays.asList( 10 | new expo.modules.constants.ConstantsPackage(), 11 | new expo.modules.errorrecovery.ErrorRecoveryPackage(), 12 | new expo.modules.filesystem.FileSystemPackage(), 13 | new expo.modules.font.FontLoaderPackage(), 14 | new expo.modules.imageloader.ImageLoaderPackage(), 15 | new expo.modules.keepawake.KeepAwakePackage(), 16 | new expo.modules.lineargradient.LinearGradientPackage(), 17 | new expo.modules.location.LocationPackage(), 18 | new expo.modules.permissions.PermissionsPackage(), 19 | new expo.modules.splashscreen.SplashScreenPackage(), 20 | new expo.modules.sqlite.SQLitePackage(), 21 | new expo.modules.updates.UpdatesPackage() 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/app/src/main/res/drawable/splashscreen.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/app/src/main/res/drawable/splashscreen_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-expo-063/android/app/src/main/res/drawable/splashscreen_image.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-expo-063/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-expo-063/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-expo-063/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-expo-063/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-expo-063/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-expo-063/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-expo-063/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-expo-063/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-expo-063/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-expo-063/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #FFFFFF 5 | 6 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ToolbarAndroidExample-expo-063 3 | 4 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext { 5 | buildToolsVersion = "29.0.2" 6 | minSdkVersion = 21 7 | compileSdkVersion = 29 8 | targetSdkVersion = 29 9 | } 10 | repositories { 11 | google() 12 | jcenter() 13 | } 14 | dependencies { 15 | classpath("com.android.tools.build:gradle:3.5.3") 16 | 17 | // NOTE: Do not place your application dependencies here; they belong 18 | // in the individual module build.gradle files 19 | } 20 | } 21 | 22 | allprojects { 23 | repositories { 24 | mavenLocal() 25 | maven { 26 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 27 | url("$rootDir/../node_modules/react-native/android") 28 | } 29 | maven { 30 | // Android JSC is installed from npm 31 | url("$rootDir/../node_modules/jsc-android/dist") 32 | } 33 | 34 | google() 35 | jcenter() 36 | maven { url 'https://www.jitpack.io' } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | # AndroidX package structure to make it clearer which packages are bundled with the 21 | # Android operating system, and which are packaged with your app's APK 22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 23 | android.useAndroidX=true 24 | 25 | # Automatically convert third-party libraries to use AndroidX 26 | android.enableJetifier=true 27 | 28 | # Version of flipper SDK to use with React Native 29 | FLIPPER_VERSION=0.54.0 -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-expo-063/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto init 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto init 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :init 68 | @rem Get command-line arguments, handling Windows variants 69 | 70 | if not "%OS%" == "Windows_NT" goto win9xME_args 71 | 72 | :win9xME_args 73 | @rem Slurp the command line arguments. 74 | set CMD_LINE_ARGS= 75 | set _SKIP=2 76 | 77 | :win9xME_args_slurp 78 | if "x%~1" == "x" goto execute 79 | 80 | set CMD_LINE_ARGS=%* 81 | 82 | :execute 83 | @rem Setup the command line 84 | 85 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 86 | 87 | @rem Execute Gradle 88 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 89 | 90 | :end 91 | @rem End local scope for the variables with windows NT shell 92 | if "%ERRORLEVEL%"=="0" goto mainEnd 93 | 94 | :fail 95 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 96 | rem the _cmd.exe /c_ return code! 97 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 98 | exit /b 1 99 | 100 | :mainEnd 101 | if "%OS%"=="Windows_NT" endlocal 102 | 103 | :omega 104 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'ToolbarAndroidExampleexpo063' 2 | 3 | apply from: '../node_modules/react-native-unimodules/gradle.groovy' 4 | includeUnimodulesProjects() 5 | 6 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); 7 | applyNativeModulesSettingsGradle(settings) 8 | 9 | include ':app' 10 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ToolbarAndroidExample-expo-063", 3 | "displayName": "ToolbarAndroidExample-expo-063", 4 | "expo": { 5 | "name": "ToolbarAndroidExample-expo-063", 6 | "slug": "ToolbarAndroidExample-expo-063", 7 | "version": "1.0.0", 8 | "assetBundlePatterns": [ 9 | "**/*" 10 | ] 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = function(api) { 2 | api.cache(true); 3 | return { 4 | presets: ['babel-preset-expo'], 5 | }; 6 | }; 7 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/index.js: -------------------------------------------------------------------------------- 1 | import {registerRootComponent} from 'expo'; 2 | 3 | // import App from './App'; 4 | // registerRootComponent(App); 5 | 6 | import ToolbarAndroidExample from './ToolbarAndroidExample'; 7 | registerRootComponent(ToolbarAndroidExample); 8 | 9 | // registerRootComponent calls AppRegistry.registerComponent('main', () => App); 10 | // It also ensures that whether you load the app in the Expo client or in a native build, 11 | // the environment is set up appropriately 12 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/ios/Podfile: -------------------------------------------------------------------------------- 1 | require_relative '../node_modules/react-native/scripts/react_native_pods' 2 | require_relative '../node_modules/react-native-unimodules/cocoapods.rb' 3 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' 4 | 5 | platform :ios, '10.0' 6 | 7 | target 'ToolbarAndroidExampleexpo063' do 8 | use_unimodules! 9 | config = use_native_modules! 10 | 11 | use_react_native!(:path => config["reactNativePath"]) 12 | 13 | # Enables Flipper. 14 | # 15 | # Note that if you have use_frameworks! enabled, Flipper will not work and 16 | # you should disable these next few lines. 17 | use_flipper! 18 | post_install do |installer| 19 | flipper_post_install(installer) 20 | end 21 | end -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/ios/ToolbarAndroidExampleexpo063.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/ios/ToolbarAndroidExampleexpo063/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | #import 5 | 6 | #import 7 | 8 | @interface AppDelegate : UMAppDelegateWrapper 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/ios/ToolbarAndroidExampleexpo063/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/ios/ToolbarAndroidExampleexpo063/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/ios/ToolbarAndroidExampleexpo063/Images.xcassets/SplashScreen.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images": [ 3 | { 4 | "idiom": "universal", 5 | "filename": "splashscreen.png", 6 | "scale": "1x" 7 | }, 8 | { 9 | "idiom": "universal", 10 | "scale": "2x" 11 | }, 12 | { 13 | "idiom": "universal", 14 | "scale": "3x" 15 | } 16 | ], 17 | "info": { 18 | "version": 1, 19 | "author": "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/ios/ToolbarAndroidExampleexpo063/Images.xcassets/SplashScreen.imageset/splashscreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-expo-063/ios/ToolbarAndroidExampleexpo063/Images.xcassets/SplashScreen.imageset/splashscreen.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/ios/ToolbarAndroidExampleexpo063/Images.xcassets/SplashScreenBackground.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images": [ 3 | { 4 | "idiom": "universal", 5 | "filename": "background.png", 6 | "scale": "1x" 7 | }, 8 | { 9 | "idiom": "universal", 10 | "scale": "2x" 11 | }, 12 | { 13 | "idiom": "universal", 14 | "scale": "3x" 15 | } 16 | ], 17 | "info": { 18 | "version": 1, 19 | "author": "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/ios/ToolbarAndroidExampleexpo063/Images.xcassets/SplashScreenBackground.imageset/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/example/ToolbarAndroidExample-expo-063/ios/ToolbarAndroidExampleexpo063/Images.xcassets/SplashScreenBackground.imageset/background.png -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/ios/ToolbarAndroidExampleexpo063/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ToolbarAndroidExample-expo-063 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | NSAppTransportSecurity 28 | 29 | NSAllowsArbitraryLoads 30 | 31 | NSExceptionDomains 32 | 33 | localhost 34 | 35 | NSExceptionAllowsInsecureHTTPLoads 36 | 37 | 38 | 39 | 40 | NSLocationWhenInUseUsageDescription 41 | 42 | UILaunchStoryboardName 43 | SplashScreen 44 | UIRequiredDeviceCapabilities 45 | 46 | armv7 47 | 48 | UISupportedInterfaceOrientations 49 | 50 | UIInterfaceOrientationPortrait 51 | UIInterfaceOrientationLandscapeLeft 52 | UIInterfaceOrientationLandscapeRight 53 | 54 | UIViewControllerBasedStatusBarAppearance 55 | 56 | UIStatusBarStyle 57 | UIStatusBarStyleDefault 58 | 59 | 60 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/ios/ToolbarAndroidExampleexpo063/Supporting/Expo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | EXUpdatesSDKVersion 6 | YOUR-APP-SDK-VERSION-HERE 7 | EXUpdatesURL 8 | YOUR-APP-URL-HERE 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/ios/ToolbarAndroidExampleexpo063/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char * argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | 11 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/metro.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | transformer: { 3 | assetPlugins: ['expo-asset/tools/hashAssetFiles'], 4 | }, 5 | }; 6 | -------------------------------------------------------------------------------- /example/ToolbarAndroidExample-expo-063/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "index.js", 3 | "scripts": { 4 | "android": "react-native run-android", 5 | "ios": "react-native run-ios", 6 | "web": "expo start --web", 7 | "start": "react-native start", 8 | "test": "jest" 9 | }, 10 | "dependencies": { 11 | "@react-native-community/toolbar-android": "^0.1.0-rc.2", 12 | "expo": "~39.0.2", 13 | "expo-splash-screen": "~0.6.2", 14 | "expo-status-bar": "~1.0.2", 15 | "expo-updates": "~0.3.2", 16 | "react": "16.13.1", 17 | "react-dom": "16.13.1", 18 | "react-native": "~0.63.3", 19 | "react-native-gesture-handler": "~1.7.0", 20 | "react-native-reanimated": "~1.13.0", 21 | "react-native-screens": "~2.10.1", 22 | "react-native-unimodules": "~0.11.0", 23 | "react-native-web": "~0.13.12" 24 | }, 25 | "devDependencies": { 26 | "@babel/core": "~7.9.0", 27 | "babel-jest": "~25.2.6", 28 | "jest": "~25.2.6", 29 | "react-test-renderer": "~16.13.1" 30 | }, 31 | "jest": { 32 | "preset": "react-native" 33 | }, 34 | "private": true 35 | } 36 | -------------------------------------------------------------------------------- /example/scripts/update-local-pkg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # setup example environment by creating a local repo for main code base 5 | # Note: this should be executed from the actual example directory 6 | # 7 | PROJECT_ROOT="$1" 8 | PKG_NAME="@react-native-community/toolbar-android" 9 | LOCAL_REPO="../${SCRIPT_DIR}/repo" 10 | PKG_CURRENT="react-native-community-toolbar-android-current.tgz" 11 | CWD=`pwd` 12 | 13 | echo "** packaging @react-native-community/toolbar-android..." 14 | cd "${PROJECT_ROOT}" 15 | PKG_FILE=`npm pack 2> /dev/null` 16 | mv "${PKG_FILE}" "${PKG_CURRENT}" 17 | echo "${PKG_FILE} => ${PKG_CURRENT}" 18 | echo "${PKG_CURRENT} is ready..." 19 | 20 | cd ${CWD} 21 | echo "** install the local package..." 22 | yarn cache clean 23 | yarn add "file:${PROJECT_ROOT}/${PKG_CURRENT}" 24 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | import {NativeModules} from 'react-native'; 2 | 3 | const {RNCReactNativeToolbarAndroid} = NativeModules; 4 | 5 | export default RNCReactNativeToolbarAndroid; 6 | -------------------------------------------------------------------------------- /ios/RNCToolbarAndroid.h: -------------------------------------------------------------------------------- 1 | 2 | #if __has_include("RCTBridgeModule.h") 3 | #import "RCTBridgeModule.h" 4 | #else 5 | #import 6 | #endif 7 | 8 | @interface RNCToolbarAndroid : NSObject 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /ios/RNCToolbarAndroid.m: -------------------------------------------------------------------------------- 1 | 2 | #import "RNCToolbarAndroid.h" 3 | 4 | @implementation RNCToolbarAndroid 5 | 6 | - (dispatch_queue_t)methodQueue 7 | { 8 | return dispatch_get_main_queue(); 9 | } 10 | RCT_EXPORT_MODULE() 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /ios/RNCToolbarAndroid.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | 3 | 5 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /js/ToolbarAndroid.ios.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @format 8 | */ 9 | 10 | 'use strict'; 11 | 12 | module.exports = require('react-native/Libraries/Components/UnimplementedViews/UnimplementedView'); 13 | -------------------------------------------------------------------------------- /js/ToolbarAndroid.web.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @format 8 | */ 9 | 10 | 'use strict'; 11 | 12 | let m; 13 | try { 14 | // This is an optional dependency. However, webpack might still show warning message. 15 | m = require('react-native/Libraries/Components/UnimplementedViews/UnimplementedView'); 16 | } catch { 17 | // If failed to find react-native UnimplementedView, just returns an empty module so 18 | // this won't cause bundling related error, however any subsequent attempt of using this module 19 | // in such situation shall caused compile-error because it really should not be used for web. 20 | m = {}; 21 | } 22 | 23 | module.exports = m; 24 | -------------------------------------------------------------------------------- /js/__test__/ToolbarAndroid.test.js: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import renderer from 'react-test-renderer'; 3 | import ToolbarAndroid from '../ToolbarAndroid'; 4 | 5 | describe('', () => { 6 | it('renders enabled ToolbarAndroid', () => { 7 | const tree = renderer.create().toJSON(); 8 | 9 | expect(tree).toMatchSnapshot(); 10 | }); 11 | 12 | it('renders ToolbarAndroid with title', () => { 13 | const tree = renderer 14 | .create() 15 | .toJSON(); 16 | 17 | expect(tree).toMatchSnapshot(); 18 | }); 19 | 20 | it('renders ToolbarAndroid with icon', () => { 21 | const tree = renderer 22 | .create() 23 | .toJSON(); 24 | 25 | expect(tree).toMatchSnapshot(); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /js/__test__/__snapshots__/ToolbarAndroid.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[` renders ToolbarAndroid with icon 1`] = ` 4 | 16 | `; 17 | 18 | exports[` renders ToolbarAndroid with title 1`] = ` 19 | 31 | `; 32 | 33 | exports[` renders enabled ToolbarAndroid 1`] = ` 34 | 46 | `; 47 | -------------------------------------------------------------------------------- /js/__test__/ic_menu_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/js/__test__/ic_menu_black_24dp.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@react-native-community/toolbar-android", 3 | "version": "0.2.1", 4 | "description": "A React Native Component for Android Toolbar", 5 | "keywords": [ 6 | "toolbar-android", 7 | "react native", 8 | "react-native" 9 | ], 10 | "homepage": "https://github.com/react-native-community/toolbar-android#readme", 11 | "repository": { 12 | "type": "git", 13 | "url": "git+https://github.com/react-native-community/toolbar-android.git" 14 | }, 15 | "license": "MIT", 16 | "author": "Connectdotz ", 17 | "main": "js/ToolbarAndroid", 18 | "types": "index.d.ts", 19 | "scripts": { 20 | "pack:npm": "npm pack", 21 | "start": "node node_modules/react-native/local-cli/cli.js start", 22 | "test": "yarn test:eslint && yarn test:flow && yarn test:jest && yarn test:tsc", 23 | "test:eslint": "eslint .", 24 | "test:flow": "flow check", 25 | "test:jest": "jest", 26 | "test:tsc":"tsc --noEmit" 27 | }, 28 | "prettier": { 29 | "bracketSpacing": false, 30 | "jsxBracketSameLine": true, 31 | "parser": "flow", 32 | "singleQuote": true, 33 | "trailingComma": "all" 34 | }, 35 | "jest": { 36 | "preset": "react-native", 37 | "testPathIgnorePatterns": [ 38 | "/node_modules/", 39 | "/example/" 40 | ] 41 | }, 42 | "dependencies": {}, 43 | "devDependencies": { 44 | "@babel/plugin-proposal-class-properties": "^7.4.0", 45 | "@react-native-community/eslint-config":"0.0.7", 46 | "@types/react-native": "^0.61.7", 47 | "babel-core": "^7.0.0-bridge.0", 48 | "babel-eslint": "^10.0.1", 49 | "babel-plugin-module-resolver": "^3.1.3", 50 | "eslint": "5.13.0", 51 | "eslint-plugin-prettier": "^3.1.2", 52 | "flow-bin": "^0.86.0", 53 | "jest": "^24.7.1", 54 | "metro-react-native-babel-preset": "0.51.1", 55 | "prettier": "^1.16.4", 56 | "react": "16.6.3", 57 | "react-native": "0.58.4", 58 | "react-test-renderer": "^16.8.6", 59 | "typescript": "3.7.5" 60 | }, 61 | "peerDependencies": { 62 | "react": "*", 63 | "react-native": "*" 64 | }, 65 | "publishConfig": { 66 | "access": "public" 67 | }, 68 | "bugs": { 69 | "url": "https://github.com/react-native-community/toolbar-android/issues" 70 | }, 71 | "directories": { 72 | "doc": "doc", 73 | "example": "example" 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /screenShots/ToolbarAndroidExample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-toolbar-android/toolbar-android/c4c402325895ff659deb845add3d2e40c3d5be57/screenShots/ToolbarAndroidExample.png -------------------------------------------------------------------------------- /toolbar-android.podspec: -------------------------------------------------------------------------------- 1 | require 'json' 2 | 3 | package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) 4 | 5 | Pod::Spec.new do |s| 6 | s.name = "toolbar-android" 7 | s.version = package['version'] 8 | s.summary = package['description'] 9 | s.license = package['license'] 10 | 11 | s.authors = package['author'] 12 | s.homepage = package['homepage'] 13 | 14 | s.description = package['description'] 15 | s.platform = :ios, "9.0" 16 | 17 | s.source = { :git => "https://github.com/react-native-community/toolbar-android.git", :tag => "master" } 18 | s.source_files = "ios/**/*.{h,m}" 19 | s.requires_arc = true 20 | 21 | s.dependency "React" 22 | 23 | end 24 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Basic Options */ 4 | "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ 5 | "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ 6 | "jsx":"react", 7 | "lib":["es6"], 8 | "noEmit": true, /* Do not emit outputs. */ 9 | /* Strict Type-Checking Options */ 10 | "strict": true, /* Enable all strict type-checking options. */ 11 | "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ 12 | } 13 | } 14 | --------------------------------------------------------------------------------