├── .gitignore ├── .idea ├── encodings.xml ├── gradle.xml ├── misc.xml ├── runConfigurations.xml └── vcs.xml ├── README.md ├── app ├── .gitignore ├── build.gradle ├── channel ├── channel_debug ├── config.json ├── proguard-rules.pro ├── proguardMapping.txt ├── release │ ├── app-release.apk │ └── output.json ├── src │ ├── androidTest │ │ └── java │ │ │ └── com │ │ │ └── link │ │ │ └── petshop │ │ │ └── ExampleInstrumentedTest.kt │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── link │ │ │ │ └── fan │ │ │ │ ├── EntranceActivity.kt │ │ │ │ ├── app │ │ │ │ ├── main │ │ │ │ │ └── MainFragment.kt │ │ │ │ └── splash │ │ │ │ │ └── SplashFragment.kt │ │ │ │ ├── receiver │ │ │ │ └── FanReceiver.kt │ │ │ │ ├── service │ │ │ │ └── ShoppingService.kt │ │ │ │ ├── tasks │ │ │ │ ├── ARouterTask.kt │ │ │ │ ├── BmobTask.kt │ │ │ │ ├── BuglyTask.kt │ │ │ │ ├── DaemonTask.kt │ │ │ │ ├── H5Task.kt │ │ │ │ ├── HotfixTask.kt │ │ │ │ ├── MMKVTask.kt │ │ │ │ ├── ReceiverTask.kt │ │ │ │ ├── UpdateTask.kt │ │ │ │ └── UtilTask.kt │ │ │ │ └── tinker │ │ │ │ ├── CustomResultService.java │ │ │ │ ├── MainTinkerLike.kt │ │ │ │ ├── TinkerManager.java │ │ │ │ ├── TinkerService.kt │ │ │ │ └── entity │ │ │ │ └── Hotfix.kt │ │ └── res │ │ │ ├── layout │ │ │ ├── fragment_main.xml │ │ │ ├── fragment_splash.xml │ │ │ └── navigation_container.xml │ │ │ ├── mipmap-xxxhdpi │ │ │ └── splash.jpeg │ │ │ ├── navigation │ │ │ └── app_graph.xml │ │ │ ├── values │ │ │ ├── colors.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ │ └── xml │ │ │ └── network_security_config.xml │ └── test │ │ └── java │ │ └── com │ │ └── link │ │ └── petshop │ │ └── ExampleUnitTest.kt ├── tinkerpatch.gradle └── 混淆.md ├── build.gradle ├── component_login ├── .gitignore ├── build.gradle ├── gradle.properties └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── link │ │ └── component_login │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── debug │ │ └── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── link │ │ │ └── component_login │ │ │ ├── LoginApplication.kt │ │ │ ├── LoginService.kt │ │ │ ├── MainActivity.kt │ │ │ ├── data │ │ │ ├── Injection.kt │ │ │ ├── LoginRepository.kt │ │ │ └── source │ │ │ │ ├── http │ │ │ │ ├── HttpDataSourceImpl.kt │ │ │ │ ├── HttpService.kt │ │ │ │ └── IHttpDataSource.kt │ │ │ │ └── loacl │ │ │ │ ├── ILocalDataSource.kt │ │ │ │ └── LocalDataSourceImpl.kt │ │ │ └── ui │ │ │ ├── ViewModelFactory.kt │ │ │ ├── login │ │ │ ├── LoginFragment.kt │ │ │ └── LoginViewModel.kt │ │ │ ├── register │ │ │ ├── RegisterFragment.kt │ │ │ └── RegisterViewModel.kt │ │ │ └── resetpwd │ │ │ ├── ResetPwdFragment.kt │ │ │ └── ResetPwdViewModel.kt │ ├── release │ │ └── AndroidManifest.xml │ └── res │ │ ├── drawable │ │ ├── login_checkbox_eye.xml │ │ └── login_ic_code.xml │ │ ├── layout │ │ ├── login_fragment_login.xml │ │ ├── login_fragment_register.xml │ │ ├── login_fragment_reset_pwd.xml │ │ └── login_navigation_container.xml │ │ ├── mipmap-xhdpi │ │ └── login_btn_login.png │ │ ├── navigation │ │ └── login_graph.xml │ │ ├── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ │ └── xml │ │ └── login_network_security_config.xml │ └── test │ └── java │ └── com │ └── link │ └── component_login │ └── ExampleUnitTest.kt ├── component_main ├── .gitignore ├── build.gradle ├── gradle.properties └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── link │ │ └── component_main │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── assets │ │ ├── Ingredients.json │ │ ├── category.json │ │ ├── catelog.json │ │ ├── index.json │ │ ├── query.json │ │ └── queryId.json │ ├── debug │ │ └── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── link │ │ │ └── component_main │ │ │ ├── EmptyViewModel.kt │ │ │ ├── MainActivity.kt │ │ │ ├── MainApplication.kt │ │ │ ├── MainService.kt │ │ │ ├── data │ │ │ ├── Injection.kt │ │ │ ├── MainRepository.kt │ │ │ ├── entity │ │ │ │ ├── CategoryDetail.kt │ │ │ │ ├── CategoryResult.kt │ │ │ │ ├── MenuDetail.java │ │ │ │ └── MenuResult.kt │ │ │ └── source │ │ │ │ ├── http │ │ │ │ ├── HttpDataSourceImpl.kt │ │ │ │ ├── HttpService.kt │ │ │ │ └── IHttpDataSource.kt │ │ │ │ └── local │ │ │ │ ├── ILocalDataSource.kt │ │ │ │ └── LocalDataSourceImpl.kt │ │ │ └── ui │ │ │ ├── MainViewModelFactory.kt │ │ │ ├── catalog │ │ │ ├── CatalogFragment.kt │ │ │ └── detail │ │ │ │ ├── CatalogDetailFragment.kt │ │ │ │ ├── CatalogDetailViewModel.kt │ │ │ │ ├── LeftCatalogAdapter.kt │ │ │ │ └── RightCatalogAdapter.kt │ │ │ ├── find │ │ │ ├── FindAdapter.kt │ │ │ ├── FindFragment.kt │ │ │ └── FindViewModel.kt │ │ │ └── main │ │ │ ├── MainFragment.kt │ │ │ └── recommend │ │ │ ├── GalleryItemDecoration.java │ │ │ ├── RecommendFragment.kt │ │ │ ├── RecommendViewModel.kt │ │ │ └── adapter │ │ │ ├── RecommendAdapter.kt │ │ │ ├── RecommendHead2Adapter.kt │ │ │ └── RecommendHeadAdapter.kt │ ├── release │ │ └── AndroidManifest.xml │ └── res │ │ ├── drawable │ │ └── main_side_shopping_cart_bar.xml │ │ ├── layout │ │ ├── main_fragment_catalog.xml │ │ ├── main_fragment_catalog_detail.xml │ │ ├── main_fragment_main.xml │ │ ├── main_fragment_recommend.xml │ │ ├── main_item_catalog_left.xml │ │ ├── main_item_catalog_right.xml │ │ ├── main_item_find_main.xml │ │ ├── main_item_find_minor.xml │ │ ├── main_item_find_minor2.xml │ │ ├── main_item_recommend.xml │ │ ├── main_item_recommend_head_item.xml │ │ ├── main_item_recommend_head_item2.xml │ │ ├── main_recommend_head.xml │ │ └── main_recommend_head2.xml │ │ ├── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ │ └── xml │ │ └── main_network_security_config.xml │ └── test │ └── java │ └── com │ └── link │ └── component_main │ └── ExampleUnitTest.kt ├── component_menu ├── .gitignore ├── build.gradle ├── gradle.properties └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── link │ │ └── component_menu │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── debug │ │ └── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── link │ │ │ └── component_menu │ │ │ ├── MainActivity.kt │ │ │ ├── MenuApplication.kt │ │ │ ├── data │ │ │ ├── Injection.kt │ │ │ ├── MenuRepository.kt │ │ │ ├── entity │ │ │ │ ├── Collection.kt │ │ │ │ ├── FootPrint.kt │ │ │ │ ├── MenuDetail.java │ │ │ │ ├── MenuResult.kt │ │ │ │ └── StepsBean.java │ │ │ └── source │ │ │ │ ├── http │ │ │ │ ├── HttpDataSourceImpl.kt │ │ │ │ ├── HttpService.kt │ │ │ │ └── IHttpDataSource.kt │ │ │ │ └── local │ │ │ │ ├── ILocalDataSource.kt │ │ │ │ └── LocalDataSourceImpl.kt │ │ │ └── ui │ │ │ ├── MenuFragment.kt │ │ │ ├── MenuViewModel.kt │ │ │ ├── MenuViewModelFactory.kt │ │ │ └── adapter │ │ │ ├── MenuAdapter.kt │ │ │ ├── MenuFooterAdapter.kt │ │ │ └── MenuHeaderAdapter.kt │ ├── release │ │ └── AndroidManifest.xml │ └── res │ │ ├── layout │ │ ├── menu_activity_navigation.xml │ │ ├── menu_footer.xml │ │ ├── menu_footer_item.xml │ │ ├── menu_fragment_menu.xml │ │ ├── menu_header.xml │ │ ├── menu_header_item.xml │ │ └── menu_item.xml │ │ └── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── link │ └── component_menu │ └── ExampleUnitTest.kt ├── component_pay ├── .gitignore ├── build.gradle ├── gradle.properties └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── link │ │ └── component_pay │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── debug │ │ └── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── link │ │ │ └── component_pay │ │ │ ├── MainActivity.kt │ │ │ ├── PayApplication.kt │ │ │ ├── alipay │ │ │ ├── AliPayHelper.java │ │ │ ├── AliPayResultActivity.java │ │ │ └── utils │ │ │ │ ├── Base64.java │ │ │ │ ├── DateUtils.java │ │ │ │ ├── OrderInfoUtil2_0.java │ │ │ │ ├── PayResult.java │ │ │ │ └── SignUtils.java │ │ │ └── wxapi │ │ │ ├── WXPayEntryActivity.java │ │ │ ├── constants │ │ │ └── WXConstants.java │ │ │ ├── helpers │ │ │ └── WXPayHelper.java │ │ │ └── utils │ │ │ ├── WXHttpUtils.java │ │ │ └── WXPayUtils.java │ ├── release │ │ └── AndroidManifest.xml │ └── res │ │ ├── drawable │ │ ├── btn_commit_select.xml │ │ ├── commit_btn_h.xml │ │ └── commit_btn_n.xml │ │ ├── layout │ │ ├── activity_ali_pay_result.xml │ │ ├── activity_main.xml │ │ └── activity_wxentry.xml │ │ ├── mipmap-hdpi │ │ ├── error.png │ │ └── success.png │ │ ├── values │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ │ └── xml │ │ └── network_security_config.xml │ └── test │ └── java │ └── com │ └── link │ └── component_pay │ └── ExampleUnitTest.kt ├── component_search ├── .gitignore ├── build.gradle ├── gradle.properties └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── link │ │ └── component_search │ │ └── ExampleInstrumentedTest.kt │ ├── assets │ └── query.json │ ├── main │ ├── debug │ │ └── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── link │ │ │ └── component_search │ │ │ ├── MainActivity.kt │ │ │ ├── SearchApplication.kt │ │ │ ├── data │ │ │ ├── Injection.kt │ │ │ ├── SearchRepository.kt │ │ │ ├── entity │ │ │ │ ├── CategoryDetail.kt │ │ │ │ ├── CategoryResult.kt │ │ │ │ ├── HistoryEntity.kt │ │ │ │ ├── MenuDetail.kt │ │ │ │ └── MenuResult.kt │ │ │ └── source │ │ │ │ ├── http │ │ │ │ ├── HttpDataSourceImpl.kt │ │ │ │ ├── HttpService.kt │ │ │ │ └── IHttpDataSource.kt │ │ │ │ └── local │ │ │ │ ├── ILocalDataSource.kt │ │ │ │ ├── LocalDataSourceImpl.kt │ │ │ │ ├── SearchDataBase.kt │ │ │ │ └── SearchHistoryDao.kt │ │ │ └── ui │ │ │ ├── SearchViewModelFactory.kt │ │ │ ├── detail │ │ │ ├── SearchDetailActivity.kt │ │ │ ├── SearchDetailAdapter.kt │ │ │ └── SearchDetailFragment.kt │ │ │ └── search │ │ │ ├── SearchAdapter.kt │ │ │ ├── SearchFragment.kt │ │ │ └── SearchViewModel.kt │ ├── release │ │ └── AndroidManifest.xml │ └── res │ │ ├── layout │ │ ├── search_fragment_search.xml │ │ ├── search_head_view.xml │ │ ├── search_include_head_layout.xml │ │ ├── search_item.xml │ │ ├── search_item_detail.xml │ │ └── search_navigation_container.xml │ │ ├── mipmap-xxhdpi │ │ ├── boiled_pork.jpg │ │ ├── braised_pork.jpg │ │ ├── cola_chicken_wings.jpg │ │ ├── kung_pao_chicken.jpg │ │ ├── mapo_tofu.jpg │ │ └── pork_ribs.jpg │ │ ├── mipmap-xxxhdpi │ │ └── xxl.jpg │ │ ├── navigation │ │ └── search_graph.xml │ │ └── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── link │ └── component_search │ └── ExampleUnitTest.kt ├── component_shopping ├── .gitignore ├── build.gradle ├── gradle.properties └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── link │ │ └── component_shopping │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── debug │ │ └── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── link │ │ │ └── component_shopping │ │ │ ├── ShoppingApplication.kt │ │ │ ├── data │ │ │ ├── Injection.kt │ │ │ ├── ShoppingRepository.kt │ │ │ ├── entity │ │ │ │ ├── EntityResult.kt │ │ │ │ ├── GoodsEntity.kt │ │ │ │ └── SecondsEntity.kt │ │ │ └── source │ │ │ │ ├── http │ │ │ │ ├── HttpDataSourceImpl.kt │ │ │ │ ├── HttpService.kt │ │ │ │ └── IHttpDataSource.kt │ │ │ │ └── local │ │ │ │ ├── ILocalDataSource.kt │ │ │ │ └── LocalDataSourceImpl.kt │ │ │ ├── jsinterface │ │ │ ├── JavaScriptInterface.java │ │ │ └── SonicJavaScriptInterface.java │ │ │ └── ui │ │ │ ├── ViewModelFactory.kt │ │ │ └── shopping │ │ │ ├── ShoppingActivity.kt │ │ │ └── ShoppingViewModel.kt │ ├── release │ │ └── AndroidManifest.xml │ └── res │ │ ├── layout │ │ └── shopping_activity_main.xml │ │ └── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── link │ └── component_shopping │ └── ExampleUnitTest.kt ├── component_update ├── .gitignore ├── build.gradle ├── gradle.properties └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── link │ │ └── component_update │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── debug │ │ └── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── link │ │ │ └── component_update │ │ │ ├── MainActivity.kt │ │ │ ├── UpdateApplication.kt │ │ │ ├── UpdateService.kt │ │ │ ├── data │ │ │ └── entity │ │ │ │ └── Update.kt │ │ │ └── ui │ │ │ ├── UpdateActivity.kt │ │ │ └── UpdateServiceImpl.kt │ ├── release │ │ └── AndroidManifest.xml │ └── res │ │ ├── drawable │ │ └── update_dialog_background.xml │ │ ├── layout │ │ ├── update_activity_main.xml │ │ └── update_fragment.xml │ │ └── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── link │ └── component_update │ └── ExampleUnitTest.kt ├── component_user ├── .gitignore ├── build.gradle ├── gradle.properties └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── link │ │ └── component_user │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── debug │ │ └── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── link │ │ │ └── component_user │ │ │ ├── MainActivity.kt │ │ │ ├── UserApplication.kt │ │ │ ├── UserService.kt │ │ │ ├── data │ │ │ ├── Injection.kt │ │ │ ├── UserRepository.kt │ │ │ ├── entity │ │ │ │ ├── Collection.kt │ │ │ │ ├── FootPrint.kt │ │ │ │ └── StepsBean.java │ │ │ └── source │ │ │ │ ├── http │ │ │ │ ├── HttpDataSourceImpl.kt │ │ │ │ ├── HttpService.kt │ │ │ │ └── IHttpDataSource.kt │ │ │ │ └── local │ │ │ │ ├── ILocalDataSource.kt │ │ │ │ └── LocalDataSourceImpl.kt │ │ │ └── ui │ │ │ ├── ViewModelFactory.kt │ │ │ ├── about │ │ │ └── AboutFragment.kt │ │ │ ├── collection │ │ │ ├── CollectionAdapter.kt │ │ │ ├── CollectionFragment.kt │ │ │ └── CollectionViewModel.kt │ │ │ ├── footprint │ │ │ ├── FootPrintAdapter.kt │ │ │ ├── FootPrintFragment.kt │ │ │ └── FootPrintViewModel.kt │ │ │ ├── personal │ │ │ ├── PersonalInfoFragment.kt │ │ │ └── PersonalInfoViewModel.kt │ │ │ └── user │ │ │ ├── UserFragment.kt │ │ │ └── UserViewModel.kt │ ├── release │ │ └── AndroidManifest.xml │ └── res │ │ ├── drawable │ │ ├── user_header_bar.xml │ │ ├── user_ic_about.xml │ │ ├── user_ic_attention.xml │ │ ├── user_ic_car.xml │ │ ├── user_ic_collection.xml │ │ ├── user_ic_footprint.xml │ │ ├── user_ic_goods.xml │ │ ├── user_ic_help.xml │ │ ├── user_ic_note.xml │ │ ├── user_ic_order.xml │ │ ├── user_ic_recommend.xml │ │ ├── user_ic_score.xml │ │ ├── user_ic_suggest.xml │ │ ├── user_ic_telphone.xml │ │ ├── user_ic_update.xml │ │ └── user_ic_wallet.xml │ │ ├── layout │ │ ├── user_fragment_about.xml │ │ ├── user_fragment_collection.xml │ │ ├── user_fragment_foot_print.xml │ │ ├── user_fragment_personal_info.xml │ │ ├── user_fragment_user.xml │ │ ├── user_include_user_body.xml │ │ ├── user_include_user_header.xml │ │ ├── user_item_collection.xml │ │ ├── user_item_foot_print.xml │ │ └── user_navigation_container.xml │ │ ├── navigation │ │ └── user_graph.xml │ │ ├── values-v21 │ │ └── styles.xml │ │ └── values │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── link │ └── component_user │ └── ExampleUnitTest.kt ├── dex_files.txt ├── general_daemon ├── .gitignore ├── build.gradle ├── gradle.properties ├── proguard-rules.pro ├── readme.md └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── link │ │ └── general_daemon │ │ └── ExampleInstrumentedTest.java │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── link │ │ └── general_daemon │ │ ├── AbsWorkService.kt │ │ ├── DaemonEnv.kt │ │ ├── IntentWrapper.kt │ │ ├── JobSchedulerService.kt │ │ ├── WakeUpReceiver.kt │ │ └── WatchDogService.kt │ └── res │ └── values │ └── strings.xml ├── general_network ├── .gitignore ├── build.gradle ├── gradle.properties └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── link │ │ └── general_network │ │ └── ExampleInstrumentedTest.java │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── link │ │ └── general_network │ │ ├── interceptor │ │ ├── BaseInterceptor.kt │ │ ├── CacheInterceptor.kt │ │ └── logging │ │ │ ├── I.java │ │ │ ├── Level.java │ │ │ ├── Logger.java │ │ │ ├── LoggingInterceptor.java │ │ │ └── Printer.java │ │ └── utils │ │ ├── HttpsUtils.java │ │ └── NetworkUtil.java │ └── res │ └── values │ └── strings.xml ├── general_picture ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── gradle.properties ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── link │ │ └── general_picture │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── link │ │ │ └── general_picture │ │ │ ├── ILoaderStrategy.java │ │ │ ├── ImageLoadBuilder.java │ │ │ ├── ImageLoader.java │ │ │ └── glide │ │ │ ├── CustomGlideModule.java │ │ │ └── GlideStrategy.java │ └── res │ │ └── values │ │ └── strings.xml │ └── test │ └── java │ └── com │ └── link │ └── general_picture │ └── ExampleUnitTest.java ├── general_statelayout ├── .gitignore ├── build.gradle ├── gradle.properties └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── link │ │ └── general_statelayout │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── link │ │ │ └── general_statelayout │ │ │ ├── AbsViewStubLayout.kt │ │ │ ├── ILayoutState.kt │ │ │ ├── StateFrameLayout.kt │ │ │ ├── StateLayoutManager.kt │ │ │ ├── StateViewLayout.kt │ │ │ └── listener │ │ │ ├── OnNetworkListener.kt │ │ │ ├── OnRetryListener.kt │ │ │ └── OnShowOrHideListener.kt │ └── res │ │ └── values │ │ └── strings.xml │ └── test │ └── java │ └── com │ └── link │ └── general_statelayout │ └── ExampleUnitTest.java ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── libraryarchitecture ├── .gitignore ├── build.gradle └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── link │ │ └── librarymodule │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── link │ │ │ └── librarymodule │ │ │ ├── BaseApplication.kt │ │ │ ├── IBaseApplication.kt │ │ │ ├── base │ │ │ ├── BaseActivity.kt │ │ │ ├── BaseFragment.kt │ │ │ ├── BaseStateActivity.kt │ │ │ ├── BaseStateFragment.kt │ │ │ ├── ContainerActivity.kt │ │ │ ├── adapter │ │ │ │ └── FixPagerAdapter.java │ │ │ └── mvvm │ │ │ │ ├── livedata │ │ │ │ └── SingleLiveEvent.java │ │ │ │ ├── model │ │ │ │ └── BaseRepository.kt │ │ │ │ ├── view │ │ │ │ ├── BaseMvvmActivity.kt │ │ │ │ ├── BaseMvvmFragment.kt │ │ │ │ └── IBaseView.kt │ │ │ │ └── viewmodel │ │ │ │ ├── BaseViewModel.java │ │ │ │ └── IBaseViewModel.kt │ │ │ ├── constant │ │ │ └── Constant.kt │ │ │ ├── http │ │ │ ├── RetrofitClient.java │ │ │ └── UrlInterceptor.java │ │ │ ├── launchstarter │ │ │ ├── DelayInitDispatcher.java │ │ │ ├── TaskDispatcher.java │ │ │ ├── sort │ │ │ │ ├── Graph.java │ │ │ │ └── TaskSortUtil.java │ │ │ ├── stat │ │ │ │ ├── TaskStat.java │ │ │ │ └── TaskStatBean.java │ │ │ ├── task │ │ │ │ ├── DispatchRunnable.java │ │ │ │ ├── ITask.java │ │ │ │ ├── MainTask.java │ │ │ │ ├── Task.java │ │ │ │ └── TaskCallBack.java │ │ │ └── utils │ │ │ │ ├── DispatcherExecutor.java │ │ │ │ └── DispatcherLog.java │ │ │ ├── receiver │ │ │ └── NetworkConnectChangedReceiver.java │ │ │ ├── utils │ │ │ ├── AppManager.kt │ │ │ ├── BitmapUtils.kt │ │ │ ├── CommonUtil.java │ │ │ ├── Dimensions.kt │ │ │ ├── GlideLoadEngine.java │ │ │ ├── RxCountDown.java │ │ │ ├── SimpleTextWatcher.kt │ │ │ ├── ToastUtils.java │ │ │ ├── Utils.kt │ │ │ ├── executors │ │ │ │ └── AppExecutors.java │ │ │ └── rxpermissions2 │ │ │ │ ├── Permission.java │ │ │ │ ├── RxPermissions.java │ │ │ │ └── RxPermissionsFragment.java │ │ │ └── widgets │ │ │ ├── HorizontalBar.kt │ │ │ ├── NewsFlipperView.kt │ │ │ ├── likes │ │ │ └── LikesView.java │ │ │ ├── navgation │ │ │ ├── BottomNavigationBar.kt │ │ │ ├── CircleView.kt │ │ │ ├── CircleView2.kt │ │ │ └── CustomRadioButton.kt │ │ │ ├── recyclerview │ │ │ ├── DividerItemDecoration.java │ │ │ └── ItemDecoration.kt │ │ │ └── tabs │ │ │ ├── AnimationUtils.java │ │ │ ├── TabItem.java │ │ │ ├── TabLayout.java │ │ │ ├── ThemeUtils.java │ │ │ └── WarpTabLayout.java │ └── res │ │ ├── anim │ │ ├── news_bottom_in.xml │ │ ├── news_bottom_out.xml │ │ ├── slide_left_in.xml │ │ ├── slide_left_out.xml │ │ ├── slide_right_in.xml │ │ └── slide_right_out.xml │ │ ├── drawable │ │ ├── ic_arrow_back_black.xml │ │ ├── ic_arrow_back_white.xml │ │ ├── ic_arrow_right_white.xml │ │ ├── ic_classification.xml │ │ ├── ic_classification_press.xml │ │ ├── ic_cross.xml │ │ ├── ic_eye_close.xml │ │ ├── ic_eye_open.xml │ │ ├── ic_find.xml │ │ ├── ic_find_press.xml │ │ ├── ic_home.xml │ │ ├── ic_home_press.xml │ │ ├── ic_lock.xml │ │ ├── ic_login_out.xml │ │ ├── ic_message_white.xml │ │ ├── ic_mine.xml │ │ ├── ic_mine_press.xml │ │ ├── ic_msg.xml │ │ ├── ic_network_error.xml │ │ ├── ic_people.xml │ │ ├── ic_scan.xml │ │ ├── ic_search.xml │ │ ├── ic_settings_white.xml │ │ ├── ic_shopping_cart.xml │ │ ├── ic_shopping_cart_press.xml │ │ ├── ic_svg_no_data.xml │ │ ├── ic_we_chart.xml │ │ ├── selector_classification_bg.xml │ │ ├── selector_find_bg.xml │ │ ├── selector_home_bg.xml │ │ ├── selector_mine_bg.xml │ │ ├── selector_shopping_cart_bg.xml │ │ ├── shape_circle_white.xml │ │ ├── shape_stroke_corner_10dp_orange_full.xml │ │ ├── shape_stroke_corner_10dp_white_full.xml │ │ ├── shape_stroke_corner_15dp_white.xml │ │ ├── shape_stroke_corner_25dp_green_full.xml │ │ ├── shape_stroke_corner_25dp_grey.xml │ │ ├── shape_stroke_corner_25dp_grey_dark_full.xml │ │ ├── shape_stroke_corner_25dp_grey_full.xml │ │ ├── shape_stroke_corner_25dp_main_full.xml │ │ ├── shape_stroke_corner_25dp_white_full.xml │ │ ├── shape_stroke_corner_5dp_grey.xml │ │ ├── shape_stroke_corner_5dp_grey_dark_full.xml │ │ ├── shape_stroke_corner_5dp_grey_full.xml │ │ ├── shape_stroke_corner_5dp_main_full.xml │ │ └── shape_stroke_half_right_corner_15dp_white.xml │ │ ├── layout │ │ ├── activity_container.xml │ │ ├── common_recycleview.xml │ │ ├── common_recycleview_refresh.xml │ │ ├── include_search.xml │ │ ├── include_toolbar.xml │ │ ├── include_toolbar_search.xml │ │ ├── layout_bottom_navigation_bar.xml │ │ ├── layout_empty.xml │ │ ├── layout_error.xml │ │ ├── layout_loading.xml │ │ ├── layout_network_error.xml │ │ ├── layout_news_flipper.xml │ │ └── layout_state_base.xml │ │ ├── mipmap-xhdpi │ │ └── logo.png │ │ ├── mipmap-xxhdpi │ │ ├── icon_news.png │ │ └── logo.png │ │ ├── mipmap-xxxhdpi │ │ └── logo.png │ │ ├── raw │ │ └── people.svg │ │ ├── values-v23 │ │ └── styles.xml │ │ ├── values │ │ ├── attrs.xml │ │ ├── colors.xml │ │ ├── dismens.xml │ │ ├── strings.xml │ │ ├── styles.xml │ │ └── styles_base.xml │ │ └── xml │ │ └── provider_paths.xml │ └── test │ └── java │ └── com │ └── link │ └── librarymodule │ └── ExampleUnitTest.java ├── librarybase ├── .gitignore ├── build.gradle ├── libs │ └── dom4j-2.1.1.jar └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── link │ │ └── librarybase │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ └── res │ │ └── values │ │ └── strings.xml │ └── test │ └── java │ └── com │ └── link │ └── librarybase │ └── ExampleUnitTest.java ├── librarycomponent ├── .gitignore ├── build.gradle └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── link │ │ └── librarycomponent │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── link │ │ │ └── librarycomponent │ │ │ ├── AppConfig.kt │ │ │ ├── FanApplication.kt │ │ │ ├── ServiceFactory.kt │ │ │ ├── entity │ │ │ ├── base │ │ │ │ └── BaseEntity.kt │ │ │ └── user │ │ │ │ └── UserEntity.kt │ │ │ ├── router │ │ │ ├── RouterConstant.kt │ │ │ ├── SchemaFilterActivity.kt │ │ │ └── StartRouter.kt │ │ │ ├── service │ │ │ ├── login │ │ │ │ ├── EmptyLoginService.kt │ │ │ │ └── ILoginService.kt │ │ │ ├── main │ │ │ │ ├── EmptyMainService.kt │ │ │ │ └── IMainService.kt │ │ │ ├── shopping │ │ │ │ └── IShoppingService.kt │ │ │ ├── update │ │ │ │ └── IUpdateService.kt │ │ │ └── user │ │ │ │ ├── EmptyUserService.kt │ │ │ │ └── IUserService.kt │ │ │ └── widgets │ │ │ └── webview │ │ │ ├── X5WebView.kt │ │ │ └── sonic │ │ │ ├── SonicRuntimeImpl.java │ │ │ └── SonicSessionClientImpl.java │ └── res │ │ └── values │ │ └── strings.xml │ └── test │ └── java │ └── com │ └── link │ └── librarycomponent │ └── ExampleUnitTest.java ├── maven_push.gradle ├── settings.gradle ├── versions.gradle ├── view_common ├── .gitignore ├── build.gradle ├── gradle.properties └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── link │ │ └── view_common │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── link │ │ │ └── view_common │ │ │ ├── like │ │ │ ├── LikeView.kt │ │ │ └── LikeViewAnimation.kt │ │ │ └── loading │ │ │ └── RotateLoading.java │ └── res │ │ └── values │ │ ├── attrs.xml │ │ └── strings.xml │ └── test │ └── java │ └── com │ └── link │ └── view_common │ └── ExampleUnitTest.java └── view_flip ├── .gitignore ├── build.gradle ├── gradle.properties └── src ├── androidTest └── java │ └── com │ └── link │ └── libraryflipview │ └── ExampleInstrumentedTest.java ├── main ├── AndroidManifest.xml ├── java │ └── com │ │ └── link │ │ └── view_flip │ │ ├── flip │ │ ├── Card.java │ │ ├── FlipCards.java │ │ ├── FlipRenderer.java │ │ ├── FlipViewController.java │ │ ├── Texture.java │ │ └── ViewDualCards.java │ │ └── utils │ │ ├── AphidLog.java │ │ ├── TextureUtils.java │ │ └── UI.java └── res │ └── values │ ├── attrs.xml │ └── strings.xml └── test └── java └── com └── link └── libraryflipview └── ExampleUnitTest.java /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /.idea 12 | /build 13 | /captures 14 | .externalNativeBuild 15 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/channel: -------------------------------------------------------------------------------- 1 | #这里只生成小米、三星、线下的渠道 2 | xiaomi # 小米 3 | samsungapps #三星 4 | offline #线下(推广时诱导用户安装的渠道包,便于后台统计线下推广的效率) 5 | 6 | #meituan # 美团 7 | #hiapk 8 | #anzhi 9 | #91com 10 | #gfan 11 | #appchina 12 | #nduoa 13 | #3gcn 14 | #mumayi 15 | #10086com 16 | #wostore 17 | #189store 18 | #lenovomm 19 | #hicloud 20 | #meizu 21 | #wandou 22 | #Google Play 23 | #googleplay 24 | #baidu # 百度 25 | #360cn #360 26 | # 应用宝 myapp -------------------------------------------------------------------------------- /app/channel_debug: -------------------------------------------------------------------------------- 1 | #这里只生成小米、三星、线下的渠道 2 | xiaomi # 小米 3 | samsungapps #三星 4 | offline #线下(推广时诱导用户安装的渠道包,便于后台统计线下推广的效率) 5 | 6 | #meituan # 美团 7 | #hiapk 8 | #anzhi 9 | #91com 10 | #gfan 11 | #appchina 12 | #nduoa 13 | #3gcn 14 | #mumayi 15 | #10086com 16 | #wostore 17 | #189store 18 | #lenovomm 19 | #hicloud 20 | #meizu 21 | #wandou 22 | #Google Play 23 | #googleplay 24 | #baidu # 百度 25 | #360cn #360 26 | # 应用宝 myapp -------------------------------------------------------------------------------- /app/release/app-release.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linxu-link/Fan/a974a11bfed99ad8bfa1019737e05ba0473f4e22/app/release/app-release.apk -------------------------------------------------------------------------------- /app/release/output.json: -------------------------------------------------------------------------------- 1 | [{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":20190819,"versionName":"1.0.4","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}] -------------------------------------------------------------------------------- /app/src/androidTest/java/com/link/petshop/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.link.fan 2 | 3 | import android.support.test.InstrumentationRegistry 4 | import android.support.test.runner.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getTargetContext() 22 | assertEquals("com.link.fan", appContext.packageName) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/java/com/link/fan/tasks/ARouterTask.kt: -------------------------------------------------------------------------------- 1 | package com.link.fan.tasks 2 | 3 | import android.app.Application 4 | import com.alibaba.android.arouter.launcher.ARouter 5 | import com.link.librarymodule.BuildConfig 6 | import com.link.librarymodule.launchstarter.task.Task 7 | /** 8 | * @author WJ 9 | * @date 2019-08-15 10 | * 11 | * 描述:初始化ARouter 12 | */ 13 | class ARouterTask : Task() { 14 | override fun run() { 15 | if (BuildConfig.DEBUG) { // 这两行必须写在init之前,否则这些配置在init过程中将无效 16 | ARouter.openLog(); // 打印日志 17 | ARouter.openDebug(); // 开启调试模式(如果在InstantRun模式下运行,必须开启调试模式!线上版本需要关闭,否则有安全风险) 18 | } 19 | ARouter.init(mContext.applicationContext as Application); // 尽可能早,推荐在Application中初始化 20 | } 21 | 22 | override fun needWait(): Boolean { 23 | return true 24 | } 25 | } -------------------------------------------------------------------------------- /app/src/main/java/com/link/fan/tasks/BmobTask.kt: -------------------------------------------------------------------------------- 1 | package com.link.fan.tasks 2 | 3 | import cn.bmob.v3.Bmob 4 | import com.link.librarymodule.constant.Constant 5 | import com.link.librarymodule.launchstarter.task.Task 6 | /** 7 | * @author WJ 8 | * @date 2019-08-15 9 | * 10 | * 描述:bmob初始化Task 11 | */ 12 | class BmobTask : Task() { 13 | override fun run() { 14 | //初始化Bmob后台服务器的SDK 15 | Bmob.initialize(mContext, Constant.BMOB_ID) 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/java/com/link/fan/tasks/BuglyTask.kt: -------------------------------------------------------------------------------- 1 | package com.link.fan.tasks 2 | 3 | import com.link.librarymodule.BuildConfig 4 | import com.link.librarymodule.constant.Constant 5 | import com.link.librarymodule.launchstarter.task.Task 6 | import com.tencent.bugly.crashreport.CrashReport 7 | /** 8 | * @author WJ 9 | * @date 2019-08-15 10 | * 11 | * 描述:初始化bugly的task 12 | */ 13 | class BuglyTask: Task() { 14 | override fun run() { 15 | CrashReport.initCrashReport(mContext, Constant.BUGLY_ID, BuildConfig.DEBUG); 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/java/com/link/fan/tasks/DaemonTask.kt: -------------------------------------------------------------------------------- 1 | package com.link.fan.tasks 2 | 3 | import android.app.Application 4 | import com.link.fan.service.ShoppingService 5 | import com.link.general_daemon.DEFAULT_WAKE_UP_INTERVAL 6 | import com.link.general_daemon.DaemonEnv 7 | import com.link.librarymodule.launchstarter.task.Task 8 | 9 | class DaemonTask : Task() { 10 | 11 | override fun run() { 12 | DaemonEnv.init(mContext.applicationContext as Application, ShoppingService::class.java, DEFAULT_WAKE_UP_INTERVAL) 13 | ShoppingService.sShouldStopService = false 14 | DaemonEnv.startServiceMayBind(ShoppingService::class.java) 15 | } 16 | 17 | } -------------------------------------------------------------------------------- /app/src/main/java/com/link/fan/tasks/H5Task.kt: -------------------------------------------------------------------------------- 1 | package com.link.fan.tasks 2 | 3 | import com.link.librarycomponent.widgets.webview.sonic.SonicRuntimeImpl 4 | import com.link.librarymodule.launchstarter.task.Task 5 | import com.link.librarymodule.utils.Utils 6 | import com.tencent.smtt.sdk.QbSdk 7 | import com.tencent.sonic.sdk.SonicConfig 8 | import com.tencent.sonic.sdk.SonicEngine 9 | 10 | /** 11 | * @author WJ 12 | * @date 2019-08-15 13 | * 14 | * 描述:初始化腾讯x5内核的webview,和vasSonic,Webview加速器 的task 15 | */ 16 | class H5Task : Task() { 17 | 18 | override fun run() { 19 | //搜集本地tbs内核信息并上报服务器,服务器返回结果决定使用哪个内核。 20 | val cb = object : QbSdk.PreInitCallback { 21 | override fun onViewInitFinished(arg0: Boolean) { 22 | //x5內核初始化完成的回调,为true表示x5内核加载成功,否则表示x5内核加载失败,会自动切换到系统内核。 23 | 24 | } 25 | 26 | override fun onCoreInitFinished() { 27 | 28 | } 29 | } 30 | //x5内核初始化接口 31 | QbSdk.initX5Environment(mContext, cb) 32 | 33 | } 34 | 35 | override fun onlyInMainProcess(): Boolean { 36 | return false 37 | } 38 | } -------------------------------------------------------------------------------- /app/src/main/java/com/link/fan/tasks/HotfixTask.kt: -------------------------------------------------------------------------------- 1 | package com.link.fan.tasks 2 | 3 | import com.link.fan.tinker.TinkerService 4 | import com.link.librarymodule.launchstarter.task.Task 5 | import com.link.librarymodule.utils.Utils 6 | 7 | /** 8 | * @author WJ 9 | * @date 2019-08-16 10 | * 11 | * 描述:用于启动热修复的task 12 | */ 13 | class HotfixTask: Task() { 14 | 15 | override fun run() { 16 | //启动热修复service 17 | TinkerService.runTinkerService(mContext) 18 | } 19 | 20 | 21 | } -------------------------------------------------------------------------------- /app/src/main/java/com/link/fan/tasks/MMKVTask.kt: -------------------------------------------------------------------------------- 1 | package com.link.fan.tasks 2 | 3 | import com.link.librarymodule.launchstarter.task.Task 4 | import com.tencent.mmkv.MMKV 5 | /** 6 | * @author WJ 7 | * @date 2019-08-15 8 | * 9 | * 描述:mmkv的初始化 10 | */ 11 | class MMKVTask : Task() { 12 | override fun run() { 13 | //初始化MMKV(一种腾讯出品的sp替代工具) 14 | MMKV.initialize(mContext) 15 | } 16 | } -------------------------------------------------------------------------------- /app/src/main/java/com/link/fan/tasks/ReceiverTask.kt: -------------------------------------------------------------------------------- 1 | package com.link.fan.tasks 2 | 3 | import com.link.fan.receiver.FanReceiver 4 | import com.link.librarymodule.launchstarter.task.Task 5 | 6 | /** 7 | * @author WJ 8 | * @date 2019-08-16 9 | * 10 | * 描述:用于启动shopping进程的task 11 | */ 12 | class ReceiverTask:Task() { 13 | 14 | override fun run() { 15 | 16 | val receiver=FanReceiver(mContext) 17 | 18 | } 19 | 20 | 21 | } -------------------------------------------------------------------------------- /app/src/main/java/com/link/fan/tasks/UpdateTask.kt: -------------------------------------------------------------------------------- 1 | package com.link.fan.tasks 2 | 3 | import com.alibaba.android.arouter.launcher.ARouter 4 | import com.link.librarycomponent.router.RouterConstant 5 | import com.link.librarycomponent.service.update.IUpdateService 6 | import com.link.librarymodule.launchstarter.task.Task 7 | /** 8 | * @author WJ 9 | * @date 2019-08-16 10 | * 11 | * 描述:启动更新的task 12 | */ 13 | class UpdateTask:Task() { 14 | override fun run() { 15 | //启动更新service 16 | val updateService = ARouter.getInstance().build(RouterConstant.UPDATE_SERVICE).navigation()!! as IUpdateService 17 | updateService.startUpdateService() 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/java/com/link/fan/tasks/UtilTask.kt: -------------------------------------------------------------------------------- 1 | package com.link.fan.tasks 2 | 3 | import com.link.librarymodule.launchstarter.task.Task 4 | import com.link.librarymodule.utils.Utils 5 | 6 | class UtilTask : Task() { 7 | 8 | override fun run() { 9 | Utils.init(mContext) 10 | } 11 | 12 | override fun needWait(): Boolean { 13 | return true 14 | } 15 | 16 | override fun onlyInMainProcess(): Boolean { 17 | return false 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/java/com/link/fan/tinker/entity/Hotfix.kt: -------------------------------------------------------------------------------- 1 | package com.link.fan.tinker.entity 2 | 3 | import cn.bmob.v3.BmobObject 4 | import cn.bmob.v3.datatype.BmobFile 5 | 6 | data class Hotfix(var versionName: String, 7 | var patchCode: String, 8 | var patchMD5: String, 9 | var patch: BmobFile) : BmobObject() { 10 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | 19 | 20 | -------------------------------------------------------------------------------- /app/src/main/res/layout/navigation_container.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/splash.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linxu-link/Fan/a974a11bfed99ad8bfa1019737e05ba0473f4e22/app/src/main/res/mipmap-xxxhdpi/splash.jpeg -------------------------------------------------------------------------------- /app/src/main/res/navigation/app_graph.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 9 | 16 | 17 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Hello blank fragment 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/xml/network_security_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/test/java/com/link/petshop/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.link.fan 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/混淆.md: -------------------------------------------------------------------------------- 1 | https://mp.weixin.qq.com/s?__biz=MzAxMTI4MTkwNQ==&mid=2650828460&idx=1&sn=c2cde2e5a83f97d2ce2f206932d5ff0a&chksm=80b7ba32b7c0332404925ea8e88481c5457d8dac26e2f1add16755236d988aa8b51b608afe48&mpshare=1&scene=23&srcid=0820OTGmQhXlvCi0MlNubKXo&sharer_sharetime=1566266338539&sharer_shareid=6bf65a467798854350f898ca35062b0e%23rd -------------------------------------------------------------------------------- /component_login/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /component_login/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536m 2 | 3 | RELEASE_URL=http://119.3.215.243:9882/repository/fan-releases/ 4 | SNAPSHOT_URL=http://119.3.215.243:9882/repository/fan-snapshot/ 5 | NAME=public 6 | PASSWORD=123456@qq.com 7 | VERSION=1.0.0 8 | POM_ARTIFACT_ID=login 9 | GROUP=com.link -------------------------------------------------------------------------------- /component_login/src/androidTest/java/com/link/component_login/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_login 2 | 3 | import androidx.test.InstrumentationRegistry 4 | import androidx.test.runner.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getTargetContext() 22 | assertEquals("com.link.component_login", appContext.packageName) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /component_login/src/main/java/com/link/component_login/LoginApplication.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_login 2 | 3 | import android.app.Application 4 | import com.link.librarycomponent.FanApplication 5 | import com.link.librarycomponent.ServiceFactory 6 | import com.link.librarymodule.BaseApplication 7 | 8 | class LoginApplication : FanApplication() { 9 | 10 | override fun onCreate() { 11 | super.onCreate() 12 | initModuleApp(this) 13 | initModuleData(this) 14 | } 15 | 16 | override fun initModuleApp(application: Application) { 17 | 18 | } 19 | 20 | override fun initModuleData(application: Application) { 21 | ServiceFactory.getInstance().loginService = LoginService() 22 | } 23 | 24 | 25 | } -------------------------------------------------------------------------------- /component_login/src/main/java/com/link/component_login/LoginService.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_login 2 | 3 | import cn.bmob.v3.BmobUser 4 | import com.link.librarycomponent.service.login.ILoginService 5 | 6 | class LoginService : ILoginService { 7 | 8 | init { 9 | } 10 | 11 | //判断用户是否已经登录,将这段代码写在login组件中 12 | override fun isLogin(): Boolean { 13 | return BmobUser.isLogin() 14 | } 15 | 16 | 17 | } -------------------------------------------------------------------------------- /component_login/src/main/java/com/link/component_login/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_login 2 | 3 | import android.os.Bundle 4 | import androidx.navigation.findNavController 5 | import com.alibaba.android.arouter.facade.annotation.Route 6 | import com.link.librarycomponent.router.RouterConstant 7 | import com.link.librarymodule.base.BaseActivity 8 | 9 | @Route(path = RouterConstant.LOGIN) 10 | class MainActivity : BaseActivity() { 11 | 12 | override fun onCreate(savedInstanceState: Bundle?) { 13 | super.onCreate(savedInstanceState) 14 | setContentView(R.layout.login_navigation_container) 15 | } 16 | 17 | override fun onSupportNavigateUp(): Boolean { 18 | return findNavController(R.id.container).navigateUp() 19 | } 20 | 21 | 22 | } 23 | -------------------------------------------------------------------------------- /component_login/src/main/java/com/link/component_login/data/Injection.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_login.data 2 | 3 | import com.link.component_login.data.source.http.HttpDataSourceImpl 4 | import com.link.component_login.data.source.http.HttpService 5 | import com.link.component_login.data.source.loacl.LocalDataSourceImpl 6 | import com.link.librarymodule.http.RetrofitClient 7 | 8 | class Injection { 9 | 10 | companion object { 11 | 12 | fun provideRepository(): LoginRepository { 13 | 14 | val service: HttpService = RetrofitClient.getInstance().create(HttpService::class.java) 15 | //网络数据源 16 | val httpService = HttpDataSourceImpl.getInstance(service) 17 | //本地数据源 18 | val localService = LocalDataSourceImpl() 19 | 20 | return LoginRepository.getInstance(httpService, localService) 21 | } 22 | 23 | } 24 | } -------------------------------------------------------------------------------- /component_login/src/main/java/com/link/component_login/data/source/http/HttpDataSourceImpl.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_login.data.source.http 2 | 3 | class HttpDataSourceImpl constructor(private val service: HttpService) : IHttpDataSource { 4 | 5 | 6 | companion object { 7 | @Volatile 8 | private var instance: HttpDataSourceImpl? = null 9 | 10 | fun getInstance(service: HttpService) = 11 | instance ?: synchronized(this) { 12 | instance ?: HttpDataSourceImpl(service).also { 13 | instance = it 14 | } 15 | } 16 | } 17 | 18 | } -------------------------------------------------------------------------------- /component_login/src/main/java/com/link/component_login/data/source/http/HttpService.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_login.data.source.http 2 | 3 | interface HttpService { 4 | } -------------------------------------------------------------------------------- /component_login/src/main/java/com/link/component_login/data/source/http/IHttpDataSource.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_login.data.source.http 2 | 3 | interface IHttpDataSource { 4 | 5 | // fun login(phone:String,password:String) 6 | 7 | } -------------------------------------------------------------------------------- /component_login/src/main/java/com/link/component_login/data/source/loacl/ILocalDataSource.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_login.data.source.loacl 2 | 3 | import com.link.librarycomponent.entity.user.UserEntity 4 | 5 | interface ILocalDataSource { 6 | 7 | /** 8 | * 保存用户信息 9 | */ 10 | fun saveUserInfo(phone: String, password: String) 11 | 12 | /** 13 | * 获取用户信息 14 | */ 15 | fun getUserInfo(): UserEntity 16 | 17 | } -------------------------------------------------------------------------------- /component_login/src/main/java/com/link/component_login/data/source/loacl/LocalDataSourceImpl.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_login.data.source.loacl 2 | 3 | import com.link.librarycomponent.entity.user.UserEntity 4 | import com.tencent.mmkv.MMKV 5 | 6 | class LocalDataSourceImpl : ILocalDataSource { 7 | override fun saveUserInfo(phone: String, password: String) { 8 | MMKV.defaultMMKV().encode("phone", phone) 9 | MMKV.defaultMMKV().encode("password", password) 10 | } 11 | 12 | override fun getUserInfo(): UserEntity { 13 | val userEntity = UserEntity() 14 | userEntity.mobilePhoneNumber = MMKV.defaultMMKV().getString("phone", null) 15 | userEntity.pwd = MMKV.defaultMMKV().getString("password", null) 16 | return userEntity 17 | } 18 | } -------------------------------------------------------------------------------- /component_login/src/main/release/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 11 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /component_login/src/main/res/drawable/login_checkbox_eye.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /component_login/src/main/res/layout/login_navigation_container.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 20 | 21 | -------------------------------------------------------------------------------- /component_login/src/main/res/mipmap-xhdpi/login_btn_login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linxu-link/Fan/a974a11bfed99ad8bfa1019737e05ba0473f4e22/component_login/src/main/res/mipmap-xhdpi/login_btn_login.png -------------------------------------------------------------------------------- /component_login/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /component_login/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Login 3 | 4 | 请输入密码 5 | 请输入手机号码 6 | 请输入验证码 7 | 8 | 登录账号 9 | 创建账号 10 | 重置密码 11 | 发送验证码 12 | 13 | 14 | -------------------------------------------------------------------------------- /component_login/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /component_login/src/main/res/xml/login_network_security_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /component_login/src/test/java/com/link/component_login/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_login 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /component_main/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /component_main/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536m 2 | 3 | RELEASE_URL=http://119.3.215.243:9882/repository/fan-releases/ 4 | SNAPSHOT_URL=http://119.3.215.243:9882/repository/fan-snapshot/ 5 | NAME=public 6 | PASSWORD=123456@qq.com 7 | VERSION=1.0.0 8 | POM_ARTIFACT_ID=main 9 | GROUP=com.link -------------------------------------------------------------------------------- /component_main/src/androidTest/java/com/link/component_main/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_main 2 | 3 | import androidx.test.InstrumentationRegistry 4 | import androidx.test.runner.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getTargetContext() 22 | assertEquals("com.link.component_main", appContext.packageName) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /component_main/src/main/java/com/link/component_main/EmptyViewModel.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_main 2 | 3 | import com.link.component_main.data.MainRepository 4 | import com.link.librarymodule.base.mvvm.viewmodel.BaseViewModel 5 | 6 | class EmptyViewModel(repository: MainRepository):BaseViewModel(repository) { 7 | 8 | } -------------------------------------------------------------------------------- /component_main/src/main/java/com/link/component_main/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_main 2 | 3 | import android.content.Intent 4 | import androidx.fragment.app.Fragment 5 | import com.link.component_main.ui.main.MainFragment 6 | import com.link.librarymodule.base.ContainerActivity 7 | 8 | class MainActivity : ContainerActivity() { 9 | 10 | override fun initFragmentFormIntent(intent: Intent): Fragment { 11 | return MainFragment.newInstance() 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /component_main/src/main/java/com/link/component_main/MainApplication.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_main 2 | 3 | import android.app.Application 4 | import com.link.librarycomponent.FanApplication 5 | import com.link.librarycomponent.ServiceFactory 6 | import com.link.librarymodule.BaseApplication 7 | 8 | class MainApplication : FanApplication() { 9 | 10 | override fun initModuleApp(application: Application) { 11 | ServiceFactory.getInstance().mainService = MainService() 12 | } 13 | 14 | override fun initModuleData(application: Application) { 15 | } 16 | } -------------------------------------------------------------------------------- /component_main/src/main/java/com/link/component_main/MainService.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_main 2 | 3 | import android.os.Bundle 4 | import androidx.fragment.app.Fragment 5 | import com.link.component_main.ui.find.FindFragment 6 | import com.link.component_main.ui.main.MainFragment 7 | import com.link.component_main.ui.catalog.CatalogFragment 8 | import com.link.librarycomponent.service.main.IMainService 9 | 10 | class MainService : IMainService { 11 | 12 | override fun newCatalogFragment(bundle: Bundle?): Fragment? { 13 | return CatalogFragment.newInstance() 14 | } 15 | 16 | override fun newFindFragment(bundle: Bundle?): Fragment? { 17 | return FindFragment.newInstance() 18 | } 19 | 20 | override fun newMainFragment(bundle: Bundle?): Fragment? { 21 | return MainFragment.newInstance() 22 | } 23 | } -------------------------------------------------------------------------------- /component_main/src/main/java/com/link/component_main/data/Injection.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_main.data 2 | 3 | import com.link.component_main.data.source.http.HttpDataSourceImpl 4 | import com.link.component_main.data.source.http.HttpService 5 | import com.link.component_main.data.source.local.LocalDataSourceImpl 6 | import com.link.librarymodule.http.RetrofitClient 7 | 8 | class Injection { 9 | 10 | companion object { 11 | 12 | fun provideRepository(): MainRepository { 13 | 14 | val service: HttpService = RetrofitClient.getInstance().create(HttpService::class.java) 15 | //网络数据源 16 | val httpService = HttpDataSourceImpl.getInstance(service) 17 | //本地数据源 18 | val localService = LocalDataSourceImpl() 19 | 20 | return MainRepository.getInstance(httpService, localService) 21 | } 22 | 23 | } 24 | } -------------------------------------------------------------------------------- /component_main/src/main/java/com/link/component_main/data/entity/CategoryDetail.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_main.data.entity 2 | 3 | data class CategoryDetail(val id:String, val name:String, val parentId:String) { 4 | } -------------------------------------------------------------------------------- /component_main/src/main/java/com/link/component_main/data/entity/CategoryResult.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_main.data.entity 2 | 3 | data class CategoryResult(var click: Boolean=false, val parentId: String, 4 | val name: String, val list: List) { 5 | } -------------------------------------------------------------------------------- /component_main/src/main/java/com/link/component_main/data/entity/MenuResult.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_main.data.entity 2 | 3 | data class MenuResult(val totalNum:String, val pn:String, val rn:String, val data:List) { 4 | } -------------------------------------------------------------------------------- /component_main/src/main/java/com/link/component_main/data/source/http/IHttpDataSource.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_main.data.source.http 2 | 3 | import com.link.component_main.data.entity.MenuResult 4 | import com.link.librarycomponent.entity.base.BaseEntity 5 | import io.reactivex.Observable 6 | 7 | interface IHttpDataSource { 8 | 9 | 10 | fun banner(): Observable> 11 | fun today(): Observable> 12 | fun more(): Observable> 13 | 14 | fun breakfast(): Observable> 15 | fun launch(): Observable> 16 | fun dinner(): Observable> 17 | fun motion(): Observable> 18 | 19 | fun find(): Observable> 20 | 21 | 22 | } -------------------------------------------------------------------------------- /component_main/src/main/java/com/link/component_main/data/source/local/ILocalDataSource.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_main.data.source.local 2 | 3 | import io.reactivex.Observable 4 | 5 | interface ILocalDataSource { 6 | 7 | fun getCatalogData():Observable 8 | 9 | fun getIngredientsData():Observable 10 | 11 | } -------------------------------------------------------------------------------- /component_main/src/main/java/com/link/component_main/ui/catalog/detail/RightCatalogAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_main.ui.catalog.detail 2 | 3 | import com.chad.library.adapter.base.BaseQuickAdapter 4 | import com.chad.library.adapter.base.BaseViewHolder 5 | import com.link.component_main.R 6 | import com.link.component_main.data.entity.CategoryDetail 7 | 8 | class RightCatalogAdapter(layoutResId: Int, data: MutableList?) : BaseQuickAdapter(layoutResId, data) { 9 | 10 | override fun convert(helper: BaseViewHolder, item: CategoryDetail) { 11 | helper.setText(R.id.tv_catalog_name, item.name) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /component_main/src/main/java/com/link/component_main/ui/main/recommend/adapter/RecommendAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_main.ui.main.recommend.adapter 2 | 3 | import com.chad.library.adapter.base.BaseQuickAdapter 4 | import com.chad.library.adapter.base.BaseViewHolder 5 | import com.link.component_main.R 6 | 7 | class RecommendAdapter(layoutResId: Int, data: MutableList?) : BaseQuickAdapter(layoutResId, data) { 8 | 9 | override fun convert(helper: BaseViewHolder, item: String?) { 10 | helper.setText(R.id.name, item) 11 | } 12 | 13 | 14 | } -------------------------------------------------------------------------------- /component_main/src/main/java/com/link/component_main/ui/main/recommend/adapter/RecommendHead2Adapter.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_main.ui.main.recommend.adapter 2 | 3 | import com.chad.library.adapter.base.BaseQuickAdapter 4 | import com.chad.library.adapter.base.BaseViewHolder 5 | import com.link.component_main.R 6 | 7 | class RecommendHead2Adapter(layoutResId: Int, data: MutableList?) : BaseQuickAdapter(layoutResId, data) { 8 | override fun convert(helper: BaseViewHolder, item: String?) { 9 | helper.setText(R.id.name, item) 10 | } 11 | } -------------------------------------------------------------------------------- /component_main/src/main/java/com/link/component_main/ui/main/recommend/adapter/RecommendHeadAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_main.ui.main.recommend.adapter 2 | 3 | import android.widget.ImageView 4 | import com.bumptech.glide.Glide 5 | import com.chad.library.adapter.base.BaseQuickAdapter 6 | import com.chad.library.adapter.base.BaseViewHolder 7 | import com.link.component_main.R 8 | import com.link.component_main.data.entity.MenuDetail 9 | import com.link.general_picture.ImageLoader 10 | import com.link.general_picture.glide.GlideStrategy 11 | 12 | class RecommendHeadAdapter(layoutResId: Int, data: MutableList?) : BaseQuickAdapter(layoutResId, data) { 13 | override fun convert(helper: BaseViewHolder, item: MenuDetail) { 14 | helper.setText(R.id.name,item.title) 15 | ImageLoader.getInstance().with(mContext).load(item.albums[0]) 16 | .build(GlideStrategy()) 17 | .into(helper.getView(R.id.img) as ImageView) 18 | 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /component_main/src/main/release/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /component_main/src/main/res/drawable/main_side_shopping_cart_bar.xml: -------------------------------------------------------------------------------- 1 | 3 | 9 | -------------------------------------------------------------------------------- /component_main/src/main/res/layout/main_fragment_recommend.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 16 | 17 | -------------------------------------------------------------------------------- /component_main/src/main/res/layout/main_item_catalog_right.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | -------------------------------------------------------------------------------- /component_main/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /component_main/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Main 3 | 4 | -------------------------------------------------------------------------------- /component_main/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /component_main/src/main/res/xml/main_network_security_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /component_main/src/test/java/com/link/component_main/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_main 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /component_menu/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /component_menu/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536m 2 | 3 | RELEASE_URL=http://119.3.215.243:9882/repository/fan-releases/ 4 | SNAPSHOT_URL=http://119.3.215.243:9882/repository/fan-snapshot/ 5 | NAME=public 6 | PASSWORD=123456@qq.com 7 | VERSION=1.0.0 8 | POM_ARTIFACT_ID=menu 9 | GROUP=com.link -------------------------------------------------------------------------------- /component_menu/src/androidTest/java/com/link/component_menu/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_menu 2 | 3 | import androidx.test.InstrumentationRegistry 4 | import androidx.test.runner.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getTargetContext() 22 | assertEquals("com.link.component_menu", appContext.packageName) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /component_menu/src/main/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 13 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /component_menu/src/main/java/com/link/component_menu/MenuApplication.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_menu 2 | 3 | import android.app.Application 4 | import com.link.librarycomponent.FanApplication 5 | import com.link.librarymodule.BaseApplication 6 | 7 | class MenuApplication : FanApplication() { 8 | 9 | override fun initModuleData(application: Application) { 10 | TODO("not implemented") //To change body of created functions use File | Settings | File Templates. 11 | } 12 | 13 | override fun initModuleApp(application: Application) { 14 | TODO("not implemented") //To change body of created functions use File | Settings | File Templates. 15 | } 16 | } -------------------------------------------------------------------------------- /component_menu/src/main/java/com/link/component_menu/data/Injection.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_menu.data 2 | 3 | import com.link.component_menu.data.source.http.HttpDataSourceImpl 4 | import com.link.component_menu.data.source.http.HttpService 5 | import com.link.component_menu.data.source.local.LocalDataSourceImpl 6 | import com.link.librarymodule.http.RetrofitClient 7 | 8 | class Injection { 9 | 10 | companion object { 11 | 12 | fun provideRepository(): MenuRepository { 13 | 14 | val service: HttpService = RetrofitClient.getInstance().create(HttpService::class.java) 15 | //网络数据源 16 | val httpService = HttpDataSourceImpl.getInstance(service) 17 | //本地数据源 18 | val localService = LocalDataSourceImpl() 19 | 20 | return MenuRepository.getInstance(httpService, localService) 21 | } 22 | 23 | } 24 | } -------------------------------------------------------------------------------- /component_menu/src/main/java/com/link/component_menu/data/entity/Collection.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_menu.data.entity 2 | 3 | import cn.bmob.v3.BmobObject 4 | import java.io.Serializable 5 | 6 | class Collection : BmobObject() { 7 | 8 | var userId: String? = null 9 | var id: String? = null 10 | var title: String? = null 11 | var tags: String? = null 12 | var imtro: String? = null 13 | var ingredients: String? = null 14 | var burden: String? = null 15 | var albums: List? = null 16 | var steps: List? = null 17 | } -------------------------------------------------------------------------------- /component_menu/src/main/java/com/link/component_menu/data/entity/FootPrint.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_menu.data.entity 2 | 3 | import cn.bmob.v3.BmobObject 4 | import java.io.Serializable 5 | 6 | class FootPrint : BmobObject() { 7 | 8 | var userId: String? = null 9 | var id: String? = null 10 | var title: String? = null 11 | var tags: String? = null 12 | var imtro: String? = null 13 | var ingredients: String? = null 14 | var burden: String? = null 15 | var albums: List? = null 16 | var steps: List? = null 17 | 18 | } -------------------------------------------------------------------------------- /component_menu/src/main/java/com/link/component_menu/data/entity/MenuResult.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_menu.data.entity 2 | 3 | data class MenuResult(val totalNum:String, val pn:String, val rn:String, val data:List) { 4 | } -------------------------------------------------------------------------------- /component_menu/src/main/java/com/link/component_menu/data/source/http/HttpDataSourceImpl.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_menu.data.source.http 2 | 3 | import com.link.component_menu.data.entity.MenuResult 4 | import com.link.librarycomponent.entity.base.BaseEntity 5 | import com.link.librarymodule.constant.Constant 6 | import io.reactivex.Observable 7 | 8 | 9 | /** 10 | * @author WJ 11 | * @date 2019-05-30 12 | * 13 | * 描述:网络数据源 14 | */ 15 | class HttpDataSourceImpl constructor(private val service: HttpService) : IHttpDataSource { 16 | 17 | 18 | companion object { 19 | @Volatile 20 | private var instance: HttpDataSourceImpl? = null 21 | 22 | fun getInstance(service: HttpService) = 23 | instance ?: synchronized(this) { 24 | instance ?: HttpDataSourceImpl(service).also { instance = it } 25 | } 26 | } 27 | 28 | 29 | override fun getRecommend(menu: String, pn: Int, rn: Int): Observable> { 30 | return service.query(Constant.JUHE_KEY, menu, pn, rn) 31 | } 32 | 33 | 34 | } -------------------------------------------------------------------------------- /component_menu/src/main/java/com/link/component_menu/data/source/http/HttpService.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_menu.data.source.http 2 | 3 | import com.link.component_menu.data.entity.MenuResult 4 | import com.link.librarycomponent.entity.base.BaseEntity 5 | import io.reactivex.Observable 6 | import retrofit2.http.Field 7 | import retrofit2.http.FormUrlEncoded 8 | import retrofit2.http.POST 9 | 10 | 11 | interface HttpService { 12 | 13 | /** 14 | * 菜谱大全 15 | * menu:菜谱的关键词 16 | */ 17 | @FormUrlEncoded 18 | @POST("cook/query.php") 19 | fun query( 20 | @Field("key") key: String, 21 | @Field("menu") menu: String, 22 | @Field("pn") pn: Int, 23 | @Field("rn") rn: Int 24 | ): Observable> 25 | 26 | 27 | } -------------------------------------------------------------------------------- /component_menu/src/main/java/com/link/component_menu/data/source/http/IHttpDataSource.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_menu.data.source.http 2 | 3 | import com.link.component_menu.data.entity.MenuResult 4 | import com.link.librarycomponent.entity.base.BaseEntity 5 | import io.reactivex.Observable 6 | 7 | interface IHttpDataSource { 8 | 9 | fun getRecommend(menu: String, pn: Int, rn: Int): Observable> 10 | 11 | } -------------------------------------------------------------------------------- /component_menu/src/main/java/com/link/component_menu/data/source/local/ILocalDataSource.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_menu.data.source.local 2 | 3 | import io.reactivex.Observable 4 | 5 | interface ILocalDataSource { 6 | 7 | 8 | } -------------------------------------------------------------------------------- /component_menu/src/main/java/com/link/component_menu/data/source/local/LocalDataSourceImpl.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_menu.data.source.local 2 | 3 | class LocalDataSourceImpl : ILocalDataSource { 4 | 5 | } -------------------------------------------------------------------------------- /component_menu/src/main/java/com/link/component_menu/ui/adapter/MenuAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_menu.ui.adapter 2 | 3 | import com.bumptech.glide.Glide 4 | import com.chad.library.adapter.base.BaseQuickAdapter 5 | import com.chad.library.adapter.base.BaseViewHolder 6 | import com.link.component_menu.R 7 | import com.link.component_menu.data.entity.StepsBean 8 | import com.link.general_picture.ImageLoader 9 | import com.link.general_picture.glide.GlideStrategy 10 | 11 | class MenuAdapter(layoutId: Int, data: List?) : BaseQuickAdapter(layoutId, data) { 12 | 13 | override fun convert(helper: BaseViewHolder, item: StepsBean?) { 14 | helper.setText(R.id.content, item!!.step) 15 | ImageLoader.getInstance().with(mContext).load(item.img).build(GlideStrategy()).into(helper.getView(R.id.img)) 16 | helper.setText(R.id.position, "步骤${helper.adapterPosition}") 17 | } 18 | 19 | } -------------------------------------------------------------------------------- /component_menu/src/main/java/com/link/component_menu/ui/adapter/MenuFooterAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_menu.ui.adapter 2 | 3 | import com.bumptech.glide.Glide 4 | import com.chad.library.adapter.base.BaseQuickAdapter 5 | import com.chad.library.adapter.base.BaseViewHolder 6 | import com.link.component_menu.R 7 | import com.link.component_menu.data.entity.MenuDetail 8 | import com.link.general_picture.ImageLoader 9 | import com.link.general_picture.glide.GlideStrategy 10 | 11 | class MenuFooterAdapter(layoutId:Int,data:List?):BaseQuickAdapter(layoutId,data) { 12 | 13 | override fun convert(helper: BaseViewHolder, item: MenuDetail?) { 14 | helper.setText(R.id.name,item!!.title) 15 | ImageLoader.getInstance().with(mContext).load(item.albums[0]).build(GlideStrategy()).into(helper.getView(R.id.img)) 16 | } 17 | } -------------------------------------------------------------------------------- /component_menu/src/main/java/com/link/component_menu/ui/adapter/MenuHeaderAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_menu.ui.adapter 2 | 3 | import com.chad.library.adapter.base.BaseQuickAdapter 4 | import com.chad.library.adapter.base.BaseViewHolder 5 | 6 | class MenuHeaderAdapter(layoutId:Int, list:List?): BaseQuickAdapter(layoutId,list) { 7 | 8 | override fun convert(helper: BaseViewHolder, item: String?) { 9 | helper.setText(android.R.id.text1,item) 10 | } 11 | 12 | } -------------------------------------------------------------------------------- /component_menu/src/main/release/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /component_menu/src/main/res/layout/menu_activity_navigation.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /component_menu/src/main/res/layout/menu_header_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | -------------------------------------------------------------------------------- /component_menu/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /component_menu/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | menu 3 | 4 | -------------------------------------------------------------------------------- /component_menu/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /component_menu/src/test/java/com/link/component_menu/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_menu 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /component_pay/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /component_pay/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536m 2 | 3 | RELEASE_URL=http://119.3.215.243:9882/repository/fan-releases/ 4 | SNAPSHOT_URL=http://119.3.215.243:9882/repository/fan-snapshot/ 5 | NAME=public 6 | PASSWORD=123456@qq.com 7 | VERSION=1.0.0 8 | POM_ARTIFACT_ID=pay 9 | GROUP=com.link -------------------------------------------------------------------------------- /component_pay/src/androidTest/java/com/link/component_pay/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_pay 2 | 3 | import androidx.test.InstrumentationRegistry 4 | import androidx.test.runner.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getTargetContext() 22 | assertEquals("com.link.component_pay", appContext.packageName) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /component_pay/src/main/java/com/link/component_pay/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_pay 2 | 3 | import androidx.appcompat.app.AppCompatActivity 4 | import android.os.Bundle 5 | import com.alibaba.android.arouter.facade.annotation.Route 6 | import com.link.librarycomponent.router.RouterConstant 7 | 8 | class MainActivity : AppCompatActivity() { 9 | 10 | override fun onCreate(savedInstanceState: Bundle?) { 11 | super.onCreate(savedInstanceState) 12 | setContentView(R.layout.activity_main) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /component_pay/src/main/java/com/link/component_pay/PayApplication.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_pay 2 | 3 | import android.app.Application 4 | import com.link.librarycomponent.FanApplication 5 | 6 | class PayApplication : FanApplication() { 7 | override fun initModuleApp(application: Application) { 8 | TODO("not implemented") //To change body of created functions use File | Settings | File Templates. 9 | } 10 | 11 | override fun initModuleData(application: Application) { 12 | TODO("not implemented") //To change body of created functions use File | Settings | File Templates. 13 | } 14 | } -------------------------------------------------------------------------------- /component_pay/src/main/java/com/link/component_pay/alipay/utils/DateUtils.java: -------------------------------------------------------------------------------- 1 | package com.link.component_pay.alipay.utils; 2 | 3 | import java.text.SimpleDateFormat; 4 | import java.util.Date; 5 | 6 | public class DateUtils { 7 | 8 | public static String getPayDate () { 9 | SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 10 | Date date = new Date(System.currentTimeMillis()); 11 | return formatter.format(date); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /component_pay/src/main/java/com/link/component_pay/wxapi/constants/WXConstants.java: -------------------------------------------------------------------------------- 1 | package com.link.component_pay.wxapi.constants; 2 | 3 | public class WXConstants { 4 | 5 | // 微信开放平台注册的APP_ID 6 | public static final String WX_APP_ID = "wx242cb494aa8b43b0"; 7 | 8 | // 微信开放平台注册的商户号 9 | public static final String WX_MCH_ID = "1483469312"; 10 | 11 | // 微信开放平台注册的商户号设置的秘钥 12 | public static final String WX_MCH_KEY = "C5245D70627C1F8E9964D494B0735025"; 13 | 14 | 15 | 16 | // 微信支付服务后台生成预支付交易单访问地址 17 | public static final String WX_PAY_BASE_URL = "https://api.mch.weixin.qq.com/"; 18 | public static final String UNIFIED_ORDER_URL = "pay/unifiedorder"; 19 | } 20 | -------------------------------------------------------------------------------- /component_pay/src/main/release/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 11 | 17 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /component_pay/src/main/res/drawable/btn_commit_select.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /component_pay/src/main/res/drawable/commit_btn_h.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /component_pay/src/main/res/drawable/commit_btn_n.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /component_pay/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | 18 | -------------------------------------------------------------------------------- /component_pay/src/main/res/mipmap-hdpi/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linxu-link/Fan/a974a11bfed99ad8bfa1019737e05ba0473f4e22/component_pay/src/main/res/mipmap-hdpi/error.png -------------------------------------------------------------------------------- /component_pay/src/main/res/mipmap-hdpi/success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linxu-link/Fan/a974a11bfed99ad8bfa1019737e05ba0473f4e22/component_pay/src/main/res/mipmap-hdpi/success.png -------------------------------------------------------------------------------- /component_pay/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /component_pay/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 46dp 5 | 18sp 6 | 5sp 7 | 44sp 8 | 16sp 9 | 10 | 11 | -------------------------------------------------------------------------------- /component_pay/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | pay 3 | 4 | -------------------------------------------------------------------------------- /component_pay/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | -------------------------------------------------------------------------------- /component_pay/src/main/res/xml/network_security_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | lgdsunday.club 5 | 6 | 7 | -------------------------------------------------------------------------------- /component_pay/src/test/java/com/link/component_pay/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_pay 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /component_search/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /component_search/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536m 2 | 3 | RELEASE_URL=http://119.3.215.243:9882/repository/fan-releases/ 4 | SNAPSHOT_URL=http://119.3.215.243:9882/repository/fan-snapshot/ 5 | NAME=public 6 | PASSWORD=123456@qq.com 7 | VERSION=1.0.0 8 | POM_ARTIFACT_ID=search 9 | GROUP=com.link -------------------------------------------------------------------------------- /component_search/src/androidTest/java/com/link/component_search/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_search 2 | 3 | import androidx.test.InstrumentationRegistry 4 | import androidx.test.runner.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getTargetContext() 22 | assertEquals("com.link.component_search", appContext.packageName) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /component_search/src/main/java/com/link/component_search/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_search 2 | 3 | import android.os.Bundle 4 | import androidx.navigation.findNavController 5 | import com.alibaba.android.arouter.facade.annotation.Route 6 | import com.link.librarycomponent.router.RouterConstant 7 | import com.link.librarymodule.base.BaseActivity 8 | import com.link.librarymodule.base.ContainerActivity 9 | 10 | @Route(path = RouterConstant.SEARCH) 11 | class MainActivity : BaseActivity() { 12 | 13 | override fun onCreate(savedInstanceState: Bundle?) { 14 | super.onCreate(savedInstanceState) 15 | setContentView(R.layout.search_navigation_container) 16 | } 17 | 18 | override fun onSupportNavigateUp(): Boolean { 19 | return findNavController(R.id.container).navigateUp() 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /component_search/src/main/java/com/link/component_search/SearchApplication.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_search 2 | 3 | import android.app.Application 4 | import androidx.room.Room 5 | import androidx.room.migration.Migration 6 | import com.link.component_search.data.source.local.SearchDataBase 7 | import com.link.librarycomponent.ServiceFactory 8 | import com.link.librarymodule.BaseApplication 9 | import androidx.sqlite.db.SupportSQLiteDatabase 10 | import com.link.librarycomponent.FanApplication 11 | 12 | 13 | class SearchApplication : FanApplication() { 14 | 15 | 16 | override fun onCreate() { 17 | super.onCreate() 18 | initModuleApp(this) 19 | initModuleData(this) 20 | } 21 | 22 | override fun initModuleApp(application: Application) { 23 | 24 | 25 | } 26 | 27 | 28 | 29 | override fun initModuleData(application: Application) { 30 | 31 | 32 | } 33 | 34 | 35 | } -------------------------------------------------------------------------------- /component_search/src/main/java/com/link/component_search/data/Injection.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_search.data 2 | 3 | import com.link.component_search.data.source.http.HttpDataSourceImpl 4 | import com.link.component_search.data.source.http.HttpService 5 | import com.link.component_search.data.source.local.LocalDataSourceImpl 6 | import com.link.librarymodule.http.RetrofitClient 7 | 8 | class Injection { 9 | 10 | companion object { 11 | 12 | fun provideRepository(): SearchRepository { 13 | 14 | val service: HttpService = RetrofitClient.getInstance().create(HttpService::class.java) 15 | //网络数据源 16 | val httpService = HttpDataSourceImpl.getInstance(service) 17 | //本地数据源 18 | val localService = LocalDataSourceImpl() 19 | 20 | return SearchRepository.getInstance(httpService, localService) 21 | } 22 | 23 | } 24 | } -------------------------------------------------------------------------------- /component_search/src/main/java/com/link/component_search/data/entity/CategoryDetail.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_search.data.entity 2 | 3 | data class CategoryDetail(val id:String, val name:String, val parentId:String) { 4 | } -------------------------------------------------------------------------------- /component_search/src/main/java/com/link/component_search/data/entity/CategoryResult.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_search.data.entity 2 | 3 | import com.link.component_search.data.entity.CategoryDetail 4 | 5 | data class CategoryResult(var click: Boolean=false, val parentId: String, 6 | val name: String, val list: List) { 7 | } -------------------------------------------------------------------------------- /component_search/src/main/java/com/link/component_search/data/entity/HistoryEntity.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_search.data.entity 2 | 3 | import androidx.room.ColumnInfo 4 | import androidx.room.Entity 5 | import androidx.room.PrimaryKey 6 | 7 | @Entity(tableName = "search_history") 8 | class HistoryEntity { 9 | 10 | @PrimaryKey 11 | @ColumnInfo(name = "content") 12 | lateinit var content: String 13 | 14 | } -------------------------------------------------------------------------------- /component_search/src/main/java/com/link/component_search/data/entity/MenuResult.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_search.data.entity 2 | 3 | data class MenuResult(val totalNum:String, val pn:String, val rn:String, val data:List) { 4 | } -------------------------------------------------------------------------------- /component_search/src/main/java/com/link/component_search/data/source/http/IHttpDataSource.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_search.data.source.http 2 | 3 | import com.link.component_search.data.entity.MenuResult 4 | import com.link.librarycomponent.entity.base.BaseEntity 5 | import io.reactivex.Observable 6 | 7 | interface IHttpDataSource { 8 | 9 | //根据关键词检索菜谱列表 10 | fun search(menu: String, pn: Int, rn: Int): Observable> 11 | 12 | //按标签检索菜谱 13 | fun index(cid: String, pn: Int, rn: Int): Observable> 14 | 15 | } -------------------------------------------------------------------------------- /component_search/src/main/java/com/link/component_search/data/source/local/ILocalDataSource.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_search.data.source.local 2 | 3 | import com.link.component_search.data.entity.HistoryEntity 4 | import io.reactivex.Flowable 5 | 6 | interface ILocalDataSource { 7 | 8 | /** 9 | * 获取搜索历史 10 | */ 11 | fun getSearchHistory(): Flowable> 12 | 13 | /** 14 | * 插入搜索历史 15 | */ 16 | fun insertSearchData(searchWord: HistoryEntity) 17 | 18 | /** 19 | * 清空搜索历史 20 | */ 21 | fun clearSearchHistory(list: List) 22 | 23 | 24 | } -------------------------------------------------------------------------------- /component_search/src/main/java/com/link/component_search/data/source/local/SearchHistoryDao.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_search.data.source.local 2 | 3 | import androidx.room.Dao 4 | import androidx.room.Delete 5 | import androidx.room.Insert 6 | import androidx.room.Query 7 | import com.link.component_search.data.entity.HistoryEntity 8 | import io.reactivex.Flowable 9 | 10 | @Dao 11 | interface SearchHistoryDao { 12 | 13 | @Query("select * from search_history") 14 | fun getHistory(): Flowable> 15 | 16 | @Insert 17 | fun insert(searchWord: HistoryEntity) 18 | 19 | @Delete 20 | fun deleteAll(list: List) 21 | 22 | 23 | } -------------------------------------------------------------------------------- /component_search/src/main/java/com/link/component_search/ui/detail/SearchDetailActivity.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_search.ui.detail 2 | 3 | import android.content.Intent 4 | import android.os.Bundle 5 | import androidx.fragment.app.Fragment 6 | import com.alibaba.android.arouter.facade.annotation.Route 7 | import com.link.librarycomponent.router.RouterConstant 8 | import com.link.librarymodule.base.ContainerActivity 9 | import com.link.librarymodule.constant.Constant 10 | 11 | @Route(path = RouterConstant.SEARCH_DETAIL) 12 | class SearchDetailActivity : ContainerActivity() { 13 | 14 | private var menuId: String? = null 15 | private var menuName: String? = null 16 | 17 | override fun onCreate(savedInstanceState: Bundle?) { 18 | menuId = intent.getStringExtra(Constant.ID) 19 | menuName = intent.getStringExtra(Constant.NAME) 20 | super.onCreate(savedInstanceState) 21 | } 22 | 23 | override fun initFragmentFormIntent(intent: Intent): Fragment { 24 | return SearchDetailFragment.newInstance(menuId!!, menuName!!) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /component_search/src/main/java/com/link/component_search/ui/detail/SearchDetailAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_search.ui.detail 2 | 3 | import com.bumptech.glide.Glide 4 | import com.chad.library.adapter.base.BaseQuickAdapter 5 | import com.chad.library.adapter.base.BaseViewHolder 6 | import com.link.component_search.R 7 | import com.link.component_search.data.entity.MenuDetail 8 | import com.link.general_picture.ImageLoader 9 | import com.link.general_picture.glide.GlideStrategy 10 | 11 | class SearchDetailAdapter(layoutResId: Int, data: List?) : BaseQuickAdapter(layoutResId, data) { 12 | override fun convert(helper: BaseViewHolder?, item: MenuDetail) { 13 | helper!!.setText(R.id.name, item.title) 14 | ImageLoader.getInstance().with(mContext).load(item.albums!![0]).build(GlideStrategy()).into(helper.getView(R.id.cover)) 15 | } 16 | } -------------------------------------------------------------------------------- /component_search/src/main/java/com/link/component_search/ui/search/SearchAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_search.ui.search 2 | 3 | import androidx.core.content.ContextCompat 4 | import com.chad.library.adapter.base.BaseQuickAdapter 5 | import com.chad.library.adapter.base.BaseViewHolder 6 | import com.link.component_search.R 7 | import com.link.component_search.data.entity.HistoryEntity 8 | 9 | class SearchAdapter(layoutResId: Int, data: List?) : BaseQuickAdapter(layoutResId, data) { 10 | override fun convert(helper: BaseViewHolder?, item: HistoryEntity?) { 11 | helper!!.setText(android.R.id.text1, item!!.content) 12 | helper.setTextColor(android.R.id.text1, ContextCompat.getColor(mContext, R.color.text_light)) 13 | } 14 | } -------------------------------------------------------------------------------- /component_search/src/main/release/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 11 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /component_search/src/main/res/layout/search_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 20 | 21 | -------------------------------------------------------------------------------- /component_search/src/main/res/layout/search_navigation_container.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | -------------------------------------------------------------------------------- /component_search/src/main/res/mipmap-xxhdpi/boiled_pork.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linxu-link/Fan/a974a11bfed99ad8bfa1019737e05ba0473f4e22/component_search/src/main/res/mipmap-xxhdpi/boiled_pork.jpg -------------------------------------------------------------------------------- /component_search/src/main/res/mipmap-xxhdpi/braised_pork.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linxu-link/Fan/a974a11bfed99ad8bfa1019737e05ba0473f4e22/component_search/src/main/res/mipmap-xxhdpi/braised_pork.jpg -------------------------------------------------------------------------------- /component_search/src/main/res/mipmap-xxhdpi/cola_chicken_wings.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linxu-link/Fan/a974a11bfed99ad8bfa1019737e05ba0473f4e22/component_search/src/main/res/mipmap-xxhdpi/cola_chicken_wings.jpg -------------------------------------------------------------------------------- /component_search/src/main/res/mipmap-xxhdpi/kung_pao_chicken.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linxu-link/Fan/a974a11bfed99ad8bfa1019737e05ba0473f4e22/component_search/src/main/res/mipmap-xxhdpi/kung_pao_chicken.jpg -------------------------------------------------------------------------------- /component_search/src/main/res/mipmap-xxhdpi/mapo_tofu.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linxu-link/Fan/a974a11bfed99ad8bfa1019737e05ba0473f4e22/component_search/src/main/res/mipmap-xxhdpi/mapo_tofu.jpg -------------------------------------------------------------------------------- /component_search/src/main/res/mipmap-xxhdpi/pork_ribs.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linxu-link/Fan/a974a11bfed99ad8bfa1019737e05ba0473f4e22/component_search/src/main/res/mipmap-xxhdpi/pork_ribs.jpg -------------------------------------------------------------------------------- /component_search/src/main/res/mipmap-xxxhdpi/xxl.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linxu-link/Fan/a974a11bfed99ad8bfa1019737e05ba0473f4e22/component_search/src/main/res/mipmap-xxxhdpi/xxl.jpg -------------------------------------------------------------------------------- /component_search/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /component_search/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | search 3 | 4 | 5 | Hello blank fragment 6 | 7 | 8 | -------------------------------------------------------------------------------- /component_search/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /component_search/src/test/java/com/link/component_search/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_search 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /component_shopping/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /component_shopping/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536m 2 | 3 | RELEASE_URL=http://119.3.215.243:9882/repository/fan-releases/ 4 | SNAPSHOT_URL=http://119.3.215.243:9882/repository/fan-snapshot/ 5 | NAME=public 6 | PASSWORD=123456@qq.com 7 | VERSION=1.0.0 8 | POM_ARTIFACT_ID=shopping 9 | GROUP=com.link -------------------------------------------------------------------------------- /component_shopping/src/androidTest/java/com/link/component_shopping/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_shopping 2 | 3 | import androidx.test.InstrumentationRegistry 4 | import androidx.test.runner.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getTargetContext() 22 | assertEquals("com.link.component_shopping", appContext.packageName) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /component_shopping/src/main/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 13 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /component_shopping/src/main/java/com/link/component_shopping/ShoppingApplication.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_shopping 2 | 3 | import android.app.Application 4 | import com.link.librarycomponent.FanApplication 5 | import com.link.librarycomponent.widgets.webview.sonic.SonicRuntimeImpl 6 | import com.link.librarymodule.utils.Utils 7 | import com.tencent.sonic.sdk.SonicConfig 8 | import com.tencent.sonic.sdk.SonicEngine 9 | 10 | class ShoppingApplication :FanApplication(){ 11 | override fun initModuleApp(application: Application) { 12 | TODO("not implemented") //To change body of created functions use File | Settings | File Templates. 13 | } 14 | 15 | override fun initModuleData(application: Application) { 16 | 17 | } 18 | } -------------------------------------------------------------------------------- /component_shopping/src/main/java/com/link/component_shopping/data/Injection.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_shopping.data 2 | 3 | import com.link.component_shopping.data.source.http.HttpDataSourceImpl 4 | import com.link.component_shopping.data.source.http.HttpService 5 | import com.link.component_shopping.data.source.local.LocalDataSourceImpl 6 | import com.link.librarymodule.http.RetrofitClient 7 | 8 | 9 | class Injection { 10 | 11 | companion object { 12 | 13 | fun provideRepository(): ShoppingRepository { 14 | 15 | val service: HttpService = RetrofitClient.getInstance().create(HttpService::class.java) 16 | //网络数据源 17 | val httpService = HttpDataSourceImpl.getInstance(service) 18 | //本地数据源 19 | val localService = LocalDataSourceImpl() 20 | 21 | return ShoppingRepository.getInstance(httpService, localService) 22 | } 23 | 24 | } 25 | } -------------------------------------------------------------------------------- /component_shopping/src/main/java/com/link/component_shopping/data/entity/EntityResult.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_shopping.data.entity 2 | 3 | class EntityResult(val totalNum: String, val pn: String, val rn: String, val data: T) { 4 | } -------------------------------------------------------------------------------- /component_shopping/src/main/java/com/link/component_shopping/data/entity/SecondsEntity.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_shopping.data.entity 2 | 3 | data class SecondsEntity(var icon:String, var id:String,var price:String,var oldPrice:String) { 4 | } -------------------------------------------------------------------------------- /component_shopping/src/main/java/com/link/component_shopping/data/source/http/HttpService.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_shopping.data.source.http 2 | 3 | import com.link.component_shopping.data.entity.EntityResult 4 | import com.link.component_shopping.data.entity.GoodsEntity 5 | import com.link.component_shopping.data.entity.SecondsEntity 6 | import com.link.librarycomponent.entity.base.BaseEntity 7 | import com.link.librarymodule.constant.Constant 8 | import io.reactivex.Observable 9 | import retrofit2.http.GET 10 | import retrofit2.http.Headers 11 | 12 | 13 | interface HttpService { 14 | 15 | 16 | /** 17 | * 获取商城的活动的数据 18 | */ 19 | @Headers("${Constant.URL_TYPE}:${Constant.MOCK}") 20 | @GET("mock/5d4cd6c6151be0350086e1ee/api/newGoods") 21 | fun getGoods(): Observable>>> 22 | 23 | 24 | /** 25 | * 获取商城的活动的数据 26 | */ 27 | @Headers("${Constant.URL_TYPE}:${Constant.MOCK}") 28 | @GET("mock/5d4cd6c6151be0350086e1ee/api/newSeconds") 29 | fun getSeconds(): Observable>>> 30 | 31 | 32 | } -------------------------------------------------------------------------------- /component_shopping/src/main/java/com/link/component_shopping/data/source/http/IHttpDataSource.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_shopping.data.source.http 2 | 3 | import com.link.component_shopping.data.entity.EntityResult 4 | import com.link.component_shopping.data.entity.GoodsEntity 5 | import com.link.component_shopping.data.entity.SecondsEntity 6 | import com.link.librarycomponent.entity.base.BaseEntity 7 | import io.reactivex.Observable 8 | 9 | 10 | interface IHttpDataSource { 11 | 12 | fun getGoods(): Observable>>> 13 | 14 | fun getSeconds(): Observable>>> 15 | 16 | } -------------------------------------------------------------------------------- /component_shopping/src/main/java/com/link/component_shopping/data/source/local/ILocalDataSource.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_shopping.data.source.local 2 | 3 | 4 | interface ILocalDataSource { 5 | 6 | 7 | 8 | } -------------------------------------------------------------------------------- /component_shopping/src/main/java/com/link/component_shopping/data/source/local/LocalDataSourceImpl.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_shopping.data.source.local 2 | 3 | 4 | class LocalDataSourceImpl constructor() : ILocalDataSource { 5 | 6 | 7 | 8 | 9 | 10 | } -------------------------------------------------------------------------------- /component_shopping/src/main/release/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /component_shopping/src/main/res/layout/shopping_activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /component_shopping/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /component_shopping/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | shopping 3 | 4 | -------------------------------------------------------------------------------- /component_shopping/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /component_shopping/src/test/java/com/link/component_shopping/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_shopping 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /component_update/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /component_update/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536m 2 | 3 | RELEASE_URL=http://119.3.215.243:9882/repository/fan-releases/ 4 | SNAPSHOT_URL=http://119.3.215.243:9882/repository/fan-snapshot/ 5 | NAME=public 6 | PASSWORD=123456@qq.com 7 | VERSION=1.0.0 8 | POM_ARTIFACT_ID=update 9 | GROUP=com.link -------------------------------------------------------------------------------- /component_update/src/androidTest/java/com/link/component_update/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_update 2 | 3 | import androidx.test.InstrumentationRegistry 4 | import androidx.test.runner.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getTargetContext() 22 | assertEquals("com.link.component_update", appContext.packageName) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /component_update/src/main/java/com/link/component_update/UpdateApplication.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_update 2 | 3 | import android.app.Application 4 | import com.link.librarycomponent.FanApplication 5 | import com.link.librarycomponent.ServiceFactory 6 | import com.link.librarymodule.BaseApplication 7 | 8 | class UpdateApplication : FanApplication() { 9 | 10 | 11 | override fun initModuleData(application: Application) { 12 | 13 | } 14 | 15 | override fun initModuleApp(application: Application) { 16 | 17 | } 18 | } -------------------------------------------------------------------------------- /component_update/src/main/java/com/link/component_update/UpdateService.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_update 2 | 3 | import android.content.Context 4 | import android.content.Intent 5 | import com.alibaba.android.arouter.facade.annotation.Route 6 | import com.link.component_update.ui.UpdateServiceImpl 7 | import com.link.librarycomponent.router.RouterConstant 8 | import com.link.librarycomponent.service.update.IUpdateService 9 | import com.link.librarymodule.utils.Utils 10 | 11 | @Route(path = RouterConstant.UPDATE_SERVICE) 12 | class UpdateService : IUpdateService { 13 | 14 | override fun startUpdateService() { 15 | val intent = Intent() 16 | intent.setClass(Utils.getContext(), UpdateServiceImpl::class.java) 17 | Utils.getContext().startService(intent) 18 | } 19 | 20 | override fun init(context: Context?) { 21 | 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /component_update/src/main/java/com/link/component_update/data/entity/Update.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_update.data.entity 2 | 3 | import cn.bmob.v3.BmobObject 4 | import cn.bmob.v3.datatype.BmobFile 5 | 6 | data class Update(var versionCode:String, 7 | var updateContent:String, 8 | var forceUpdate:Boolean, 9 | var apk:BmobFile): BmobObject() { 10 | } -------------------------------------------------------------------------------- /component_update/src/main/release/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 13 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /component_update/src/main/res/drawable/update_dialog_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /component_update/src/main/res/layout/update_activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /component_update/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /component_update/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | update 3 | 4 | -------------------------------------------------------------------------------- /component_update/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /component_update/src/test/java/com/link/component_update/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_update 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /component_user/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /component_user/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536m 2 | #仓库的地址 3 | RELEASE_URL=http://119.3.215.243:9882/repository/fan-releases/ 4 | SNAPSHOT_URL=http://119.3.215.243:9882/repository/fan-snapshot/ 5 | #访问仓库的用户名 6 | NAME=public 7 | #访问仓库的密码 8 | PASSWORD=123456@qq.com 9 | #设定类库的版本号 10 | VERSION=1.0.0 11 | #项目的唯一的标识符,实际对应项目的名称(这里简写了) 12 | POM_ARTIFACT_ID=user 13 | #项目组织唯一的标识符,一般用包名 14 | GROUP=com.link -------------------------------------------------------------------------------- /component_user/src/androidTest/java/com/link/component_user/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_user 2 | 3 | import androidx.test.InstrumentationRegistry 4 | import androidx.test.runner.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getTargetContext() 22 | assertEquals("com.link.component_user", appContext.packageName) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /component_user/src/main/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 14 | 15 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /component_user/src/main/java/com/link/component_user/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_user 2 | 3 | import android.os.Bundle 4 | import androidx.appcompat.app.AppCompatActivity 5 | import androidx.navigation.findNavController 6 | import com.link.librarymodule.base.BaseActivity 7 | 8 | class MainActivity : BaseActivity() { 9 | 10 | override fun onCreate(savedInstanceState: Bundle?) { 11 | super.onCreate(savedInstanceState) 12 | setContentView(R.layout.user_navigation_container) 13 | } 14 | 15 | override fun onSupportNavigateUp(): Boolean { 16 | return findNavController(R.id.container).navigateUp() 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /component_user/src/main/java/com/link/component_user/UserApplication.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_user 2 | 3 | import android.app.Application 4 | import com.link.librarycomponent.FanApplication 5 | import com.link.librarycomponent.ServiceFactory 6 | import com.link.librarymodule.BaseApplication 7 | /** 8 | * @author WJ 9 | * @date 2019-06-03 10 | * 11 | * 描述: 12 | */ 13 | class UserApplication : FanApplication() { 14 | 15 | override fun onCreate() { 16 | super.onCreate() 17 | initModuleApp(this) 18 | initModuleData(this) 19 | } 20 | 21 | override fun initModuleApp(application: Application) { 22 | ServiceFactory.getInstance().userService=UserService() 23 | } 24 | 25 | override fun initModuleData(application: Application) { 26 | 27 | } 28 | } -------------------------------------------------------------------------------- /component_user/src/main/java/com/link/component_user/UserService.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_user 2 | 3 | import android.os.Bundle 4 | import androidx.fragment.app.Fragment 5 | import com.link.component_user.ui.user.UserFragment 6 | import com.link.librarycomponent.service.user.IUserService 7 | 8 | class UserService : IUserService { 9 | 10 | override fun newUserFragment(bundle: Bundle?): Fragment? { 11 | return UserFragment.newInstance() 12 | } 13 | 14 | } -------------------------------------------------------------------------------- /component_user/src/main/java/com/link/component_user/data/Injection.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_user.data 2 | 3 | import com.link.component_user.data.source.http.HttpDataSourceImpl 4 | import com.link.component_user.data.source.http.HttpService 5 | import com.link.component_user.data.source.local.LocalDataSourceImpl 6 | import com.link.librarymodule.http.RetrofitClient 7 | 8 | class Injection { 9 | 10 | companion object { 11 | 12 | fun provideRepository(): UserRepository { 13 | 14 | val service: HttpService = RetrofitClient.getInstance().create(HttpService::class.java) 15 | //网络数据源 16 | val httpService = HttpDataSourceImpl.getInstance(service) 17 | //本地数据源 18 | val localService = LocalDataSourceImpl() 19 | 20 | return UserRepository.getInstance(httpService, localService) 21 | } 22 | 23 | } 24 | } -------------------------------------------------------------------------------- /component_user/src/main/java/com/link/component_user/data/UserRepository.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_user.data 2 | 3 | import com.link.component_user.data.source.http.IHttpDataSource 4 | import com.link.component_user.data.source.local.ILocalDataSource 5 | import com.link.librarymodule.base.mvvm.model.BaseRepository 6 | 7 | class UserRepository private constructor( 8 | private val httpDataSource: IHttpDataSource, 9 | private val localDataSource: ILocalDataSource 10 | ) : 11 | BaseRepository(), ILocalDataSource, IHttpDataSource { 12 | 13 | 14 | companion object { 15 | 16 | @Volatile 17 | private var instance: UserRepository? = null 18 | 19 | fun getInstance(httpDataSource: IHttpDataSource, localDataSource: ILocalDataSource) = 20 | instance ?: synchronized(this) { 21 | instance ?: UserRepository(httpDataSource, localDataSource).also { 22 | instance = it 23 | } 24 | } 25 | } 26 | 27 | } -------------------------------------------------------------------------------- /component_user/src/main/java/com/link/component_user/data/entity/Collection.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_user.data.entity 2 | 3 | import cn.bmob.v3.BmobObject 4 | import java.io.Serializable 5 | 6 | class Collection : BmobObject() { 7 | 8 | var userId: String? = null 9 | var id: String? = null 10 | var title: String? = null 11 | var tags: String? = null 12 | var imtro: String? = null 13 | var ingredients: String? = null 14 | var burden: String? = null 15 | var albums: List? = null 16 | var steps: List? = null 17 | // var album: List? = null 18 | // var step: List? = null 19 | 20 | class StepsBean : Serializable { 21 | /** 22 | * img : http://juheimg.oss-cn-hangzhou.aliyuncs.com/cookbook/s/44/4323_3adcc38469c97069.jpg 23 | * step : 1.用烤纸叠好28cmX28cm的方盒,还可以叠的再深一点哦!后面会比较方便.低粉和可可粉混合过筛。蛋黄和蛋白分开 24 | */ 25 | var img: String? = null 26 | var step: String? = null 27 | } 28 | } -------------------------------------------------------------------------------- /component_user/src/main/java/com/link/component_user/data/entity/FootPrint.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_user.data.entity 2 | 3 | import cn.bmob.v3.BmobObject 4 | 5 | class FootPrint : BmobObject() { 6 | 7 | var userId: String? = null 8 | var id: String? = null 9 | var title: String? = null 10 | var tags: String? = null 11 | var imtro: String? = null 12 | var ingredients: String? = null 13 | var burden: String? = null 14 | var albums: List? = null 15 | var steps: List? = null 16 | } -------------------------------------------------------------------------------- /component_user/src/main/java/com/link/component_user/data/source/http/HttpDataSourceImpl.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_user.data.source.http 2 | 3 | 4 | 5 | /** 6 | * @author WJ 7 | * @date 2019-05-30 8 | * 9 | * 描述:网络数据源 10 | */ 11 | class HttpDataSourceImpl constructor(private val service: HttpService) : IHttpDataSource { 12 | 13 | 14 | companion object { 15 | @Volatile 16 | private var instance: HttpDataSourceImpl? = null 17 | 18 | fun getInstance(service: HttpService) = 19 | instance ?: synchronized(this) { 20 | instance ?: HttpDataSourceImpl(service).also { instance = it } 21 | } 22 | } 23 | 24 | 25 | } -------------------------------------------------------------------------------- /component_user/src/main/java/com/link/component_user/data/source/http/HttpService.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_user.data.source.http 2 | 3 | 4 | 5 | 6 | interface HttpService { 7 | 8 | 9 | 10 | 11 | } -------------------------------------------------------------------------------- /component_user/src/main/java/com/link/component_user/data/source/http/IHttpDataSource.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_user.data.source.http 2 | 3 | 4 | interface IHttpDataSource { 5 | 6 | 7 | 8 | } -------------------------------------------------------------------------------- /component_user/src/main/java/com/link/component_user/data/source/local/ILocalDataSource.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_user.data.source.local 2 | 3 | interface ILocalDataSource { 4 | 5 | 6 | } -------------------------------------------------------------------------------- /component_user/src/main/java/com/link/component_user/data/source/local/LocalDataSourceImpl.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_user.data.source.local 2 | 3 | 4 | class LocalDataSourceImpl : ILocalDataSource { 5 | 6 | 7 | 8 | 9 | } -------------------------------------------------------------------------------- /component_user/src/main/java/com/link/component_user/ui/collection/CollectionAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_user.ui.collection 2 | 3 | import com.bumptech.glide.Glide 4 | import com.chad.library.adapter.base.BaseQuickAdapter 5 | import com.chad.library.adapter.base.BaseViewHolder 6 | import com.link.component_user.R 7 | import com.link.component_user.data.entity.Collection 8 | import com.link.general_picture.ImageLoader 9 | import com.link.general_picture.glide.GlideStrategy 10 | 11 | class CollectionAdapter(layoutId: Int, data: List?) 12 | : BaseQuickAdapter(layoutId, data) { 13 | 14 | 15 | override fun convert(helper: BaseViewHolder, item: Collection?) { 16 | helper.setText(R.id.name, item!!.title) 17 | ImageLoader.getInstance().with(mContext).load(item.albums!![0]).build(GlideStrategy()).into(helper.getView(R.id.cover)) 18 | } 19 | 20 | 21 | } -------------------------------------------------------------------------------- /component_user/src/main/java/com/link/component_user/ui/footprint/FootPrintAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_user.ui.footprint 2 | 3 | import com.bumptech.glide.Glide 4 | import com.chad.library.adapter.base.BaseQuickAdapter 5 | import com.chad.library.adapter.base.BaseViewHolder 6 | import com.link.component_user.R 7 | import com.link.component_user.data.entity.FootPrint 8 | import com.link.general_picture.ImageLoader 9 | import com.link.general_picture.glide.GlideStrategy 10 | 11 | class FootPrintAdapter(layoutId: Int, data: List?) 12 | : BaseQuickAdapter(layoutId, data) { 13 | 14 | 15 | override fun convert(helper: BaseViewHolder, item: FootPrint?) { 16 | helper.setText(R.id.name, item!!.title) 17 | ImageLoader.getInstance().with(mContext).load(item.albums!![0]).build(GlideStrategy()).into(helper.getView(R.id.cover)) 18 | } 19 | 20 | 21 | } -------------------------------------------------------------------------------- /component_user/src/main/release/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /component_user/src/main/res/drawable/user_header_bar.xml: -------------------------------------------------------------------------------- 1 | 3 | 9 | -------------------------------------------------------------------------------- /component_user/src/main/res/drawable/user_ic_attention.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /component_user/src/main/res/drawable/user_ic_goods.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /component_user/src/main/res/drawable/user_ic_order.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /component_user/src/main/res/layout/user_navigation_container.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | -------------------------------------------------------------------------------- /component_user/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /component_user/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /component_user/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /component_user/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | User 3 | 《饭fan》是一个十分的精简、无广告食谱类APP,希望它可以帮助你快速、健康地设计自己的食谱 4 | 5 | 6 | -------------------------------------------------------------------------------- /component_user/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /component_user/src/test/java/com/link/component_user/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.link.component_user 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /dex_files.txt: -------------------------------------------------------------------------------- 1 | android/support/multidex/BuildConfig/class 2 | android/support/multidex/MultiDex$V14/class 3 | android/support/multidex/MultiDex$V19/class 4 | android/support/multidex/MultiDex$V4/class 5 | android/support/multidex/MultiDex/class 6 | android/support/multidex/MultiDexApplication/class 7 | android/support/multidex/MultiDexExtractor$1/class 8 | android/support/multidex/MultiDexExtractor/class 9 | android/support/multidex/ZipUtil$CentralDirectory/class 10 | android/support/multidex/ZipUtil/class -------------------------------------------------------------------------------- /general_daemon/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /general_daemon/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply plugin: 'kotlin-android' 3 | apply plugin: 'kotlin-android-extensions' 4 | apply plugin: 'kotlin-kapt' 5 | apply from: '../maven_push.gradle' 6 | 7 | android { 8 | 9 | compileSdkVersion build_versions.compile_sdk 10 | 11 | defaultConfig libDefaultConfig 12 | 13 | compileOptions { 14 | targetCompatibility JavaVersion.VERSION_1_8 15 | sourceCompatibility JavaVersion.VERSION_1_8 16 | } 17 | 18 | } 19 | 20 | dependencies { 21 | implementation fileTree(dir: 'libs', include: ['*.jar']) 22 | implementation deps.rxjava.rxjava2 23 | } 24 | -------------------------------------------------------------------------------- /general_daemon/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536m 2 | 3 | RELEASE_URL=http://119.3.215.243:9882/repository/fan-releases/ 4 | SNAPSHOT_URL=http://119.3.215.243:9882/repository/fan-snapshot/ 5 | NAME=public 6 | PASSWORD=123456@qq.com 7 | VERSION=1.0.0 8 | POM_ARTIFACT_ID=daemon 9 | GROUP=com.link -------------------------------------------------------------------------------- /general_daemon/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 | -------------------------------------------------------------------------------- /general_daemon/readme.md: -------------------------------------------------------------------------------- 1 | **Android 服务保活/常驻 (Android Service Daemon)** 2 | 建议只在App的核心功能需要保活/常驻时使用。 3 | 参考了github上的一个库:https://github.com/xingda920813/HelloDaemon -------------------------------------------------------------------------------- /general_daemon/src/androidTest/java/com/link/general_daemon/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.link.general_daemon; 2 | 3 | import android.content.Context; 4 | 5 | import androidx.test.InstrumentationRegistry; 6 | import androidx.test.runner.AndroidJUnit4; 7 | 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | 11 | import static org.junit.Assert.*; 12 | 13 | /** 14 | * Instrumented test, which will execute on an Android device. 15 | * 16 | * @see Testing documentation 17 | */ 18 | @RunWith(AndroidJUnit4.class) 19 | public class ExampleInstrumentedTest { 20 | @Test 21 | public void useAppContext() { 22 | // Context of the app under test. 23 | Context appContext = InstrumentationRegistry.getTargetContext(); 24 | 25 | assertEquals("com.link.general_daemon.test", appContext.getPackageName()); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /general_daemon/src/main/java/com/link/general_daemon/JobSchedulerService.kt: -------------------------------------------------------------------------------- 1 | package com.link.general_daemon 2 | 3 | import android.annotation.TargetApi 4 | import android.app.job.JobParameters 5 | import android.app.job.JobService 6 | import android.os.Build 7 | 8 | /** 9 | * @author WJ 10 | * @date 2019-08-21 11 | * 12 | * 描述: 13 | */ 14 | @TargetApi(Build.VERSION_CODES.LOLLIPOP) 15 | class JobSchedulerService : JobService() { 16 | 17 | override fun onStopJob(params: JobParameters?): Boolean { 18 | return if (DaemonEnv.sInitialized) { 19 | DaemonEnv.startServiceMayBind(DaemonEnv.sServiceClass!!) 20 | true 21 | } else { 22 | false 23 | } 24 | } 25 | 26 | override fun onStartJob(params: JobParameters?): Boolean { 27 | 28 | return false 29 | 30 | } 31 | } -------------------------------------------------------------------------------- /general_daemon/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | daemon 3 | 4 | -------------------------------------------------------------------------------- /general_network/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /general_network/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply plugin: 'kotlin-android' 3 | apply plugin: 'kotlin-android-extensions' 4 | apply plugin: 'kotlin-kapt' 5 | apply from: '../maven_push.gradle' 6 | 7 | android { 8 | 9 | compileSdkVersion build_versions.compile_sdk 10 | 11 | defaultConfig libDefaultConfig 12 | 13 | compileOptions { 14 | targetCompatibility JavaVersion.VERSION_1_8 15 | sourceCompatibility JavaVersion.VERSION_1_8 16 | } 17 | 18 | } 19 | 20 | dependencies { 21 | implementation fileTree(dir: 'libs', include: ['*.jar']) 22 | //rx网络框架 23 | implementation deps.retrofit.runtime 24 | implementation deps.retrofit.gson 25 | implementation deps.retrofit.rxjava2 26 | } 27 | -------------------------------------------------------------------------------- /general_network/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536m 2 | 3 | RELEASE_URL=http://119.3.215.243:9882/repository/fan-releases/ 4 | SNAPSHOT_URL=http://119.3.215.243:9882/repository/fan-snapshot/ 5 | NAME=public 6 | PASSWORD=123456@qq.com 7 | VERSION=1.0.0 8 | POM_ARTIFACT_ID=network 9 | GROUP=com.link -------------------------------------------------------------------------------- /general_network/src/androidTest/java/com/link/general_network/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.link.general_network; 2 | 3 | import android.content.Context; 4 | 5 | import androidx.test.InstrumentationRegistry; 6 | import androidx.test.runner.AndroidJUnit4; 7 | 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | 11 | import static org.junit.Assert.*; 12 | 13 | /** 14 | * Instrumented test, which will execute on an Android device. 15 | * 16 | * @see Testing documentation 17 | */ 18 | @RunWith(AndroidJUnit4.class) 19 | public class ExampleInstrumentedTest { 20 | @Test 21 | public void useAppContext() { 22 | // Context of the app under test. 23 | Context appContext = InstrumentationRegistry.getTargetContext(); 24 | 25 | assertEquals("com.link.general_network.test", appContext.getPackageName()); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /general_network/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /general_network/src/main/java/com/link/general_network/interceptor/BaseInterceptor.kt: -------------------------------------------------------------------------------- 1 | package com.link.general_network.interceptor 2 | 3 | import java.io.IOException 4 | 5 | import okhttp3.Interceptor 6 | import okhttp3.Request 7 | import okhttp3.Response 8 | 9 | /** 10 | * @author WJ 11 | * @date 2019-07-14 12 | * 13 | * 描述: 14 | */ 15 | class BaseInterceptor(private val headers: Map?) : Interceptor { 16 | 17 | @Throws(IOException::class) 18 | override fun intercept(chain: Interceptor.Chain): Response { 19 | val builder = chain.request() 20 | .newBuilder() 21 | if (headers != null && headers.size > 0) { 22 | val keys = headers.keys 23 | for (headerKey in keys) { 24 | builder.addHeader(headerKey, headers[headerKey]!!).build() 25 | } 26 | } 27 | //请求信息 28 | return chain.proceed(builder.build()) 29 | } 30 | } -------------------------------------------------------------------------------- /general_network/src/main/java/com/link/general_network/interceptor/logging/I.java: -------------------------------------------------------------------------------- 1 | package com.link.general_network.interceptor.logging; 2 | 3 | 4 | import java.util.logging.Level; 5 | 6 | import okhttp3.internal.platform.Platform; 7 | 8 | /** 9 | * @author ihsan on 10/02/2017. 10 | */ 11 | class I { 12 | 13 | protected I() { 14 | throw new UnsupportedOperationException(); 15 | } 16 | 17 | static void log(int type, String tag, String msg) { 18 | java.util.logging.Logger logger = java.util.logging.Logger.getLogger(tag); 19 | switch (type) { 20 | case Platform.INFO: 21 | logger.log(Level.INFO, msg); 22 | break; 23 | default: 24 | logger.log(Level.WARNING, msg); 25 | break; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /general_network/src/main/java/com/link/general_network/interceptor/logging/Level.java: -------------------------------------------------------------------------------- 1 | package com.link.general_network.interceptor.logging; 2 | 3 | /** 4 | * @author ihsan on 21/02/2017. 5 | */ 6 | 7 | public enum Level { 8 | /** 9 | * No logs. 10 | */ 11 | NONE, 12 | /** 13 | *

