├── testApp ├── app │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ ├── strings.xml │ │ │ │ │ ├── colors.xml │ │ │ │ │ └── styles.xml │ │ │ │ ├── drawable │ │ │ │ │ ├── pulling.gif │ │ │ │ │ ├── pullok.png │ │ │ │ │ └── pullrelease.gif │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── pullok.png │ │ │ │ │ ├── pulling.gif │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── pullrelease.gif │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── drawable-v24 │ │ │ │ │ ├── pulling.gif │ │ │ │ │ ├── pullok.png │ │ │ │ │ ├── pullrelease.gif │ │ │ │ │ └── ic_launcher_foreground.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ ├── share_icon_moments.png │ │ │ │ │ └── share_icon_wechat.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ │ ├── ic_launcher.xml │ │ │ │ │ └── ic_launcher_round.xml │ │ │ │ ├── anim │ │ │ │ │ ├── slide_in_right.xml │ │ │ │ │ ├── slide_out_left.xml │ │ │ │ │ ├── slide_out_right.xml │ │ │ │ │ └── slide_in_left.xml │ │ │ │ ├── layout │ │ │ │ │ ├── fakestatus.xml │ │ │ │ │ ├── activity_my_react.xml │ │ │ │ │ ├── pull_layout.xml │ │ │ │ │ ├── activity_other.xml │ │ │ │ │ ├── activity_test.xml │ │ │ │ │ ├── activity_main.xml │ │ │ │ │ ├── header.xml │ │ │ │ │ └── share.xml │ │ │ │ └── values-v21 │ │ │ │ │ └── styles.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── wuyunqiang │ │ │ │ │ └── testapp │ │ │ │ │ ├── gesture │ │ │ │ │ ├── RNGestureHandlerRootInterface.java │ │ │ │ │ ├── RNGestureHandlerEventDataExtractor.java │ │ │ │ │ ├── RNGestureHandlerRootView.java │ │ │ │ │ ├── RNViewConfigurationHelper.java │ │ │ │ │ ├── RNGestureHandlerEvent.java │ │ │ │ │ ├── RNGestureHandlerEnabledRootView.java │ │ │ │ │ ├── RNGestureHandlerStateChangeEvent.java │ │ │ │ │ ├── RNGestureHandlerPackage.java │ │ │ │ │ ├── RNGestureHandlerInteractionManager.java │ │ │ │ │ └── RNGestureHandlerRegistry.java │ │ │ │ │ ├── codepush │ │ │ │ │ ├── CodePushInvalidUpdateException.java │ │ │ │ │ ├── DownloadProgressCallback.java │ │ │ │ │ ├── CodePushUnknownException.java │ │ │ │ │ ├── CodePushUpdateState.java │ │ │ │ │ ├── CodePushInvalidPublicKeyException.java │ │ │ │ │ ├── CodePushNotInitializedException.java │ │ │ │ │ ├── CodePushInstallMode.java │ │ │ │ │ ├── CodePushMalformedDataException.java │ │ │ │ │ ├── ReactInstanceHolder.java │ │ │ │ │ ├── DownloadProgress.java │ │ │ │ │ ├── Promiss.java │ │ │ │ │ ├── CodePushBuilder.java │ │ │ │ │ └── CodePushConstants.java │ │ │ │ │ ├── gesturehandler │ │ │ │ │ ├── GestureHandlerRegistry.java │ │ │ │ │ ├── OnTouchEventListener.java │ │ │ │ │ ├── ViewConfigurationHelper.java │ │ │ │ │ ├── GestureHandlerInteractionController.java │ │ │ │ │ ├── PointerEvents.java │ │ │ │ │ ├── PointerEventsSpec.java │ │ │ │ │ ├── PointerEventsConfig.java │ │ │ │ │ ├── ViewConfigurationHelperImpl.java │ │ │ │ │ ├── BaseGestureHandlerInteractionController.java │ │ │ │ │ ├── GestureHandlerRegistryImpl.java │ │ │ │ │ ├── GestureHandlerViewWrapper.java │ │ │ │ │ ├── LongPressGestureHandler.java │ │ │ │ │ ├── RotationGestureHandler.java │ │ │ │ │ ├── TapGestureHandler.java │ │ │ │ │ └── PinchGestureHandler.java │ │ │ │ │ ├── fastimage │ │ │ │ │ ├── FastImageGlideModule.java │ │ │ │ │ ├── FastImageViewWithUrl.java │ │ │ │ │ ├── FastImageProgressListener.java │ │ │ │ │ ├── FastImageViewPackage.java │ │ │ │ │ ├── FastImageViewModule.java │ │ │ │ │ ├── FastImageViewConverter.java │ │ │ │ │ └── FastImageRequestListener.java │ │ │ │ │ ├── MyReactActivity.java │ │ │ │ │ ├── activity │ │ │ │ │ ├── OtherActivity.java │ │ │ │ │ └── TestActivity.java │ │ │ │ │ ├── RNFetchBlob │ │ │ │ │ ├── RNFetchBlobConst.java │ │ │ │ │ ├── RNFetchBlobPackage.java │ │ │ │ │ ├── RNFetchBlobProgressConfig.java │ │ │ │ │ ├── RNFetchBlobConfig.java │ │ │ │ │ ├── Response │ │ │ │ │ │ └── RNFetchBlobDefaultResp.java │ │ │ │ │ └── RNFetchBlobUtils.java │ │ │ │ │ ├── RNPackage.java │ │ │ │ │ ├── view │ │ │ │ │ ├── ModalHostShadowNode.java │ │ │ │ │ └── ModalHostHelper.java │ │ │ │ │ ├── preloadreact │ │ │ │ │ ├── ReactNativePreLoader.java │ │ │ │ │ └── PreLoadReactActivity.java │ │ │ │ │ └── MainApplication.java │ │ │ └── AndroidManifest.xml │ │ ├── test │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── wuyunqiang │ │ │ │ └── testapp │ │ │ │ └── ExampleUnitTest.java │ │ └── androidTest │ │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── wuyunqiang │ │ │ └── testapp │ │ │ └── ExampleInstrumentedTest.java │ ├── libs │ │ └── nimbus-jose-jwt-5.1.jar │ ├── proguard-rules.pro │ └── build.gradle ├── settings.gradle ├── RN_src │ ├── assets │ │ ├── home │ │ │ ├── back.png │ │ │ ├── back@2x.png │ │ │ ├── back@3x.png │ │ │ ├── share_icon_moments.png │ │ │ ├── share_icon_wechat.png │ │ │ └── backgroundImageHeader.png │ │ ├── list │ │ │ ├── nodata.png │ │ │ ├── nodata@2x.png │ │ │ ├── nodata@3x.png │ │ │ ├── nonetwork.png │ │ │ ├── nonetwork@2x.png │ │ │ └── nonetwork@3x.png │ │ ├── tab │ │ │ ├── home_active.png │ │ │ ├── home_active@2x.png │ │ │ ├── home_active@3x.png │ │ │ ├── home_unactive.png │ │ │ ├── profile_active.png │ │ │ ├── project_active.png │ │ │ ├── home_unactive@2x.png │ │ │ ├── home_unactive@3x.png │ │ │ ├── profile_active@2x.png │ │ │ ├── profile_active@3x.png │ │ │ ├── profile_unactive.png │ │ │ ├── project_active@2x.png │ │ │ ├── project_active@3x.png │ │ │ ├── project_unactive.png │ │ │ ├── xindaiicon_active.png │ │ │ ├── profile_unactive@2x.png │ │ │ ├── profile_unactive@3x.png │ │ │ ├── project_unactive@2x.png │ │ │ ├── project_unactive@3x.png │ │ │ ├── xindaiicon_active@2x.png │ │ │ ├── xindaiicon_active@3x.png │ │ │ ├── xindaiicon_unactive.png │ │ │ ├── xindaiicon_unactive@2x.png │ │ │ └── xindaiicon_unactive@3x.png │ │ └── index.js │ ├── data │ │ ├── icons │ │ │ ├── icon5.png │ │ │ ├── icon10@2x.png │ │ │ ├── icon10@3x.png │ │ │ ├── icon1@2x.png │ │ │ ├── icon1@3x.png │ │ │ ├── icon2@2x.png │ │ │ ├── icon2@3x.png │ │ │ ├── icon3@2x.png │ │ │ ├── icon3@3x.png │ │ │ ├── icon4@2x.png │ │ │ ├── icon4@3x.png │ │ │ ├── icon6@2x.png │ │ │ ├── icon6@3x.png │ │ │ ├── icon7@2x.png │ │ │ ├── icon7@3x.png │ │ │ ├── icon8@2x.png │ │ │ ├── icon8@3x.png │ │ │ ├── icon9@2x.png │ │ │ ├── icon9@3x.png │ │ │ └── index.js │ │ └── common.js │ ├── actions │ │ ├── ActionTypes.js │ │ └── home.js │ ├── pull │ │ ├── i18n │ │ │ ├── All.js │ │ │ └── index.js │ │ ├── style │ │ │ └── index.js │ │ ├── PullLayout.js │ │ ├── LoadingSpinner.js │ │ └── PullView.js │ ├── utils │ │ ├── NavigationReduxUtil.js │ │ ├── StyleColor.js │ │ └── index.js │ ├── sagas │ │ ├── index.js │ │ └── home.js │ ├── list │ │ └── SGList │ │ │ ├── Card.js │ │ │ ├── CardListView.js │ │ │ ├── CardListController.js │ │ │ └── CardListDataSource.js │ ├── reducers │ │ ├── index.js │ │ ├── navigator.js │ │ └── home.js │ ├── component │ │ ├── modol.js │ │ └── Tab.js │ ├── page │ │ ├── GesturePage.js │ │ ├── TestActivity.js │ │ └── Pull.js │ ├── store │ │ └── configure-store.js │ ├── root.js │ └── gesture │ │ ├── PressBox.js │ │ ├── draggable.js │ │ └── TapOrPan.js ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── .gitignore ├── .idea │ ├── encodings.xml │ ├── modules.xml │ ├── runConfigurations.xml │ ├── gradle.xml │ └── misc.xml ├── index.js ├── gradle.properties ├── build.gradle ├── package.json └── gradlew.bat └── README.md /testApp/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /testApp/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /testApp/RN_src/assets/home/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/home/back.png -------------------------------------------------------------------------------- /testApp/RN_src/data/icons/icon5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/data/icons/icon5.png -------------------------------------------------------------------------------- /testApp/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | TestApp 3 | 4 | -------------------------------------------------------------------------------- /testApp/RN_src/assets/list/nodata.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/list/nodata.png -------------------------------------------------------------------------------- /testApp/RN_src/assets/home/back@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/home/back@2x.png -------------------------------------------------------------------------------- /testApp/RN_src/assets/home/back@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/home/back@3x.png -------------------------------------------------------------------------------- /testApp/RN_src/assets/list/nodata@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/list/nodata@2x.png -------------------------------------------------------------------------------- /testApp/RN_src/assets/list/nodata@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/list/nodata@3x.png -------------------------------------------------------------------------------- /testApp/RN_src/assets/list/nonetwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/list/nonetwork.png -------------------------------------------------------------------------------- /testApp/RN_src/data/icons/icon10@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/data/icons/icon10@2x.png -------------------------------------------------------------------------------- /testApp/RN_src/data/icons/icon10@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/data/icons/icon10@3x.png -------------------------------------------------------------------------------- /testApp/RN_src/data/icons/icon1@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/data/icons/icon1@2x.png -------------------------------------------------------------------------------- /testApp/RN_src/data/icons/icon1@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/data/icons/icon1@3x.png -------------------------------------------------------------------------------- /testApp/RN_src/data/icons/icon2@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/data/icons/icon2@2x.png -------------------------------------------------------------------------------- /testApp/RN_src/data/icons/icon2@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/data/icons/icon2@3x.png -------------------------------------------------------------------------------- /testApp/RN_src/data/icons/icon3@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/data/icons/icon3@2x.png -------------------------------------------------------------------------------- /testApp/RN_src/data/icons/icon3@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/data/icons/icon3@3x.png -------------------------------------------------------------------------------- /testApp/RN_src/data/icons/icon4@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/data/icons/icon4@2x.png -------------------------------------------------------------------------------- /testApp/RN_src/data/icons/icon4@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/data/icons/icon4@3x.png -------------------------------------------------------------------------------- /testApp/RN_src/data/icons/icon6@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/data/icons/icon6@2x.png -------------------------------------------------------------------------------- /testApp/RN_src/data/icons/icon6@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/data/icons/icon6@3x.png -------------------------------------------------------------------------------- /testApp/RN_src/data/icons/icon7@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/data/icons/icon7@2x.png -------------------------------------------------------------------------------- /testApp/RN_src/data/icons/icon7@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/data/icons/icon7@3x.png -------------------------------------------------------------------------------- /testApp/RN_src/data/icons/icon8@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/data/icons/icon8@2x.png -------------------------------------------------------------------------------- /testApp/RN_src/data/icons/icon8@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/data/icons/icon8@3x.png -------------------------------------------------------------------------------- /testApp/RN_src/data/icons/icon9@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/data/icons/icon9@2x.png -------------------------------------------------------------------------------- /testApp/RN_src/data/icons/icon9@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/data/icons/icon9@3x.png -------------------------------------------------------------------------------- /testApp/app/libs/nimbus-jose-jwt-5.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/app/libs/nimbus-jose-jwt-5.1.jar -------------------------------------------------------------------------------- /testApp/RN_src/assets/tab/home_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/tab/home_active.png -------------------------------------------------------------------------------- /testApp/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /testApp/RN_src/assets/list/nonetwork@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/list/nonetwork@2x.png -------------------------------------------------------------------------------- /testApp/RN_src/assets/list/nonetwork@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/list/nonetwork@3x.png -------------------------------------------------------------------------------- /testApp/RN_src/assets/tab/home_active@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/tab/home_active@2x.png -------------------------------------------------------------------------------- /testApp/RN_src/assets/tab/home_active@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/tab/home_active@3x.png -------------------------------------------------------------------------------- /testApp/RN_src/assets/tab/home_unactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/tab/home_unactive.png -------------------------------------------------------------------------------- /testApp/RN_src/assets/tab/profile_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/tab/profile_active.png -------------------------------------------------------------------------------- /testApp/RN_src/assets/tab/project_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/tab/project_active.png -------------------------------------------------------------------------------- /testApp/app/src/main/res/drawable/pulling.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/app/src/main/res/drawable/pulling.gif -------------------------------------------------------------------------------- /testApp/app/src/main/res/drawable/pullok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/app/src/main/res/drawable/pullok.png -------------------------------------------------------------------------------- /testApp/RN_src/assets/tab/home_unactive@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/tab/home_unactive@2x.png -------------------------------------------------------------------------------- /testApp/RN_src/assets/tab/home_unactive@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/tab/home_unactive@3x.png -------------------------------------------------------------------------------- /testApp/RN_src/assets/tab/profile_active@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/tab/profile_active@2x.png -------------------------------------------------------------------------------- /testApp/RN_src/assets/tab/profile_active@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/tab/profile_active@3x.png -------------------------------------------------------------------------------- /testApp/RN_src/assets/tab/profile_unactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/tab/profile_unactive.png -------------------------------------------------------------------------------- /testApp/RN_src/assets/tab/project_active@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/tab/project_active@2x.png -------------------------------------------------------------------------------- /testApp/RN_src/assets/tab/project_active@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/tab/project_active@3x.png -------------------------------------------------------------------------------- /testApp/RN_src/assets/tab/project_unactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/tab/project_unactive.png -------------------------------------------------------------------------------- /testApp/RN_src/assets/tab/xindaiicon_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/tab/xindaiicon_active.png -------------------------------------------------------------------------------- /testApp/app/src/main/res/mipmap-mdpi/pullok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/app/src/main/res/mipmap-mdpi/pullok.png -------------------------------------------------------------------------------- /testApp/RN_src/assets/home/share_icon_moments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/home/share_icon_moments.png -------------------------------------------------------------------------------- /testApp/RN_src/assets/home/share_icon_wechat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/home/share_icon_wechat.png -------------------------------------------------------------------------------- /testApp/RN_src/assets/tab/profile_unactive@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/tab/profile_unactive@2x.png -------------------------------------------------------------------------------- /testApp/RN_src/assets/tab/profile_unactive@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/tab/profile_unactive@3x.png -------------------------------------------------------------------------------- /testApp/RN_src/assets/tab/project_unactive@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/tab/project_unactive@2x.png -------------------------------------------------------------------------------- /testApp/RN_src/assets/tab/project_unactive@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/tab/project_unactive@3x.png -------------------------------------------------------------------------------- /testApp/RN_src/assets/tab/xindaiicon_active@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/tab/xindaiicon_active@2x.png -------------------------------------------------------------------------------- /testApp/RN_src/assets/tab/xindaiicon_active@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/tab/xindaiicon_active@3x.png -------------------------------------------------------------------------------- /testApp/RN_src/assets/tab/xindaiicon_unactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/tab/xindaiicon_unactive.png -------------------------------------------------------------------------------- /testApp/app/src/main/res/drawable-v24/pulling.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/app/src/main/res/drawable-v24/pulling.gif -------------------------------------------------------------------------------- /testApp/app/src/main/res/drawable-v24/pullok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/app/src/main/res/drawable-v24/pullok.png -------------------------------------------------------------------------------- /testApp/app/src/main/res/drawable/pullrelease.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/app/src/main/res/drawable/pullrelease.gif -------------------------------------------------------------------------------- /testApp/app/src/main/res/mipmap-mdpi/pulling.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/app/src/main/res/mipmap-mdpi/pulling.gif -------------------------------------------------------------------------------- /testApp/RN_src/assets/home/backgroundImageHeader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/home/backgroundImageHeader.png -------------------------------------------------------------------------------- /testApp/RN_src/assets/tab/xindaiicon_unactive@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/tab/xindaiicon_unactive@2x.png -------------------------------------------------------------------------------- /testApp/RN_src/assets/tab/xindaiicon_unactive@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/RN_src/assets/tab/xindaiicon_unactive@3x.png -------------------------------------------------------------------------------- /testApp/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /testApp/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /testApp/app/src/main/res/mipmap-mdpi/pullrelease.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/app/src/main/res/mipmap-mdpi/pullrelease.gif -------------------------------------------------------------------------------- /testApp/app/src/main/res/drawable-v24/pullrelease.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/app/src/main/res/drawable-v24/pullrelease.gif -------------------------------------------------------------------------------- /testApp/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /testApp/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /testApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /testApp/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /testApp/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /testApp/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /testApp/app/src/main/res/mipmap-xhdpi/share_icon_moments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/app/src/main/res/mipmap-xhdpi/share_icon_moments.png -------------------------------------------------------------------------------- /testApp/app/src/main/res/mipmap-xhdpi/share_icon_wechat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/app/src/main/res/mipmap-xhdpi/share_icon_wechat.png -------------------------------------------------------------------------------- /testApp/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /testApp/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | -------------------------------------------------------------------------------- /testApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuyunqiang/AndroidToRN/HEAD/testApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /testApp/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /testApp/RN_src/actions/ActionTypes.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by wuyunqiang on 2018/01/24. 3 | */ 4 | 5 | export default class ActionTypes{ 6 | static REQUEST = 'REQUEST'; 7 | static FETCH = 'FETCH'; 8 | static RECEIVE = 'RECEIVE'; 9 | } 10 | 11 | global.ActionTypes = ActionTypes; -------------------------------------------------------------------------------- /testApp/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Dec 01 10:38:58 CST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip 7 | -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/gesture/RNGestureHandlerRootInterface.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.gesture; 2 | 3 | import javax.annotation.Nullable; 4 | 5 | public interface RNGestureHandlerRootInterface { 6 | @Nullable 7 | RNGestureHandlerRootHelper getRootHelper(); 8 | } 9 | -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/codepush/CodePushInvalidUpdateException.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.codepush; 2 | 3 | public class CodePushInvalidUpdateException extends RuntimeException { 4 | public CodePushInvalidUpdateException(String message) { 5 | super(message); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /testApp/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/codepush/DownloadProgressCallback.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.codepush; 2 | 3 | import com.example.wuyunqiang.testapp.codepush.*; 4 | 5 | interface DownloadProgressCallback { 6 | void call(com.example.wuyunqiang.testapp.codepush.DownloadProgress downloadProgress); 7 | } 8 | -------------------------------------------------------------------------------- /testApp/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /testApp/RN_src/pull/i18n/All.js: -------------------------------------------------------------------------------- 1 | export default { 2 | "": { 3 | pulling: "pulling...", 4 | pullok: "pull ok......", 5 | pullrelease: "refreshing......" 6 | }, 7 | "zh_CN": { 8 | pulling: "下拉刷新...", 9 | pullok: "松开刷新......", 10 | pullrelease: "玩命刷新中......" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/gesturehandler/GestureHandlerRegistry.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.gesturehandler; 2 | 3 | import android.view.View; 4 | 5 | import java.util.ArrayList; 6 | 7 | public interface GestureHandlerRegistry { 8 | ArrayList getHandlersForView(View view); 9 | } 10 | -------------------------------------------------------------------------------- /testApp/app/src/main/res/anim/slide_in_right.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 9 | -------------------------------------------------------------------------------- /testApp/app/src/main/res/anim/slide_out_left.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 9 | -------------------------------------------------------------------------------- /testApp/app/src/main/res/anim/slide_out_right.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 9 | -------------------------------------------------------------------------------- /testApp/app/src/main/res/anim/slide_in_left.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 9 | 10 | -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/gesturehandler/OnTouchEventListener.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.gesturehandler; 2 | 3 | import android.view.MotionEvent; 4 | 5 | public interface OnTouchEventListener { 6 | void onTouchEvent(T handler, MotionEvent event); 7 | void onStateChange(T handler, int newState, int oldState); 8 | } 9 | -------------------------------------------------------------------------------- /testApp/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/gesturehandler/ViewConfigurationHelper.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.gesturehandler; 2 | 3 | import android.view.View; 4 | import android.view.ViewGroup; 5 | 6 | public interface ViewConfigurationHelper { 7 | PointerEventsConfig getPointerEventsConfigForView(View view); 8 | View getChildInDrawingOrderAtIndex(ViewGroup parent, int index); 9 | } 10 | -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/fastimage/FastImageGlideModule.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.fastimage; 2 | 3 | import com.bumptech.glide.annotation.GlideModule; 4 | import com.bumptech.glide.module.AppGlideModule; 5 | 6 | // We need an AppGlideModule to be present for progress events to work. 7 | @GlideModule 8 | public final class FastImageGlideModule extends AppGlideModule { 9 | } 10 | -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/gesture/RNGestureHandlerEventDataExtractor.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.gesture; 2 | 3 | import com.example.wuyunqiang.testapp.gesturehandler.GestureHandler; 4 | import com.facebook.react.bridge.WritableMap; 5 | 6 | public interface RNGestureHandlerEventDataExtractor { 7 | void extractEventData(T handler, WritableMap eventData); 8 | } 9 | -------------------------------------------------------------------------------- /testApp/RN_src/utils/NavigationReduxUtil.js: -------------------------------------------------------------------------------- 1 | 2 | import { 3 | createReactNavigationReduxMiddleware, 4 | createReduxBoundAddListener, 5 | } from 'react-navigation-redux-helpers'; 6 | 7 | const middleware = createReactNavigationReduxMiddleware( 8 | "root", 9 | state => state.nav, 10 | ); 11 | const addListener = createReduxBoundAddListener("root"); 12 | 13 | export { 14 | middleware, 15 | addListener, 16 | }; -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/codepush/CodePushUnknownException.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.codepush; 2 | 3 | class CodePushUnknownException extends RuntimeException { 4 | 5 | public CodePushUnknownException(String message, Throwable cause) { 6 | super(message, cause); 7 | } 8 | 9 | public CodePushUnknownException(String message) { 10 | super(message); 11 | } 12 | } -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/codepush/CodePushUpdateState.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.codepush; 2 | 3 | public enum CodePushUpdateState { 4 | RUNNING(0), 5 | PENDING(1), 6 | LATEST(2); 7 | 8 | private final int value; 9 | CodePushUpdateState(int value) { 10 | this.value = value; 11 | } 12 | public int getValue() { 13 | return this.value; 14 | } 15 | } -------------------------------------------------------------------------------- /testApp/app/src/main/res/layout/fakestatus.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/fastimage/FastImageViewWithUrl.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.fastimage; 2 | import android.content.Context; 3 | import android.widget.ImageView; 4 | 5 | import com.bumptech.glide.load.model.GlideUrl; 6 | 7 | class FastImageViewWithUrl extends ImageView { 8 | public GlideUrl glideUrl; 9 | 10 | public FastImageViewWithUrl(Context context) { 11 | super(context); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/codepush/CodePushInvalidPublicKeyException.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.codepush; 2 | 3 | class CodePushInvalidPublicKeyException extends RuntimeException { 4 | 5 | public CodePushInvalidPublicKeyException(String message, Throwable cause) { 6 | super(message, cause); 7 | } 8 | 9 | public CodePushInvalidPublicKeyException(String message) { 10 | super(message); 11 | } 12 | } -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/codepush/CodePushNotInitializedException.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.codepush; 2 | 3 | public final class CodePushNotInitializedException extends RuntimeException { 4 | 5 | public CodePushNotInitializedException(String message, Throwable cause) { 6 | super(message, cause); 7 | } 8 | 9 | public CodePushNotInitializedException(String message) { 10 | super(message); 11 | } 12 | } -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/codepush/CodePushInstallMode.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.codepush; 2 | 3 | public enum CodePushInstallMode { 4 | IMMEDIATE(0), 5 | ON_NEXT_RESTART(1), 6 | ON_NEXT_RESUME(2), 7 | ON_NEXT_SUSPEND(3); 8 | 9 | private final int value; 10 | CodePushInstallMode(int value) { 11 | this.value = value; 12 | } 13 | public int getValue() { 14 | return this.value; 15 | } 16 | } -------------------------------------------------------------------------------- /testApp/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FF4081 4 | #80000000 5 | #FF4081 6 | #E9967A 7 | #FCFCFC 8 | #80080808 9 | #F0F0F0 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /testApp/RN_src/pull/style/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import { 4 | StyleSheet 5 | } from 'react-native'; 6 | 7 | export default StyleSheet.create({ 8 | wrap: { 9 | flex: 1, 10 | flexGrow: 1, 11 | flexDirection: 'column', 12 | zIndex:-999, 13 | }, 14 | hide: { 15 | position: 'absolute', 16 | left: 10000 17 | }, 18 | show: { 19 | position: 'relative', 20 | left: 0 21 | } 22 | }); 23 | -------------------------------------------------------------------------------- /testApp/app/src/main/res/layout/activity_my_react.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /testApp/app/src/test/java/com/example/wuyunqiang/testapp/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/MyReactActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp; 2 | 3 | import com.example.wuyunqiang.testapp.preloadreact.PreLoadReactActivity; 4 | import com.facebook.react.ReactActivityDelegate; 5 | import com.facebook.react.ReactRootView; 6 | 7 | import javax.annotation.Nullable; 8 | 9 | public class MyReactActivity extends PreLoadReactActivity { 10 | 11 | @Nullable 12 | @Override 13 | protected String getMainComponentName() { 14 | return "RNActivity"; 15 | } 16 | 17 | 18 | } 19 | -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/fastimage/FastImageProgressListener.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.fastimage; 2 | public interface FastImageProgressListener { 3 | 4 | void onProgress(String key, long bytesRead, long expectedLength); 5 | 6 | /** 7 | * Control how often the listener needs an update. 0% and 100% will always be dispatched. 8 | * 9 | * @return in percentage (0.2 = call {@link #onProgress} around every 0.2 percent of progress) 10 | */ 11 | float getGranularityPercentage(); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /testApp/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample React Native App 3 | * https://github.com/facebook/react-native 4 | * @flow 5 | */ 6 | 7 | import React, {Component} from 'react'; 8 | import { 9 | AppRegistry, 10 | Platform, 11 | StyleSheet, 12 | Text, 13 | View, 14 | DeviceEventEmitter 15 | } from 'react-native'; 16 | import './RN_src/utils' 17 | import './RN_src/assets' 18 | import Root from './RN_src/root' 19 | import Test from './RN_src/page/TestActivity' 20 | AppRegistry.registerComponent('RNActivity', () => Root); 21 | 22 | AppRegistry.registerComponent('TestActivity', () => Test); -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/gesturehandler/GestureHandlerInteractionController.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.gesturehandler; 2 | 3 | public interface GestureHandlerInteractionController { 4 | boolean shouldWaitForHandlerFailure(GestureHandler handler, GestureHandler otherHandler); 5 | boolean shouldRequireHandlerToWaitForFailure(GestureHandler handler, GestureHandler otherHandler); 6 | boolean shouldRecognizeSimultaneously(GestureHandler handler, GestureHandler otherHandler); 7 | boolean shouldHandlerBeCancelledBy(GestureHandler handler, GestureHandler otherHandler); 8 | } 9 | -------------------------------------------------------------------------------- /testApp/.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/codepush/CodePushMalformedDataException.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.codepush; 2 | 3 | import java.net.MalformedURLException; 4 | 5 | public class CodePushMalformedDataException extends RuntimeException { 6 | public CodePushMalformedDataException(String path, Throwable cause) { 7 | super("Unable to parse contents of " + path + ", the file may be corrupted.", cause); 8 | } 9 | public CodePushMalformedDataException(String url, MalformedURLException cause) { 10 | super("The package has an invalid downloadUrl: " + url, cause); 11 | } 12 | } -------------------------------------------------------------------------------- /testApp/app/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/codepush/ReactInstanceHolder.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.codepush; 2 | 3 | import com.facebook.react.ReactInstanceManager; 4 | 5 | /** 6 | * Provides access to a {@link ReactInstanceManager}. 7 | * 8 | * ReactNativeHost already implements this interface, if you make use of that react-native 9 | * component (just add `implements ReactInstanceHolder`). 10 | */ 11 | public interface ReactInstanceHolder { 12 | 13 | /** 14 | * Get the current {@link ReactInstanceManager} instance. May return null. 15 | */ 16 | ReactInstanceManager getReactInstanceManager(); 17 | } 18 | -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/gesturehandler/PointerEvents.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.gesturehandler; 2 | 3 | public enum PointerEvents { 4 | 5 | /** 6 | * Neither the container nor its children receive events. 7 | */ 8 | NONE, 9 | 10 | /** 11 | * Container doesn't get events but all of its children do. 12 | */ 13 | BOX_NONE, 14 | 15 | /** 16 | * Container gets events but none of its children do. 17 | */ 18 | BOX_ONLY, 19 | 20 | /** 21 | * Container and all of its children receive touch events (like pointerEvents is unspecified). 22 | */ 23 | AUTO, 24 | ; 25 | } 26 | -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/gesturehandler/PointerEventsSpec.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.gesturehandler; 2 | 3 | public enum PointerEventsSpec { 4 | 5 | /** 6 | * Neither the container nor its children receive events. 7 | */ 8 | NONE, 9 | 10 | /** 11 | * Container doesn't get events but all of its children do. 12 | */ 13 | BOX_NONE, 14 | 15 | /** 16 | * Container gets events but none of its children do. 17 | */ 18 | BOX_ONLY, 19 | 20 | /** 21 | * Container and all of its children receive touch events (like pointerEvents is unspecified). 22 | */ 23 | AUTO, 24 | ; 25 | } 26 | -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/gesturehandler/PointerEventsConfig.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.gesturehandler; 2 | 3 | public enum PointerEventsConfig { 4 | 5 | /** 6 | * Neither the container nor its children receive events. 7 | */ 8 | NONE, 9 | 10 | /** 11 | * Container doesn't get events but all of its children do. 12 | */ 13 | BOX_NONE, 14 | 15 | /** 16 | * Container gets events but none of its children do. 17 | */ 18 | BOX_ONLY, 19 | 20 | /** 21 | * Container and all of its children receive touch events (like pointerEvents is unspecified). 22 | */ 23 | AUTO, 24 | ; 25 | } 26 | -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/gesturehandler/ViewConfigurationHelperImpl.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.gesturehandler; 2 | 3 | import android.view.View; 4 | import android.view.ViewGroup; 5 | 6 | public class ViewConfigurationHelperImpl implements ViewConfigurationHelper { 7 | 8 | @Override 9 | public PointerEventsConfig getPointerEventsConfigForView(View view) { 10 | return view.isEnabled() ? PointerEventsConfig.AUTO : PointerEventsConfig.NONE; 11 | } 12 | 13 | @Override 14 | public View getChildInDrawingOrderAtIndex(ViewGroup parent, int index) { 15 | return parent.getChildAt(index); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /testApp/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | -------------------------------------------------------------------------------- /testApp/RN_src/data/icons/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Created by Stone 4 | * https://github.com/bolan9999 5 | * Email: bolan999999@gmail.com 6 | * Date: 2017/12/14 7 | * 8 | */ 9 | 10 | 11 | let iconObject = { 12 | icon1:require("./icon1.png"), 13 | icon2:require("./icon2.png"), 14 | icon3:require("./icon3.png"), 15 | icon4:require("./icon4.png"), 16 | icon5:require("./icon5.png"), 17 | icon6:require("./icon6.png"), 18 | icon7:require("./icon7.png"), 19 | icon8:require("./icon8.png"), 20 | icon9:require("./icon9.png"), 21 | icon10:require("./icon10.png"), 22 | icon11:require("./icon8.png"), 23 | } 24 | 25 | let iconArray = Object.values(iconObject); 26 | 27 | export {iconObject,iconArray}; -------------------------------------------------------------------------------- /testApp/app/src/main/res/layout/pull_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /testApp/RN_src/pull/i18n/index.js: -------------------------------------------------------------------------------- 1 | import { Platform, NativeModules } from 'react-native'; 2 | import all from './All.js'; 3 | 4 | function getLocale() { 5 | try { 6 | if (Platform.OS === 'android') { 7 | return NativeModules.I18nManager.localeIdentifier; 8 | } else { 9 | return NativeModules.SettingsManager.settings.AppleLocale; 10 | } 11 | } catch (e) { 12 | return null; 13 | } finally {} 14 | } 15 | function getI18N(v) { 16 | let locale = getLocale(); 17 | if(v[locale]) { 18 | return v[locale]; 19 | } else if(v[""]) { 20 | return v[""]; 21 | } else { 22 | return v["default"]; 23 | } 24 | } 25 | var i18n = getI18N(all); 26 | export default i18n; 27 | -------------------------------------------------------------------------------- /testApp/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /testApp/RN_src/actions/home.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by wuyunqiang on 2018/01/24. 3 | */ 4 | 5 | //请求数据的前发送的action 6 | export function FetchData(refresh = false , loadmore = false) { 7 | console.log('ActionTypes.HOME_FETCH'); 8 | return { 9 | type: ActionTypes.FETCH, 10 | refresh, 11 | loadmore, 12 | }; 13 | } 14 | 15 | //请求结束 发送action 16 | export function ReceiveData(data) { 17 | console.log('ActionTypes.HOME_RECEIVE'); 18 | return { 19 | type: ActionTypes.RECEIVE, 20 | data, 21 | }; 22 | } 23 | 24 | //请求数据的action 25 | export function RequestData(url,params){ 26 | console.log('ActionTypes.HOME_REQUEST'); 27 | console.log('home url',url); 28 | console.log('home params',params); 29 | return { 30 | type: ActionTypes.REQUEST, 31 | url, 32 | params 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /testApp/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 | org.gradle.jvmargs=-Xmx1536m 13 | android.enableAapt2=false 14 | android.useDeprecatedNdk=true 15 | 16 | # When configured, Gradle will run in incubating parallel mode. 17 | # This option should only be used with decoupled projects. More details, visit 18 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 19 | # org.gradle.parallel=true 20 | -------------------------------------------------------------------------------- /testApp/RN_src/sagas/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Copyright 2016-present reading 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | import { fork } from 'redux-saga/effects'; 19 | import { watchHomeRequestData } from './home'; 20 | export default function* rootSaga() { 21 | yield [fork(watchHomeRequestData)]; 22 | } 23 | -------------------------------------------------------------------------------- /testApp/app/src/main/res/layout/activity_other.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 18 | 19 | -------------------------------------------------------------------------------- /testApp/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | 5 | repositories { 6 | google() 7 | jcenter() 8 | } 9 | dependencies { 10 | classpath 'com.android.tools.build:gradle:3.0.1' 11 | 12 | 13 | // NOTE: Do not place your application dependencies here; they belong 14 | // in the individual module build.gradle files 15 | } 16 | } 17 | 18 | allprojects { 19 | repositories { 20 | google() 21 | jcenter() 22 | mavenLocal() 23 | maven { 24 | // All of React Native (JS, Android binaries) is installed from npm 25 | url "../node_modules/react-native/android" 26 | } 27 | } 28 | } 29 | 30 | task clean(type: Delete) { 31 | delete rootProject.buildDir 32 | } 33 | -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/fastimage/FastImageViewPackage.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.fastimage; 2 | import com.facebook.react.ReactPackage; 3 | import com.facebook.react.bridge.NativeModule; 4 | import com.facebook.react.bridge.ReactApplicationContext; 5 | import com.facebook.react.uimanager.ViewManager; 6 | 7 | import java.util.Collections; 8 | import java.util.List; 9 | 10 | public class FastImageViewPackage implements ReactPackage { 11 | @Override 12 | public List createNativeModules(ReactApplicationContext reactContext) { 13 | return Collections.singletonList(new FastImageViewModule(reactContext)); 14 | } 15 | 16 | @Override 17 | public List createViewManagers(ReactApplicationContext reactContext) { 18 | return Collections.singletonList(new FastImageViewManager()); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/gesturehandler/BaseGestureHandlerInteractionController.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.gesturehandler; 2 | 3 | public abstract class BaseGestureHandlerInteractionController 4 | implements GestureHandlerInteractionController { 5 | 6 | @Override 7 | public boolean shouldWaitForHandlerFailure(GestureHandler handler, 8 | GestureHandler otherHandler) { 9 | return false; 10 | } 11 | 12 | @Override 13 | public boolean shouldRequireHandlerToWaitForFailure(GestureHandler handler, 14 | GestureHandler otherHandler) { 15 | return false; 16 | } 17 | 18 | @Override 19 | public boolean shouldRecognizeSimultaneously(GestureHandler handler, 20 | GestureHandler otherHandler) { 21 | return false; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /testApp/app/src/androidTest/java/com/example/wuyunqiang/testapp/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumented test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.example.wuyunqiang.testapp", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /testApp/RN_src/list/SGList/Card.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Image, StyleSheet, Text, View } from 'react-native'; 3 | import FastImage from 'react-native-fast-image' 4 | export default class Card extends React.Component { 5 | render() { 6 | return ( 7 | 8 | {this.props.deal.title} 9 | 14 | 15 | ); 16 | } 17 | } 18 | 19 | const styles = StyleSheet.create({ 20 | container: { 21 | flex: 1, 22 | justifyContent: 'center', 23 | alignItems: 'center', 24 | backgroundColor: '#F5FCFF', 25 | borderWidth: 1, 26 | borderColor: '#CCC', 27 | marginTop: 20, 28 | }, 29 | image: { 30 | height: 200, 31 | alignSelf: 'stretch', 32 | }, 33 | }); 34 | 35 | -------------------------------------------------------------------------------- /testApp/RN_src/reducers/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Copyright 2016-present reading 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | import { combineReducers } from 'redux'; 19 | import {Map, fromJS} from 'immutable'; 20 | import home from './home'; 21 | import navigator from './navigator'; 22 | const rootReducer = combineReducers({ 23 | nav:navigator, 24 | home, 25 | }); 26 | 27 | export default rootReducer; 28 | -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/activity/OtherActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.activity; 2 | 3 | import android.os.Bundle; 4 | import android.support.v7.app.AppCompatActivity; 5 | import android.util.Log; 6 | 7 | import com.example.wuyunqiang.testapp.R; 8 | import com.scwang.smartrefresh.layout.api.RefreshLayout; 9 | import com.scwang.smartrefresh.layout.listener.OnLoadmoreListener; 10 | import com.scwang.smartrefresh.layout.listener.OnRefreshListener; 11 | 12 | public class OtherActivity extends AppCompatActivity { 13 | 14 | @Override 15 | protected void onCreate(Bundle savedInstanceState) { 16 | super.onCreate(savedInstanceState); 17 | setContentView(R.layout.activity_other); 18 | } 19 | 20 | @Override 21 | public void onBackPressed() { 22 | super.onBackPressed(); 23 | this.finish(); 24 | overridePendingTransition(R.anim.slide_in_left,R.anim.slide_out_left); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/gesturehandler/GestureHandlerRegistryImpl.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.gesturehandler; 2 | 3 | import android.view.View; 4 | 5 | import java.util.ArrayList; 6 | import java.util.WeakHashMap; 7 | 8 | public class GestureHandlerRegistryImpl implements GestureHandlerRegistry { 9 | 10 | private WeakHashMap> mHandlers = new WeakHashMap<>(); 11 | 12 | public T registerHandlerForView(View view, T handler) { 13 | ArrayList listToAdd = mHandlers.get(view); 14 | if (listToAdd == null) { 15 | listToAdd = new ArrayList<>(1); 16 | listToAdd.add(handler); 17 | mHandlers.put(view, listToAdd); 18 | } else { 19 | listToAdd.add(handler); 20 | } 21 | return handler; 22 | } 23 | 24 | @Override 25 | public ArrayList getHandlersForView(View view) { 26 | return mHandlers.get(view); 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/RNFetchBlob/RNFetchBlobConst.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.RNFetchBlob; 2 | 3 | 4 | public class RNFetchBlobConst { 5 | public static final String EVENT_UPLOAD_PROGRESS = "RNFetchBlobProgress-upload"; 6 | public static final String EVENT_PROGRESS = "RNFetchBlobProgress"; 7 | public static final String EVENT_HTTP_STATE = "RNFetchBlobState"; 8 | public static final String EVENT_MESSAGE = "RNFetchBlobMessage"; 9 | public static final String FILE_PREFIX = "RNFetchBlob-file://"; 10 | public static final String FILE_PREFIX_BUNDLE_ASSET = "bundle-assets://"; 11 | public static final String FILE_PREFIX_CONTENT = "content://"; 12 | public static final String DATA_ENCODE_URI = "uri"; 13 | public static final String RNFB_RESPONSE_BASE64 = "base64"; 14 | public static final String RNFB_RESPONSE_UTF8 = "utf8"; 15 | public static final String RNFB_RESPONSE_PATH = "path"; 16 | public static final Integer GET_CONTENT_INTENT = 99900; 17 | 18 | } 19 | -------------------------------------------------------------------------------- /testApp/RN_src/utils/StyleColor.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by wuyunqiang on 2017/8/8. 3 | */ 4 | 5 | export default class StyleColor { 6 | static e35041 = '#e35041'; 7 | static white = 'white'; 8 | static fb3b3f = '#fb3b3f';//header颜色 9 | static f5f5f5 = '#f5f5f5';//全局背景色 10 | static f3f3f3 = '#f3f3f3'; 11 | static C999999 = '#999999'; 12 | static C333333 = '#333333'; 13 | static C666666 = '#666666'; 14 | static ff7b41 = '#ff7b41';//审批中 15 | static eaeaea = '#eaeaea';//细分割线 16 | static C01af81 = '#01af81'; 17 | static C5995f5 = '#5995f5';//按钮颜色 18 | static f7f7f7 = '#f7f7f7'; 19 | static C7b7b7b = '#7b7b7b';//未选中文字颜色 20 | static faf9f9 = '#faf9f9'; 21 | static dddddd = '#dddddd'; 22 | static ffffff = '#ffffff'; 23 | static f3474b = '#f3474b';//选中的颜色 24 | static fde2e3 = '#fde2e3'; 25 | static fff7e7 = '#fff7e7'; 26 | static f6f8fb = '#f6f8fb';//时间背景色 27 | static fe461c ='#fe461c'; 28 | static ffe7d6 = '#ffe7d6'; 29 | static f97578 = '#f97578' 30 | } 31 | 32 | global.Color = StyleColor; -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/codepush/DownloadProgress.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.codepush; 2 | 3 | import com.facebook.react.bridge.WritableMap; 4 | import com.facebook.react.bridge.WritableNativeMap; 5 | 6 | class DownloadProgress { 7 | private long mTotalBytes; 8 | private long mReceivedBytes; 9 | 10 | public DownloadProgress (long totalBytes, long receivedBytes){ 11 | mTotalBytes = totalBytes; 12 | mReceivedBytes = receivedBytes; 13 | } 14 | 15 | public WritableMap createWritableMap() { 16 | WritableMap map = new WritableNativeMap(); 17 | if (mTotalBytes < Integer.MAX_VALUE) { 18 | map.putInt("totalBytes", (int) mTotalBytes); 19 | map.putInt("receivedBytes", (int) mReceivedBytes); 20 | } else { 21 | map.putDouble("totalBytes", mTotalBytes); 22 | map.putDouble("receivedBytes", mReceivedBytes); 23 | } 24 | return map; 25 | } 26 | 27 | public boolean isCompleted() { 28 | return mTotalBytes == mReceivedBytes; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /testApp/RN_src/list/SGList/CardListView.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { ListView } from 'react-native'; 3 | import SGListView from 'react-native-sglistview'; 4 | import Card from './Card'; 5 | import PropTypes from 'prop-types'; 6 | const LIST_VIEW = 'listview'; 7 | 8 | export default class CardListView extends React.Component { 9 | renderRow(rowData, sectionID, rowID) { 10 | return ( 11 | 12 | ); 13 | } 14 | 15 | render() { 16 | return ( 17 | 23 | ); 24 | } 25 | 26 | getDataSource() { 27 | const dataSource = new ListView.DataSource( 28 | { rowHasChanged: (r1, r2) => r1.uuid !== r2.uuid }); 29 | 30 | const deals = this.props.deals.length > 0; 31 | return deals ? dataSource.cloneWithRows(this.props.deals) : dataSource; 32 | } 33 | } 34 | 35 | CardListView.propTypes = { 36 | deals: PropTypes.object.isRequired, 37 | onEndReached: PropTypes.func.isRequired, 38 | }; 39 | 40 | -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/RNFetchBlob/RNFetchBlobPackage.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.RNFetchBlob; 2 | 3 | import com.facebook.react.ReactPackage; 4 | import com.facebook.react.bridge.JavaScriptModule; 5 | import com.facebook.react.bridge.NativeModule; 6 | import com.facebook.react.bridge.ReactApplicationContext; 7 | import com.facebook.react.uimanager.ViewManager; 8 | 9 | import java.util.ArrayList; 10 | import java.util.Collections; 11 | import java.util.List; 12 | 13 | 14 | public class RNFetchBlobPackage implements ReactPackage { 15 | 16 | @Override 17 | public List createNativeModules(ReactApplicationContext reactContext) { 18 | List modules = new ArrayList<>(); 19 | modules.add(new RNFetchBlob(reactContext)); 20 | return modules; 21 | } 22 | 23 | public List> createJSModules() { 24 | return Collections.emptyList(); 25 | } 26 | 27 | @Override 28 | public List createViewManagers(ReactApplicationContext reactContext) { 29 | return Collections.emptyList(); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /testApp/RN_src/component/modol.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by wuyunqiang on 2018/1/16. 3 | */ 4 | import React, { Component } from 'react'; 5 | import { 6 | AppRegistry, 7 | Platform, 8 | StyleSheet, 9 | Text, 10 | View, 11 | ScrollView, 12 | Image, 13 | UIManager, 14 | TouchableOpacity, 15 | NativeModules, 16 | ImageBackground, 17 | DeviceEventEmitter, 18 | requireNativeComponent, 19 | } from 'react-native'; 20 | const ReactNative = require('ReactNative'); 21 | import PropTypes from 'prop-types'; 22 | var ModalView = requireNativeComponent('ModalAndroid', App);//内部使用popwindow实现全屏 23 | export default class App extends Component { 24 | constructor(props){ 25 | super(props); 26 | } 27 | 28 | render() { 29 | return ( 30 | {this.PopModal = PopModal}} 32 | {...this.props}> 33 | 34 | {this.props.children} 35 | 36 | 37 | ) 38 | } 39 | } 40 | 41 | ModalView.propTypes = { 42 | ...View.propTypes, 43 | visible:PropTypes.bool, 44 | }; -------------------------------------------------------------------------------- /testApp/RN_src/page/GesturePage.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Animated,Dimensions,Alert,Text,StyleSheet, View } from 'react-native'; 3 | import { 4 | PanGestureHandler, 5 | LongPressGestureHandler, 6 | ScrollView, 7 | State, 8 | TapGestureHandler, 9 | } from 'react-native-gesture-handler'; 10 | import TapOrPan from '../gesture/TapOrPan' 11 | import PressBox from '../gesture/PressBox' 12 | import { LoremIpsum } from '../data/common'; 13 | import DraggableBox from '../gesture/draggable' 14 | 15 | export default class Example extends Component { 16 | render() { 17 | return ( 18 | 21 | 22 | 23 | 24 | 25 | ); 26 | } 27 | } 28 | 29 | const styles = StyleSheet.create({ 30 | scrollView: { 31 | flex: 1, 32 | }, 33 | box: { 34 | width: 150, 35 | height: 150, 36 | alignSelf: 'center', 37 | backgroundColor: 'plum', 38 | margin: 10, 39 | zIndex: 200, 40 | }, 41 | }); 42 | -------------------------------------------------------------------------------- /testApp/RN_src/page/TestActivity.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample React Native App 3 | * https://github.com/facebook/react-native 4 | * @flow 5 | */ 6 | 7 | import React, { Component } from 'react'; 8 | import { 9 | AppRegistry, 10 | Platform, 11 | StyleSheet, 12 | Text, 13 | View, 14 | Dimensions, 15 | DeviceEventEmitter 16 | } from 'react-native'; 17 | let WIDTH = Dimensions.get('window').width; 18 | 19 | export default class App extends Component { 20 | 21 | constructor(props){ 22 | super(props); 23 | console.log("TestActivity 执行构造函数") 24 | } 25 | 26 | componentDidMount() { 27 | console.log("TestActivity componentDidMount") 28 | } 29 | 30 | render() { 31 | return ( 32 | 33 | Hello, 这里是RN view 34 | 35 | ) 36 | } 37 | } 38 | 39 | const styles = StyleSheet.create({ 40 | container: { 41 | flex:1, 42 | width:WIDTH, 43 | backgroundColor:'gray' 44 | }, 45 | hello: { 46 | marginTop:20, 47 | fontSize: 20, 48 | textAlign: 'center', 49 | margin: 10, 50 | }, 51 | }); 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /testApp/RN_src/list/SGList/CardListController.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import DataSource from './CardListDataSource'; 3 | import CardListView from './CardListView'; 4 | 5 | class CardList extends React.Component { 6 | constructor(props) { 7 | super(props); 8 | const self = this; 9 | 10 | this.state = { 11 | deals: [], 12 | }; 13 | 14 | this.cache = { 15 | offset: 0, 16 | limit: 10, 17 | lat: 45.52, 18 | lng: -122.681944, 19 | }; 20 | 21 | DataSource.fetch(this.cache, (err, res) => { 22 | if (err) console.warn(err); 23 | else self.setState({deals:res.body.deals}); 24 | }); 25 | } 26 | 27 | render() { 28 | return ( 29 | 33 | ); 34 | } 35 | 36 | onEndReached() { 37 | this.cache.offset += 10; 38 | var self = this; 39 | 40 | DataSource.fetch(this.cache, (err, res) => { 41 | if (err) console.warn(err); 42 | else self.setState({deals:self.state.deals.concat(res.body.deals)}); // concat deals to the end of the array 43 | }); 44 | } 45 | } 46 | 47 | module.exports = CardList; 48 | -------------------------------------------------------------------------------- /testApp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "testapp", 3 | "version": "1.0.0", 4 | "description": "test", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "start": "node node_modules/react-native/local-cli/cli.js start", 9 | "bundle": "react-native bundle --entry-file index.js --bundle-output ./bundle/index.android.bundle--platform android --assets-dest ./bundle --dev false " 10 | }, 11 | "author": "", 12 | "license": "ISC", 13 | "dependencies": { 14 | "add": "^2.0.6", 15 | "immutable": "^3.8.2", 16 | "react": "^16.2.0", 17 | "react-native": "0.55.4", 18 | "react-native-code-push": "^5.3.4", 19 | "react-native-fast-image": "^4.0.14", 20 | "react-native-fetch-blob": "^0.10.8", 21 | "react-native-gesture-handler": "^1.0.0-alpha.40", 22 | "react-native-largelist": "^1.2.4", 23 | "react-native-root-toast": "^3.0.0", 24 | "react-native-sglistview": "^0.4.5", 25 | "react-navigation": "^2.0.1", 26 | "react-navigation-redux-helpers": "^1.0.1", 27 | "react-redux": "^5.0.6", 28 | "redux": "^3.7.2", 29 | "redux-logger": "^3.0.6", 30 | "redux-saga": "^0.16.0", 31 | "superagent": "^3.8.2", 32 | "yarn": "^1.3.2" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/RNFetchBlob/RNFetchBlobProgressConfig.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.RNFetchBlob; 2 | 3 | /** 4 | * Created by wkh237 on 2016/9/24. 5 | */ 6 | public class RNFetchBlobProgressConfig { 7 | 8 | public enum ReportType { 9 | Upload, 10 | Download 11 | }; 12 | 13 | long lastTick = 0; 14 | int tick = 0; 15 | int count = -1; 16 | public int interval = -1; 17 | public boolean enable = false; 18 | public ReportType type = ReportType.Download; 19 | 20 | RNFetchBlobProgressConfig(boolean report, int interval, int count, ReportType type) { 21 | this.enable = report; 22 | this.interval = interval; 23 | this.type = type; 24 | this.count = count; 25 | } 26 | 27 | public boolean shouldReport(float progress) { 28 | boolean checkCount = true; 29 | if(count > 0 && progress > 0) 30 | checkCount = Math.floor(progress*count)> tick; 31 | boolean result = (System.currentTimeMillis() - lastTick> interval) && enable && checkCount; 32 | if(result) { 33 | tick++; 34 | lastTick = System.currentTimeMillis(); 35 | } 36 | return result; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/RNPackage.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp; 2 | 3 | import com.example.wuyunqiang.testapp.rnmodules.NativeUtil; 4 | import com.example.wuyunqiang.testapp.rnview.PopModalManager; 5 | import com.example.wuyunqiang.testapp.rnview.PullLayout; 6 | import com.facebook.react.ReactPackage; 7 | import com.facebook.react.bridge.ReactApplicationContext; 8 | import com.facebook.react.uimanager.ViewManager; 9 | 10 | import java.util.ArrayList; 11 | import java.util.List; 12 | 13 | /** 14 | * Created by wuyunqiang on 2018/1/2. 15 | */ 16 | 17 | public class RNPackage implements ReactPackage { 18 | 19 | @Override 20 | public List createNativeModules(ReactApplicationContext reactContext) { 21 | List modules = new ArrayList<>(); 22 | modules.add(new NativeUtil(reactContext)); 23 | 24 | return modules; 25 | } 26 | 27 | @Override 28 | public List createViewManagers(ReactApplicationContext reactContext) { 29 | List views = new ArrayList<>(); 30 | views.add(new PullLayout()); 31 | views.add(new PopModalManager()); 32 | return views; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/codepush/Promiss.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.codepush; 2 | 3 | import android.util.Log; 4 | 5 | import com.facebook.react.bridge.Promise; 6 | 7 | import javax.annotation.Nullable; 8 | 9 | /** 10 | * Created by wuyunqiang on 2018/1/9. 11 | */ 12 | 13 | public class Promiss implements Promise { 14 | 15 | public static String TAG = "CodePush"; 16 | 17 | 18 | @Override 19 | public void resolve(@Nullable Object value) { 20 | Log.i(TAG,"resolve:"); 21 | } 22 | 23 | @Override 24 | public void reject(String code, String message) { 25 | Log.i(TAG,"reject: "+message); 26 | 27 | } 28 | 29 | @Override 30 | public void reject(String code, Throwable e) { 31 | Log.i(TAG,"reject: "+e.getMessage()); 32 | 33 | } 34 | 35 | @Override 36 | public void reject(String code, String message, Throwable e) { 37 | Log.i(TAG,"reject: "+"code:"+code+" message:"+message+" e:"+e.getMessage()); 38 | } 39 | 40 | @Override 41 | public void reject(String message) { 42 | Log.i(TAG,"reject: "+message); 43 | } 44 | 45 | @Override 46 | public void reject(Throwable reason) { 47 | Log.i(TAG,"reject: "+reason.getMessage()); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /testApp/RN_src/reducers/navigator.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by wuyunqiang on 2018/01/24. 3 | */ 4 | import {fromJS} from 'immutable'; 5 | import {NavigationActions} from 'react-navigation'; 6 | 7 | import AppNavigator from '../router'; 8 | 9 | // *****************方式重复跳转页面 10 | const navigateOnce = (getStateForAction) => (action, state) => { 11 | const {type, routeName} = action 12 | console.log('执行了这里跳转页面',"routeName:",routeName); 13 | return ( 14 | state && 15 | type === NavigationActions.NAVIGATE && 16 | routeName === state.routes[state.routes.length - 1].routeName 17 | ) ? null : getStateForAction(action, state) 18 | }; 19 | AppNavigator.router.getStateForAction= navigateOnce(AppNavigator.router.getStateForAction); 20 | // ***************** 21 | 22 | export default function navigator(state, action) { 23 | console.log('navigator reduce',state,'action',action); 24 | const newState = AppNavigator.router.getStateForAction(action, state); 25 | 26 | return newState || state; 27 | // Initial state 28 | // if (!state) { 29 | // return fromJS(AppNavigator.router.getStateForAction(action, state)); 30 | // } 31 | // // Is this a navigation action that we should act upon? 32 | // if (includes(NavigationActions, action.type)) { 33 | // return fromJS(AppNavigator.router.getStateForAction(action, state.toJS())); 34 | // } 35 | // return state; 36 | } 37 | -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/codepush/CodePushBuilder.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.codepush; 2 | 3 | import android.content.Context; 4 | 5 | public class CodePushBuilder { 6 | private String mDeploymentKey; 7 | private Context mContext; 8 | 9 | private boolean mIsDebugMode; 10 | private String mServerUrl; 11 | private Integer mPublicKeyResourceDescriptor; 12 | 13 | public CodePushBuilder(String deploymentKey, Context context) { 14 | this.mDeploymentKey = deploymentKey; 15 | this.mContext = context; 16 | this.mServerUrl = com.example.wuyunqiang.testapp.codepush.CodePush.getServiceUrl(); 17 | } 18 | 19 | public CodePushBuilder setIsDebugMode(boolean isDebugMode) { 20 | this.mIsDebugMode = isDebugMode; 21 | return this; 22 | } 23 | 24 | public CodePushBuilder setServerUrl(String serverUrl) { 25 | this.mServerUrl = serverUrl; 26 | return this; 27 | } 28 | 29 | public CodePushBuilder setPublicKeyResourceDescriptor(int publicKeyResourceDescriptor) { 30 | this.mPublicKeyResourceDescriptor = publicKeyResourceDescriptor; 31 | return this; 32 | } 33 | 34 | public com.example.wuyunqiang.testapp.codepush.CodePush build() { 35 | return new com.example.wuyunqiang.testapp.codepush.CodePush(this.mDeploymentKey, this.mContext, this.mIsDebugMode, this.mServerUrl, this.mPublicKeyResourceDescriptor); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /testApp/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | 13 | 22 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /testApp/RN_src/assets/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 图片资源 3 | * */ 4 | 5 | const List = { 6 | get nodata() {return require('../assets/list/nodata.png')}, 7 | get nonetwork() {return require('../assets/list/nonetwork.png')}, 8 | }; 9 | 10 | 11 | const tab = { 12 | get xindaiicon_unactive() {return require('./tab/xindaiicon_unactive.png');}, 13 | get xindaiicon_active() {return require('./tab/xindaiicon_active.png');}, 14 | get home_active() {return require('./tab/home_active.png');}, 15 | get home_unactive() {return require('./tab/home_unactive.png');}, 16 | get project_active() {return require('./tab/project_active.png');}, 17 | get project_unactive() {return require('./tab/project_unactive.png');}, 18 | get profile_active() {return require('./tab/profile_active.png');}, 19 | get profile_unactive() {return require('./tab/profile_unactive.png');}, 20 | }; 21 | 22 | const Home = { 23 | get back() {return require('../assets/home/back.png')}, 24 | get backgroundImageHeader() {return require('../assets/home/backgroundImageHeader.png')}, 25 | get share_icon_moments() {return require('../assets/home/share_icon_moments.png')}, 26 | get share_icon_wechat() {return require('../assets/home/share_icon_wechat.png')}, 27 | 28 | }; 29 | 30 | 31 | const AppImages = { 32 | get List(){ 33 | return List; 34 | }, 35 | get tab(){ 36 | return tab; 37 | }, 38 | 39 | get Home(){ 40 | return Home; 41 | }, 42 | }; 43 | export default AppImages; 44 | global.AppImages = AppImages; -------------------------------------------------------------------------------- /testApp/RN_src/store/configure-store.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Copyright 2016-present reading 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 2018/01/24. 17 | */ 18 | import { createStore, applyMiddleware } from 'redux'; 19 | import createSagaMiddleware, { END } from 'redux-saga'; 20 | import rootReducer from '../reducers/index'; 21 | 22 | const middlewares = []; 23 | const { logger } = require('redux-logger'); 24 | 25 | // configuring saga middleware 26 | const sagaMiddleware = createSagaMiddleware(); 27 | 28 | middlewares.push(sagaMiddleware); 29 | /* global __DEV__ */ 30 | if (__DEV__) { 31 | middlewares.push(logger); 32 | } 33 | const createStoreWithMiddleware = applyMiddleware(...middlewares)(createStore); 34 | 35 | export default function configureStore(initialState) { 36 | const store = createStoreWithMiddleware(rootReducer, initialState); 37 | // install saga run 38 | store.runSaga = sagaMiddleware.run; 39 | store.close = () => store.dispatch(END); 40 | 41 | return store; 42 | } 43 | -------------------------------------------------------------------------------- /testApp/app/src/main/java/com/example/wuyunqiang/testapp/gesture/RNGestureHandlerRootView.java: -------------------------------------------------------------------------------- 1 | package com.example.wuyunqiang.testapp.gesture; 2 | 3 | import android.content.Context; 4 | import android.view.MotionEvent; 5 | 6 | import com.facebook.infer.annotation.Assertions; 7 | import com.facebook.react.bridge.ReactContext; 8 | import com.facebook.react.views.view.ReactViewGroup; 9 | 10 | import javax.annotation.Nullable; 11 | 12 | public class RNGestureHandlerRootView extends ReactViewGroup { 13 | 14 | private @Nullable 15 | RNGestureHandlerRootHelper mRootHelper; 16 | 17 | public RNGestureHandlerRootView(Context context) { 18 | super(context); 19 | } 20 | 21 | @Override 22 | protected void onAttachedToWindow() { 23 | super.onAttachedToWindow(); 24 | if (mRootHelper == null) { 25 | mRootHelper = new RNGestureHandlerRootHelper((ReactContext) getContext(), this); 26 | } 27 | } 28 | 29 | public void tearDown() { 30 | if (mRootHelper != null) { 31 | mRootHelper.tearDown(); 32 | } 33 | } 34 | 35 | @Override 36 | public boolean dispatchTouchEvent(MotionEvent ev) { 37 | if (Assertions.assertNotNull(mRootHelper).dispatchTouchEvent(ev)) { 38 | return true; 39 | } 40 | return super.dispatchTouchEvent(ev); 41 | } 42 | 43 | @Override 44 | public void requestDisallowInterceptTouchEvent(boolean disallowIntercept) { 45 | Assertions.assertNotNull(mRootHelper).requestDisallowInterceptTouchEvent(disallowIntercept); 46 | super.requestDisallowInterceptTouchEvent(disallowIntercept); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /testApp/app/src/main/res/layout/activity_test.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 20 | 28 |