Example: 14 | *

{@code
15 |      *  - URL
16 |      *  - Method
17 |      *  - Headers
18 |      *  - Body
19 |      * }
20 | */ 21 | BASIC, 22 | /** 23 | *

Example: 24 | *

{@code
25 |      *  - URL
26 |      *  - Method
27 |      *  - Headers
28 |      * }
29 | */ 30 | HEADERS, 31 | /** 32 | *

Example: 33 | *

{@code
34 |      *  - URL
35 |      *  - Method
36 |      *  - Body
37 |      * }
38 | */ 39 | BODY 40 | } 41 | -------------------------------------------------------------------------------- /general_network/src/main/java/com/link/general_network/interceptor/logging/Logger.java: -------------------------------------------------------------------------------- 1 | package com.link.general_network.interceptor.logging; 2 | 3 | import okhttp3.internal.platform.Platform; 4 | 5 | /** 6 | * @author ihsan on 11/07/2017. 7 | */ 8 | @SuppressWarnings({"WeakerAccess", "unused"}) 9 | public interface Logger { 10 | void log(int level, String tag, String msg); 11 | 12 | Logger DEFAULT = new Logger() { 13 | @Override 14 | public void log(int level, String tag, String message) { 15 | Platform.get().log(level, message, null); 16 | } 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /general_network/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | general_network 3 | 4 | -------------------------------------------------------------------------------- /general_picture/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /general_picture/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply from: '../maven_push.gradle' 3 | 4 | android { 5 | 6 | compileSdkVersion build_versions.compile_sdk 7 | 8 | defaultConfig libDefaultConfig 9 | 10 | compileOptions { 11 | targetCompatibility JavaVersion.VERSION_1_8 12 | sourceCompatibility JavaVersion.VERSION_1_8 13 | } 14 | 15 | } 16 | 17 | dependencies { 18 | implementation fileTree(dir: 'libs', include: ['*.jar']) 19 | implementation deps.androidx.appcompat 20 | //图片加载框架 21 | implementation deps.glide.runtime 22 | annotationProcessor deps.glide.compiler 23 | 24 | testImplementation 'junit:junit:4.12' 25 | } 26 | -------------------------------------------------------------------------------- /general_picture/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linxu-link/Fan/a974a11bfed99ad8bfa1019737e05ba0473f4e22/general_picture/consumer-rules.pro -------------------------------------------------------------------------------- /general_picture/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536m 2 | 3 | RELEASE_URL=http://119.3.215.243:9882/repository/fan-releases/ 4 | SNAPSHOT_URL=http://119.3.215.243:9882/repository/fan-snapshot/ 5 | NAME=public 6 | PASSWORD=123456@qq.com 7 | VERSION=1.0.1 8 | POM_ARTIFACT_ID=picture 9 | GROUP=com.link -------------------------------------------------------------------------------- /general_picture/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 | -------------------------------------------------------------------------------- /general_picture/src/androidTest/java/com/link/general_picture/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.link.general_picture; 2 | 3 | import android.content.Context; 4 | 5 | import androidx.test.platform.app.InstrumentationRegistry; 6 | import androidx.test.ext.junit.runners.AndroidJUnit4; 7 | 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | 11 | import static org.junit.Assert.*; 12 | 13 | /** 14 | * Instrumented test, which will execute on an Android device. 15 | * 16 | * @see Testing documentation 17 | */ 18 | @RunWith(AndroidJUnit4.class) 19 | public class ExampleInstrumentedTest { 20 | @Test 21 | public void useAppContext() { 22 | // Context of the app under test. 23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); 24 | 25 | assertEquals("com.link.general_picture.test", appContext.getPackageName()); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /general_picture/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /general_picture/src/main/java/com/link/general_picture/ILoaderStrategy.java: -------------------------------------------------------------------------------- 1 | package com.link.general_picture; 2 | 3 | public interface ILoaderStrategy { 4 | 5 | /** 6 | * 加载图片 7 | * @param builder 8 | */ 9 | void loadImage(ImageLoadBuilder builder); 10 | 11 | /** 12 | * 清理内存缓存 13 | */ 14 | void clearMemoryCache(); 15 | 16 | /** 17 | * 清理磁盘缓存 18 | */ 19 | void clearDiskCache(); 20 | 21 | } 22 | -------------------------------------------------------------------------------- /general_picture/src/main/java/com/link/general_picture/ImageLoader.java: -------------------------------------------------------------------------------- 1 | package com.link.general_picture; 2 | 3 | import android.content.Context; 4 | 5 | /** 6 | * @author WJ 7 | * @date 2019-08-27 8 | * 9 | * 描述:图片加载框架,单例封装 10 | */ 11 | public class ImageLoader { 12 | 13 | private static class Inner { 14 | private static ImageLoader sInstance = new ImageLoader(); 15 | } 16 | 17 | private ImageLoader() { 18 | 19 | } 20 | 21 | public static ImageLoader getInstance() { 22 | return Inner.sInstance; 23 | } 24 | 25 | public ImageLoadBuilder.Builder with(Context context){ 26 | return new ImageLoadBuilder.Builder(context); 27 | } 28 | 29 | 30 | 31 | } 32 | -------------------------------------------------------------------------------- /general_picture/src/main/java/com/link/general_picture/glide/CustomGlideModule.java: -------------------------------------------------------------------------------- 1 | package com.link.general_picture.glide; 2 | 3 | import com.bumptech.glide.module.AppGlideModule; 4 | 5 | public class CustomGlideModule extends AppGlideModule { 6 | } 7 | -------------------------------------------------------------------------------- /general_picture/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | general_picture 3 | 4 | -------------------------------------------------------------------------------- /general_picture/src/test/java/com/link/general_picture/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.link.general_picture; 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() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /general_statelayout/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /general_statelayout/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply plugin: 'kotlin-android' 3 | apply plugin: 'kotlin-android-extensions' 4 | apply plugin: 'kotlin-kapt' 5 | apply from: '../maven_push.gradle' 6 | 7 | android { 8 | 9 | compileSdkVersion build_versions.compile_sdk 10 | 11 | defaultConfig libDefaultConfig 12 | 13 | compileOptions { 14 | targetCompatibility JavaVersion.VERSION_1_8 15 | sourceCompatibility JavaVersion.VERSION_1_8 16 | } 17 | 18 | } 19 | 20 | dependencies { 21 | implementation fileTree(dir: 'libs', include: ['*.jar']) 22 | implementation deps.androidx.appcompat 23 | testImplementation 'junit:junit:4.12' 24 | } 25 | -------------------------------------------------------------------------------- /general_statelayout/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536m 2 | 3 | RELEASE_URL=http://119.3.215.243:9882/repository/fan-releases/ 4 | SNAPSHOT_URL=http://119.3.215.243:9882/repository/fan-snapshot/ 5 | NAME=public 6 | PASSWORD=123456@qq.com 7 | VERSION=1.0.0 8 | POM_ARTIFACT_ID=statelayout 9 | GROUP=com.link -------------------------------------------------------------------------------- /general_statelayout/src/androidTest/java/com/link/general_statelayout/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.link.general_statelayout; 2 | 3 | import android.content.Context; 4 | 5 | import androidx.test.InstrumentationRegistry; 6 | import androidx.test.runner.AndroidJUnit4; 7 | 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | 11 | import static org.junit.Assert.*; 12 | 13 | /** 14 | * Instrumented test, which will execute on an Android device. 15 | * 16 | * @see Testing documentation 17 | */ 18 | @RunWith(AndroidJUnit4.class) 19 | public class ExampleInstrumentedTest { 20 | @Test 21 | public void useAppContext() { 22 | // Context of the app under test. 23 | Context appContext = InstrumentationRegistry.getTargetContext(); 24 | 25 | assertEquals("com.link.general_statelayout.test", appContext.getPackageName()); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /general_statelayout/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /general_statelayout/src/main/java/com/link/general_statelayout/AbsViewStubLayout.kt: -------------------------------------------------------------------------------- 1 | package com.link.general_statelayout 2 | 3 | import android.content.Context 4 | import android.view.View 5 | import android.view.ViewStub 6 | import androidx.annotation.LayoutRes 7 | 8 | abstract class AbsViewStubLayout { 9 | 10 | /** 11 | * ViewStub用来加载网络异常,空数据等页面 12 | */ 13 | private var mLayoutVs: ViewStub? = null 14 | /** 15 | * View用来加载正常视图页面 16 | */ 17 | private var mContentView: View? = null 18 | 19 | fun initLayout(context: Context, @LayoutRes layoutResId: Int) { 20 | mLayoutVs = ViewStub(context) 21 | mLayoutVs!!.layoutResource = layoutResId 22 | } 23 | 24 | fun getLayoutVs(): ViewStub? { 25 | return mLayoutVs 26 | } 27 | 28 | fun setView(contentView: View) { 29 | mContentView = contentView 30 | } 31 | 32 | /** 33 | * 设置数据 34 | * @param objects 数据 35 | */ 36 | abstract fun setData(vararg objects: Any) 37 | 38 | } -------------------------------------------------------------------------------- /general_statelayout/src/main/java/com/link/general_statelayout/ILayoutState.kt: -------------------------------------------------------------------------------- 1 | package com.link.general_statelayout 2 | 3 | interface ILayoutState { 4 | 5 | fun isLoading():Boolean 6 | 7 | fun showLoading() 8 | 9 | fun showNetworkError() 10 | 11 | fun showEmptyData(iconImage: Int, textTip: String) 12 | 13 | fun showContent() 14 | 15 | fun showError(iconImage: Int, textTip: String) 16 | 17 | } -------------------------------------------------------------------------------- /general_statelayout/src/main/java/com/link/general_statelayout/listener/OnNetworkListener.kt: -------------------------------------------------------------------------------- 1 | package com.link.general_statelayout.listener 2 | 3 | interface OnNetworkListener { 4 | fun onNetwork() 5 | } -------------------------------------------------------------------------------- /general_statelayout/src/main/java/com/link/general_statelayout/listener/OnRetryListener.kt: -------------------------------------------------------------------------------- 1 | package com.link.general_statelayout.listener 2 | 3 | interface OnRetryListener { 4 | fun onRetry() 5 | } -------------------------------------------------------------------------------- /general_statelayout/src/main/java/com/link/general_statelayout/listener/OnShowOrHideListener.kt: -------------------------------------------------------------------------------- 1 | package com.link.general_statelayout.listener 2 | 3 | import android.view.View 4 | 5 | interface OnShowOrHideListener { 6 | fun onViewShow(view: View, id: Int) 7 | 8 | fun onViewHide(view: View, id: Int) 9 | } -------------------------------------------------------------------------------- /general_statelayout/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | general_statelayout 3 | 4 | -------------------------------------------------------------------------------- /general_statelayout/src/test/java/com/link/general_statelayout/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.link.general_statelayout; 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() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linxu-link/Fan/a974a11bfed99ad8bfa1019737e05ba0473f4e22/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Apr 29 15:46:13 CST 2019 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-5.1.1-all.zip 7 | -------------------------------------------------------------------------------- /libraryarchitecture/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /libraryarchitecture/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply plugin: 'kotlin-android' 3 | apply plugin: 'kotlin-android-extensions' 4 | apply plugin: 'kotlin-kapt' 5 | 6 | android { 7 | compileSdkVersion build_versions.compile_sdk 8 | 9 | defaultConfig libDefaultConfig 10 | 11 | compileOptions { 12 | targetCompatibility JavaVersion.VERSION_1_8 13 | sourceCompatibility JavaVersion.VERSION_1_8 14 | } 15 | 16 | } 17 | 18 | dependencies { 19 | api fileTree(dir: 'libs', include: ['*.jar']) 20 | api project(":librarybase") 21 | testImplementation 'junit:junit:4.12' 22 | } 23 | -------------------------------------------------------------------------------- /libraryarchitecture/src/androidTest/java/com/link/librarymodule/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.link.librarymodule; 2 | 3 | import android.content.Context; 4 | import androidx.test.InstrumentationRegistry; 5 | import androidx.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() { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.link.librarymodule.test", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/java/com/link/librarymodule/BaseApplication.kt: -------------------------------------------------------------------------------- 1 | package com.link.librarymodule 2 | 3 | import android.app.Application 4 | 5 | /** 6 | * @author WJ 7 | * @date 2019-08-02 8 | * 9 | * 描述:框架提供application基础类 10 | */ 11 | abstract class BaseApplication : Application(),IBaseApplication { 12 | 13 | } -------------------------------------------------------------------------------- /libraryarchitecture/src/main/java/com/link/librarymodule/IBaseApplication.kt: -------------------------------------------------------------------------------- 1 | package com.link.librarymodule 2 | 3 | import android.app.Application 4 | 5 | interface IBaseApplication { 6 | 7 | /** 8 | * Application 初始化 9 | */ 10 | fun initModuleApp(application: Application) 11 | 12 | /** 13 | * 所有 Application 初始化后的自定义操作 14 | */ 15 | fun initModuleData(application: Application) 16 | } -------------------------------------------------------------------------------- /libraryarchitecture/src/main/java/com/link/librarymodule/base/mvvm/model/BaseRepository.kt: -------------------------------------------------------------------------------- 1 | package com.link.librarymodule.base.mvvm.model 2 | /** 3 | * @author WJ 4 | * @date 2019-08-02 5 | * 6 | * 描述:数据仓库的基类,当前业务比较少 7 | */ 8 | open class BaseRepository { 9 | 10 | } -------------------------------------------------------------------------------- /libraryarchitecture/src/main/java/com/link/librarymodule/base/mvvm/view/IBaseView.kt: -------------------------------------------------------------------------------- 1 | package com.link.librarymodule.base.mvvm.view 2 | 3 | interface IBaseView { 4 | 5 | /** 6 | * 接收上一个页面传入的数据 7 | */ 8 | fun initParam() 9 | 10 | /** 11 | * 请求网络接口 12 | */ 13 | fun loadData(); 14 | 15 | /** 16 | * 17 | */ 18 | fun initViewObservable() 19 | 20 | 21 | 22 | } -------------------------------------------------------------------------------- /libraryarchitecture/src/main/java/com/link/librarymodule/launchstarter/DelayInitDispatcher.java: -------------------------------------------------------------------------------- 1 | package com.link.librarymodule.launchstarter; 2 | 3 | import android.os.Looper; 4 | import android.os.MessageQueue; 5 | import com.link.librarymodule.launchstarter.task.DispatchRunnable; 6 | import com.link.librarymodule.launchstarter.task.Task; 7 | import java.util.LinkedList; 8 | import java.util.Queue; 9 | /** 10 | * @author WJ 11 | * @date 2019-08-16 12 | * 13 | * 描述:延迟初始化调度器 14 | */ 15 | public class DelayInitDispatcher { 16 | 17 | private Queue mDelayTasks = new LinkedList<>(); 18 | 19 | private MessageQueue.IdleHandler mIdleHandler = () -> { 20 | if(mDelayTasks.size()>0){ 21 | Task task = mDelayTasks.poll(); 22 | new DispatchRunnable(task).run(); 23 | } 24 | return !mDelayTasks.isEmpty(); 25 | }; 26 | 27 | public DelayInitDispatcher addTask(Task task){ 28 | mDelayTasks.add(task); 29 | return this; 30 | } 31 | 32 | public void start(){ 33 | Looper.myQueue().addIdleHandler(mIdleHandler); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/java/com/link/librarymodule/launchstarter/stat/TaskStatBean.java: -------------------------------------------------------------------------------- 1 | package com.link.librarymodule.launchstarter.stat; 2 | 3 | class TaskStatBean { 4 | 5 | private String situation; 6 | private int count; 7 | 8 | public String getSituation() { 9 | return situation; 10 | } 11 | 12 | public void setSituation(String situation) { 13 | this.situation = situation; 14 | } 15 | 16 | public int getCount() { 17 | return count; 18 | } 19 | 20 | public void setCount(int count) { 21 | this.count = count; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/java/com/link/librarymodule/launchstarter/task/MainTask.java: -------------------------------------------------------------------------------- 1 | package com.link.librarymodule.launchstarter.task; 2 | 3 | public abstract class MainTask extends Task { 4 | 5 | @Override 6 | public boolean runOnMainThread() { 7 | return true; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/java/com/link/librarymodule/launchstarter/task/TaskCallBack.java: -------------------------------------------------------------------------------- 1 | package com.link.librarymodule.launchstarter.task; 2 | 3 | public interface TaskCallBack { 4 | 5 | void call(); 6 | } 7 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/java/com/link/librarymodule/launchstarter/utils/DispatcherLog.java: -------------------------------------------------------------------------------- 1 | package com.link.librarymodule.launchstarter.utils; 2 | 3 | import android.util.Log; 4 | 5 | public class DispatcherLog { 6 | 7 | private static boolean sDebug = true; 8 | 9 | public static void i(String msg) { 10 | if (!sDebug) { 11 | return; 12 | } 13 | Log.i("task",msg); 14 | } 15 | 16 | public static boolean isDebug() { 17 | return sDebug; 18 | } 19 | 20 | public static void setDebug(boolean debug) { 21 | sDebug = debug; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/java/com/link/librarymodule/utils/SimpleTextWatcher.kt: -------------------------------------------------------------------------------- 1 | package com.link.librarymodule.utils 2 | 3 | import android.text.Editable 4 | import android.text.TextWatcher 5 | 6 | open class SimpleTextWatcher : TextWatcher { 7 | 8 | override fun afterTextChanged(s: Editable?) { 9 | 10 | } 11 | 12 | override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) { 13 | 14 | } 15 | 16 | override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) { 17 | } 18 | } -------------------------------------------------------------------------------- /libraryarchitecture/src/main/java/com/link/librarymodule/widgets/navgation/CustomRadioButton.kt: -------------------------------------------------------------------------------- 1 | package com.link.librarymodule.widgets.navgation 2 | 3 | import android.content.Context 4 | import android.graphics.Canvas 5 | import android.util.AttributeSet 6 | import android.view.Gravity 7 | import android.widget.RadioButton 8 | 9 | class CustomRadioButton @JvmOverloads constructor(context: Context, attributeSet: AttributeSet? = null) : RadioButton(context, attributeSet) { 10 | 11 | 12 | init { 13 | 14 | } 15 | 16 | override fun onDraw(canvas: Canvas?) { 17 | super.onDraw(canvas) 18 | val drawables = compoundDrawables 19 | val drawable = drawables[0] 20 | val gravity = gravity 21 | var left = 0 22 | if (gravity == Gravity.CENTER) { 23 | left = ((width - drawable.intrinsicWidth - paint.measureText(text.toString())) / 2).toInt() 24 | } 25 | drawable.setBounds(left, 0, left + drawable.intrinsicWidth, drawable.intrinsicHeight) 26 | 27 | } 28 | 29 | } -------------------------------------------------------------------------------- /libraryarchitecture/src/main/java/com/link/librarymodule/widgets/recyclerview/ItemDecoration.kt: -------------------------------------------------------------------------------- 1 | package com.link.librarymodule.widgets.recyclerview 2 | 3 | import android.content.res.Resources 4 | import android.graphics.Rect 5 | import android.view.View 6 | import androidx.recyclerview.widget.RecyclerView 7 | 8 | class ItemDecoration constructor(val left: Int, val top: Int, val right: Int, val bottom: Int) : RecyclerView.ItemDecoration() { 9 | 10 | fun dip(value: Int): Int = (value * Resources.getSystem().displayMetrics.density).toInt() 11 | 12 | override fun getItemOffsets(outRect: Rect, view: View, parent: RecyclerView, state: RecyclerView.State) { 13 | outRect.set(dip(left), dip(top), dip(right), dip(bottom)) 14 | } 15 | 16 | } -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/anim/news_bottom_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/anim/news_bottom_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/anim/slide_left_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/anim/slide_left_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/anim/slide_right_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/anim/slide_right_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/ic_arrow_back_black.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/ic_arrow_back_white.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/ic_arrow_right_white.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/ic_cross.xml: -------------------------------------------------------------------------------- 1 | 3 | 5 | 6 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/ic_eye_open.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/ic_home.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/ic_lock.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/ic_login_out.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/ic_message_white.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/ic_people.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/ic_search.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/ic_settings_white.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/selector_classification_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/selector_find_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/selector_home_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/selector_mine_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/selector_shopping_cart_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/shape_circle_white.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/shape_stroke_corner_10dp_orange_full.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/shape_stroke_corner_10dp_white_full.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/shape_stroke_corner_15dp_white.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/shape_stroke_corner_25dp_green_full.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/shape_stroke_corner_25dp_grey.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/shape_stroke_corner_25dp_grey_dark_full.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/shape_stroke_corner_25dp_grey_full.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/shape_stroke_corner_25dp_main_full.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/shape_stroke_corner_25dp_white_full.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/shape_stroke_corner_5dp_grey.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/shape_stroke_corner_5dp_grey_dark_full.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/shape_stroke_corner_5dp_grey_full.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/shape_stroke_corner_5dp_main_full.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/drawable/shape_stroke_half_right_corner_15dp_white.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/layout/activity_container.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/layout/common_recycleview.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/layout/common_recycleview_refresh.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/layout/layout_empty.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 15 | 16 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/layout/layout_news_flipper.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 16 | 17 | 20 | 21 | 25 | 26 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/layout/layout_state_base.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/mipmap-xhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linxu-link/Fan/a974a11bfed99ad8bfa1019737e05ba0473f4e22/libraryarchitecture/src/main/res/mipmap-xhdpi/logo.png -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/mipmap-xxhdpi/icon_news.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linxu-link/Fan/a974a11bfed99ad8bfa1019737e05ba0473f4e22/libraryarchitecture/src/main/res/mipmap-xxhdpi/icon_news.png -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/mipmap-xxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linxu-link/Fan/a974a11bfed99ad8bfa1019737e05ba0473f4e22/libraryarchitecture/src/main/res/mipmap-xxhdpi/logo.png -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/mipmap-xxxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linxu-link/Fan/a974a11bfed99ad8bfa1019737e05ba0473f4e22/libraryarchitecture/src/main/res/mipmap-xxxhdpi/logo.png -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/values-v23/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 13 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ff6464 4 | #ffffff 5 | #ff6464 6 | 7 | 8 | #D3D3D3 9 | #F3F3F3 10 | #51CB7B 11 | #00FFFFFF 12 | #45000000 13 | #f5f5f5 14 | #d4d4d4 15 | #636363 16 | 17 | 18 | #000000 19 | #8a8a8a 20 | #333333 21 | #F76602 22 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 饭fan 3 | 4 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | 17 | 18 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /libraryarchitecture/src/main/res/xml/provider_paths.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 11 | -------------------------------------------------------------------------------- /libraryarchitecture/src/test/java/com/link/librarymodule/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.link.librarymodule; 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() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /librarybase/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /librarybase/libs/dom4j-2.1.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linxu-link/Fan/a974a11bfed99ad8bfa1019737e05ba0473f4e22/librarybase/libs/dom4j-2.1.1.jar -------------------------------------------------------------------------------- /librarybase/src/androidTest/java/com/link/librarybase/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.link.librarybase; 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() { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.link.librarybase.test", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /librarybase/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /librarybase/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | LibraryBase 3 | 4 | -------------------------------------------------------------------------------- /librarybase/src/test/java/com/link/librarybase/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.link.librarybase; 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() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /librarycomponent/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /librarycomponent/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply plugin: 'kotlin-android' 3 | apply plugin: 'kotlin-android-extensions' 4 | android { 5 | 6 | compileSdkVersion build_versions.compile_sdk 7 | 8 | defaultConfig libDefaultConfig 9 | 10 | compileOptions { 11 | targetCompatibility JavaVersion.VERSION_1_8 12 | sourceCompatibility JavaVersion.VERSION_1_8 13 | } 14 | 15 | } 16 | 17 | dependencies { 18 | api fileTree(dir: 'libs', include: ['*.jar']) 19 | api project(":libraryarchitecture") 20 | testImplementation 'junit:junit:4.12' 21 | } 22 | 23 | -------------------------------------------------------------------------------- /librarycomponent/src/androidTest/java/com/link/librarycomponent/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.link.librarycomponent; 2 | 3 | import android.content.Context; 4 | import androidx.test.InstrumentationRegistry; 5 | import androidx.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() { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.link.librarycomponet.test", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /librarycomponent/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /librarycomponent/src/main/java/com/link/librarycomponent/AppConfig.kt: -------------------------------------------------------------------------------- 1 | package com.link.librarycomponent 2 | 3 | open class AppConfig { 4 | 5 | companion object { 6 | 7 | val MAIN_MODULE = "com.link.component_main.MainApplication" 8 | val LOGIN_MODULE = "com.link.component_login.LoginApplication" 9 | val SPLASH_MODULE = "com.link.component_splash.SplashApplication" 10 | val USER_MODULE = "com.link.component_user.UserApplication" 11 | 12 | @JvmStatic 13 | val moduleApps = arrayOf(LOGIN_MODULE, SPLASH_MODULE, 14 | USER_MODULE, MAIN_MODULE) 15 | } 16 | 17 | } -------------------------------------------------------------------------------- /librarycomponent/src/main/java/com/link/librarycomponent/entity/base/BaseEntity.kt: -------------------------------------------------------------------------------- 1 | package com.link.librarycomponent.entity.base 2 | 3 | data class BaseEntity(val resultcode: String, val reason: String, 4 | val error_code: Int, var result: T) { 5 | 6 | } -------------------------------------------------------------------------------- /librarycomponent/src/main/java/com/link/librarycomponent/entity/user/UserEntity.kt: -------------------------------------------------------------------------------- 1 | package com.link.librarycomponent.entity.user 2 | 3 | import cn.bmob.v3.BmobInstallation 4 | import cn.bmob.v3.BmobUser 5 | import cn.bmob.v3.datatype.BmobFile 6 | 7 | 8 | class UserEntity : BmobUser() { 9 | 10 | 11 | var pwd: String? = null 12 | 13 | 14 | var avatar: BmobFile? = null 15 | 16 | 17 | var introduction: String? = null 18 | 19 | 20 | var displayName: String? = null 21 | 22 | 23 | var device: BmobInstallation? = null 24 | 25 | //用户使用的设备 26 | class Installation : BmobInstallation() { 27 | var deviceOS: String? = null 28 | } 29 | 30 | } -------------------------------------------------------------------------------- /librarycomponent/src/main/java/com/link/librarycomponent/router/RouterConstant.kt: -------------------------------------------------------------------------------- 1 | package com.link.librarycomponent.router 2 | 3 | class RouterConstant { 4 | 5 | companion object { 6 | //登录模块 7 | const val LOGIN = "/component_login/login" 8 | //入口 9 | const val APP = "/app/enter" 10 | //菜单 11 | const val MENU = "/component_menu/menu" 12 | //检索 13 | const val SEARCH = "/component_search/search" 14 | const val SEARCH_DETAIL = "/component_search/search_detail" 15 | //更新的service 16 | const val UPDATE_SERVICE = "/component_update/update_service" 17 | //商城 18 | const val SHOPPING="/component_shopping/shopping" 19 | //商城的service 20 | const val SHOPPING_SERVICE="/component_shopping/shopping_service" 21 | } 22 | 23 | } -------------------------------------------------------------------------------- /librarycomponent/src/main/java/com/link/librarycomponent/router/SchemaFilterActivity.kt: -------------------------------------------------------------------------------- 1 | package com.link.librarycomponent.router 2 | 3 | import android.os.Bundle 4 | import androidx.appcompat.app.AppCompatActivity 5 | import com.alibaba.android.arouter.launcher.ARouter 6 | 7 | /** 8 | * @author WJ 9 | * @date 2019-05-30 10 | * 11 | * 描述:监听Schame事件的activity 12 | */ 13 | class SchemaFilterActivity : AppCompatActivity() { 14 | 15 | override fun onCreate(savedInstanceState: Bundle?) { 16 | super.onCreate(savedInstanceState) 17 | val uri = intent.data 18 | ARouter.getInstance() 19 | .build(uri) 20 | .navigation() 21 | finish() 22 | } 23 | 24 | 25 | } -------------------------------------------------------------------------------- /librarycomponent/src/main/java/com/link/librarycomponent/router/StartRouter.kt: -------------------------------------------------------------------------------- 1 | package com.link.librarycomponent.router 2 | 3 | import android.os.Bundle 4 | import com.alibaba.android.arouter.launcher.ARouter 5 | 6 | class StartRouter { 7 | 8 | companion object { 9 | 10 | @JvmStatic 11 | fun navigation(url: String) { 12 | ARouter.getInstance() 13 | .build(url) 14 | .navigation() 15 | } 16 | 17 | @JvmStatic 18 | fun navigation(url: String, bundle: Bundle) { 19 | ARouter.getInstance() 20 | .build(url) 21 | .with(bundle) 22 | .navigation() 23 | } 24 | } 25 | 26 | } -------------------------------------------------------------------------------- /librarycomponent/src/main/java/com/link/librarycomponent/service/login/EmptyLoginService.kt: -------------------------------------------------------------------------------- 1 | package com.link.librarycomponent.service.login 2 | 3 | class EmptyLoginService : ILoginService { 4 | override fun isLogin(): Boolean { 5 | return false 6 | } 7 | } -------------------------------------------------------------------------------- /librarycomponent/src/main/java/com/link/librarycomponent/service/login/ILoginService.kt: -------------------------------------------------------------------------------- 1 | package com.link.librarycomponent.service.login 2 | 3 | interface ILoginService { 4 | fun isLogin():Boolean 5 | } -------------------------------------------------------------------------------- /librarycomponent/src/main/java/com/link/librarycomponent/service/main/EmptyMainService.kt: -------------------------------------------------------------------------------- 1 | package com.link.librarycomponent.service.main 2 | 3 | import android.os.Bundle 4 | import androidx.fragment.app.Fragment 5 | 6 | class EmptyMainService : IMainService { 7 | 8 | override fun newCatalogFragment(bundle: Bundle?): Fragment? { 9 | return null 10 | } 11 | 12 | override fun newFindFragment(bundle: Bundle?): Fragment? { 13 | return null 14 | } 15 | 16 | override fun newMainFragment(bundle: Bundle?): Fragment? { 17 | return null 18 | } 19 | } -------------------------------------------------------------------------------- /librarycomponent/src/main/java/com/link/librarycomponent/service/main/IMainService.kt: -------------------------------------------------------------------------------- 1 | package com.link.librarycomponent.service.main 2 | 3 | import android.os.Bundle 4 | import androidx.fragment.app.Fragment 5 | 6 | interface IMainService { 7 | 8 | fun newMainFragment(bundle: Bundle?):Fragment? 9 | fun newCatalogFragment(bundle: Bundle?):Fragment? 10 | fun newFindFragment(bundle: Bundle?):Fragment? 11 | 12 | } -------------------------------------------------------------------------------- /librarycomponent/src/main/java/com/link/librarycomponent/service/shopping/IShoppingService.kt: -------------------------------------------------------------------------------- 1 | package com.link.librarycomponent.service.shopping 2 | 3 | import com.alibaba.android.arouter.facade.template.IProvider 4 | 5 | interface IShoppingService:IProvider { 6 | 7 | fun startShoppingService() 8 | } -------------------------------------------------------------------------------- /librarycomponent/src/main/java/com/link/librarycomponent/service/update/IUpdateService.kt: -------------------------------------------------------------------------------- 1 | package com.link.librarycomponent.service.update 2 | 3 | import com.alibaba.android.arouter.facade.template.IProvider 4 | 5 | interface IUpdateService:IProvider { 6 | 7 | fun startUpdateService() 8 | 9 | } -------------------------------------------------------------------------------- /librarycomponent/src/main/java/com/link/librarycomponent/service/user/EmptyUserService.kt: -------------------------------------------------------------------------------- 1 | package com.link.librarycomponent.service.user 2 | 3 | import android.os.Bundle 4 | import androidx.fragment.app.Fragment 5 | 6 | class EmptyUserService :IUserService{ 7 | 8 | 9 | override fun newUserFragment(bundle: Bundle?): Fragment? { 10 | return null 11 | } 12 | 13 | 14 | } -------------------------------------------------------------------------------- /librarycomponent/src/main/java/com/link/librarycomponent/service/user/IUserService.kt: -------------------------------------------------------------------------------- 1 | package com.link.librarycomponent.service.user 2 | 3 | import android.os.Bundle 4 | import androidx.fragment.app.Fragment 5 | 6 | interface IUserService { 7 | 8 | fun newUserFragment(bundle: Bundle?):Fragment? 9 | 10 | } -------------------------------------------------------------------------------- /librarycomponent/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | LibraryComponet 3 | 4 | -------------------------------------------------------------------------------- /librarycomponent/src/test/java/com/link/librarycomponent/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.link.librarycomponent; 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() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | //include ':view_flip', ':general_statelayout', ':general_daemon','view_common',':general_network',':general_picture' 2 | include ':librarybase' 3 | include ':libraryarchitecture', ':librarycomponent' 4 | 5 | include ':component_login' 6 | include ':component_main' 7 | include ':component_search' 8 | include ':component_user' 9 | include ':component_menu' 10 | include ':component_update' 11 | include ':component_pay',':component_shopping' 12 | include ':app' 13 | -------------------------------------------------------------------------------- /view_common/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /view_common/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply plugin: 'kotlin-android' 3 | apply plugin: 'kotlin-android-extensions' 4 | apply plugin: 'kotlin-kapt' 5 | apply from: '../maven_push.gradle' 6 | 7 | android { 8 | 9 | compileSdkVersion build_versions.compile_sdk 10 | 11 | defaultConfig libDefaultConfig 12 | 13 | compileOptions { 14 | targetCompatibility JavaVersion.VERSION_1_8 15 | sourceCompatibility JavaVersion.VERSION_1_8 16 | } 17 | 18 | } 19 | 20 | dependencies { 21 | implementation fileTree(dir: 'libs', include: ['*.jar']) 22 | implementation deps.androidx.appcompat 23 | testImplementation 'junit:junit:4.12' 24 | } 25 | -------------------------------------------------------------------------------- /view_common/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536m 2 | 3 | RELEASE_URL=http://119.3.215.243:9882/repository/fan-releases/ 4 | SNAPSHOT_URL=http://119.3.215.243:9882/repository/fan-snapshot/ 5 | NAME=public 6 | PASSWORD=123456@qq.com 7 | VERSION=1.0.0 8 | POM_ARTIFACT_ID=viewCommon 9 | GROUP=com.link -------------------------------------------------------------------------------- /view_common/src/androidTest/java/com/link/view_common/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.link.view_common; 2 | 3 | import android.content.Context; 4 | 5 | import androidx.test.InstrumentationRegistry; 6 | import androidx.test.runner.AndroidJUnit4; 7 | 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | 11 | import static org.junit.Assert.*; 12 | 13 | /** 14 | * Instrumented test, which will execute on an Android device. 15 | * 16 | * @see Testing documentation 17 | */ 18 | @RunWith(AndroidJUnit4.class) 19 | public class ExampleInstrumentedTest { 20 | @Test 21 | public void useAppContext() { 22 | // Context of the app under test. 23 | Context appContext = InstrumentationRegistry.getTargetContext(); 24 | 25 | assertEquals("com.link.view_common.test", appContext.getPackageName()); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /view_common/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /view_common/src/main/java/com/link/view_common/like/LikeViewAnimation.kt: -------------------------------------------------------------------------------- 1 | package com.link.view_common.like 2 | 3 | import android.widget.PopupWindow 4 | 5 | class LikeViewAnimation : PopupWindow() { 6 | 7 | 8 | 9 | } -------------------------------------------------------------------------------- /view_common/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /view_common/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | View_Common 3 | 4 | -------------------------------------------------------------------------------- /view_common/src/test/java/com/link/view_common/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.link.view_common; 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() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /view_flip/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /view_flip/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply plugin: 'kotlin-android' 3 | apply plugin: 'kotlin-android-extensions' 4 | apply plugin: 'kotlin-kapt' 5 | apply from: '../maven_push.gradle' 6 | 7 | android { 8 | 9 | compileSdkVersion build_versions.compile_sdk 10 | 11 | defaultConfig libDefaultConfig 12 | 13 | compileOptions { 14 | targetCompatibility JavaVersion.VERSION_1_8 15 | sourceCompatibility JavaVersion.VERSION_1_8 16 | } 17 | 18 | } 19 | 20 | dependencies { 21 | implementation fileTree(dir: 'libs', include: ['*.jar']) 22 | implementation deps.androidx.appcompat 23 | testImplementation 'junit:junit:4.12' 24 | } 25 | -------------------------------------------------------------------------------- /view_flip/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536m 2 | 3 | RELEASE_URL=http://119.3.215.243:9882/repository/fan-releases/ 4 | SNAPSHOT_URL=http://119.3.215.243:9882/repository/fan-snapshot/ 5 | NAME=public 6 | PASSWORD=123456@qq.com 7 | VERSION=1.0.0 8 | POM_ARTIFACT_ID=filpView 9 | GROUP=com.link -------------------------------------------------------------------------------- /view_flip/src/androidTest/java/com/link/libraryflipview/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.link.libraryflipview; 2 | 3 | import android.content.Context; 4 | 5 | import androidx.test.InstrumentationRegistry; 6 | import androidx.test.runner.AndroidJUnit4; 7 | 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | 11 | import static org.junit.Assert.*; 12 | 13 | /** 14 | * Instrumented test, which will execute on an Android device. 15 | * 16 | * @see Testing documentation 17 | */ 18 | @RunWith(AndroidJUnit4.class) 19 | public class ExampleInstrumentedTest { 20 | @Test 21 | public void useAppContext() { 22 | // Context of the app under test. 23 | Context appContext = InstrumentationRegistry.getTargetContext(); 24 | 25 | assertEquals("com.link.libraryflipview.test", appContext.getPackageName()); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /view_flip/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /view_flip/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /view_flip/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | LibraryFlipView 3 | 4 | -------------------------------------------------------------------------------- /view_flip/src/test/java/com/link/libraryflipview/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.link.libraryflipview; 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() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } --------------------------------------------------------------------------------