├── .gitignore ├── README.md ├── SumTea.jks ├── SumTea_Android.apk ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── sum │ │ └── tea │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── sum │ │ │ └── tea │ │ │ ├── SumApplication.kt │ │ │ └── task │ │ │ └── StartTasks.kt │ └── res │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ │ ├── values-night │ │ └── themes.xml │ │ ├── values-v21 │ │ └── themes.xml │ │ ├── values-v26 │ │ └── themes.xml │ │ ├── values-v27 │ │ └── themes.xml │ │ ├── values │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── themes.xml │ │ └── xml │ │ ├── backup_rules.xml │ │ ├── data_extraction_rules.xml │ │ ├── file_paths.xml │ │ └── network_security_config.xml │ └── test │ └── java │ └── com │ └── sum │ └── tea │ └── ExampleUnitTest.kt ├── build.gradle ├── config.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── lib_banner ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── sum │ │ └── banner │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── sum │ │ │ └── banner │ │ │ ├── BannerViewPager.kt │ │ │ ├── annotation │ │ │ ├── AIndicatorGravity.kt │ │ │ ├── AIndicatorOrientation.kt │ │ │ ├── AIndicatorSlideMode.kt │ │ │ ├── AIndicatorStyle.kt │ │ │ ├── APageStyle.kt │ │ │ └── Visibility.kt │ │ │ ├── base │ │ │ ├── BaseBannerAdapter.kt │ │ │ ├── BaseDrawer.kt │ │ │ ├── BaseIndicatorView.kt │ │ │ └── BaseViewHolder.kt │ │ │ ├── controller │ │ │ ├── AttributeController.kt │ │ │ └── AttrsController.kt │ │ │ ├── drawer │ │ │ ├── CircleDrawer.kt │ │ │ ├── DashDrawer.kt │ │ │ ├── DrawerFactory.kt │ │ │ ├── DrawerProxy.kt │ │ │ ├── IDrawer.kt │ │ │ ├── RectDrawer.kt │ │ │ └── RoundRectDrawer.kt │ │ │ ├── indicator │ │ │ ├── DrawableIndicator.kt │ │ │ ├── IIndicator.kt │ │ │ └── IndicatorView.kt │ │ │ ├── manager │ │ │ ├── BannerManager.kt │ │ │ ├── ReflectLayoutManager.kt │ │ │ └── ScrollDurationManger.kt │ │ │ ├── mode │ │ │ ├── IndicatorGravity.kt │ │ │ ├── IndicatorOrientation.kt │ │ │ ├── IndicatorSlideMode.kt │ │ │ ├── IndicatorStyle.kt │ │ │ └── PageStyle.kt │ │ │ ├── options │ │ │ ├── BannerOptions.kt │ │ │ └── IndicatorOptions.kt │ │ │ ├── transform │ │ │ ├── OverlapPageTransformer.kt │ │ │ └── ScaleInTransformer.kt │ │ │ └── utils │ │ │ ├── BannerUtils.kt │ │ │ └── IndicatorUtils.kt │ └── res │ │ └── values │ │ └── attrs.xml │ └── test │ └── java │ └── com │ └── sum │ └── banner │ └── ExampleUnitTest.kt ├── lib_common ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── sum │ │ └── common │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── sum │ │ │ └── common │ │ │ ├── banner │ │ │ └── BannerImageViewPager.kt │ │ │ ├── constant │ │ │ ├── ARouterPath.kt │ │ │ ├── Constant.kt │ │ │ └── IntentKey.kt │ │ │ ├── dialog │ │ │ └── MessageDialog.kt │ │ │ ├── holder │ │ │ └── BannerImageHolder.kt │ │ │ ├── manager │ │ │ └── FileManager.kt │ │ │ ├── model │ │ │ ├── ArticleInfo.kt │ │ │ ├── Banner.kt │ │ │ ├── CategoryItem.kt │ │ │ ├── HomeInfo.kt │ │ │ ├── ProjectTabItem.kt │ │ │ ├── SearchInfo.kt │ │ │ ├── Student.kt │ │ │ ├── SystemInfo.kt │ │ │ └── UserInfo.kt │ │ │ ├── provider │ │ │ ├── LoginServiceProvider.kt │ │ │ ├── MainServiceProvider.kt │ │ │ ├── SearchServiceProvider.kt │ │ │ └── UserServiceProvider.kt │ │ │ ├── service │ │ │ ├── ILoginService.kt │ │ │ ├── IMainService.kt │ │ │ ├── ISearchService.kt │ │ │ └── IUserService.kt │ │ │ └── view │ │ │ ├── EmptyDataView.kt │ │ │ ├── NestedScrollableHost.kt │ │ │ ├── TitleBar.kt │ │ │ └── VideoImageView.kt │ └── res │ │ ├── drawable │ │ ├── dialog_message_left_button.xml │ │ ├── dialog_message_one_button.xml │ │ ├── dialog_message_right_button.xml │ │ ├── ic_back.xml │ │ ├── selector_collect.xml │ │ ├── selector_collect_new.xml │ │ ├── shape_ffffff_radius10.xml │ │ ├── shape_ffffff_radius2.xml │ │ └── shape_tab_indicator.xml │ │ ├── layout │ │ ├── dialog_message.xml │ │ ├── layout_normal_recyclerview.xml │ │ ├── layout_title_bar.xml │ │ └── view_empty_data.xml │ │ ├── mipmap-xhdpi │ │ ├── ic_collect_normal.webp │ │ ├── ic_collect_selected.webp │ │ └── ic_search.webp │ │ ├── mipmap-xxhdpi │ │ ├── ic_collect_normal.webp │ │ ├── ic_collect_normal_new.webp │ │ ├── ic_collect_selected.webp │ │ ├── ic_collect_selected_new.webp │ │ ├── ic_data_empty.webp │ │ ├── ic_next.webp │ │ └── ic_search.webp │ │ └── values │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── themes.xml │ └── test │ └── java │ └── com │ └── sum │ └── common │ └── ExampleUnitTest.kt ├── lib_framework ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── sum │ │ └── framework │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── sum │ │ │ └── framework │ │ │ ├── adapter │ │ │ ├── BaseMultiItemAdapter.kt │ │ │ ├── BaseRecyclerViewAdapter.kt │ │ │ ├── BaseViewHolder.kt │ │ │ └── ViewPage2FragmentAdapter.kt │ │ │ ├── base │ │ │ ├── BaseActivity.kt │ │ │ ├── BaseDataBindActivity.kt │ │ │ ├── BaseDataBindFragment.kt │ │ │ ├── BaseDialog.kt │ │ │ ├── BaseDialogFragment.kt │ │ │ ├── BaseFragment.kt │ │ │ ├── BaseMvvmActivity.kt │ │ │ ├── BaseMvvmFragment.kt │ │ │ ├── BaseViewHolder.kt │ │ │ └── BaseWebView.kt │ │ │ ├── decoration │ │ │ ├── NormalItemDecoration.kt │ │ │ ├── StaggeredItemDecoration.kt │ │ │ └── SumDividerItemDecoration.kt │ │ │ ├── ext │ │ │ ├── AnyExt.kt │ │ │ ├── EditTtextExt.kt │ │ │ ├── FlowExt.kt │ │ │ ├── GsonExt.kt │ │ │ ├── RecyclerViewExt.kt │ │ │ ├── ResourcesExt.kt │ │ │ ├── SpanExt.kt │ │ │ ├── TextViewExt.kt │ │ │ ├── TimeExt.kt │ │ │ └── ViewExt.kt │ │ │ ├── helper │ │ │ └── SumAppHelper.kt │ │ │ ├── interfaces │ │ │ └── MultiItemEntity.kt │ │ │ ├── loading │ │ │ ├── CenterLoadingView.kt │ │ │ └── CustomRefreshHeader.java │ │ │ ├── log │ │ │ ├── LogUtil.kt │ │ │ └── XLogger.kt │ │ │ ├── manager │ │ │ ├── ActivityManager.kt │ │ │ ├── AppFrontBack.kt │ │ │ └── AppManager.kt │ │ │ ├── toast │ │ │ └── TipsToast.kt │ │ │ ├── utils │ │ │ ├── AppExecutors.kt │ │ │ ├── AppExit.kt │ │ │ ├── DeviceInfoUtils.kt │ │ │ ├── LoadingUtils.kt │ │ │ ├── NetworkUtil.kt │ │ │ ├── OSUtils.kt │ │ │ ├── ResUtils.kt │ │ │ ├── SPUtils.java │ │ │ ├── StatusBarSettingHelper.kt │ │ │ ├── StatusBarUtil.kt │ │ │ ├── ViewUtils.kt │ │ │ └── dpToPx.kt │ │ │ └── weights │ │ │ └── ClearEditText.kt │ └── res │ │ ├── anim │ │ ├── dialog_bottom_in.xml │ │ ├── dialog_bottom_out.xml │ │ ├── dialog_ios_in.xml │ │ ├── dialog_ios_out.xml │ │ ├── dialog_left_in.xml │ │ ├── dialog_left_out.xml │ │ ├── dialog_right_in.xml │ │ ├── dialog_right_out.xml │ │ ├── dialog_scale_in.xml │ │ ├── dialog_scale_out.xml │ │ ├── dialog_top_in.xml │ │ └── dialog_top_out.xml │ │ ├── drawable │ │ ├── animation_loading_header.xml │ │ ├── dialog_loading_bg.xml │ │ └── tip_toast_bg_conner_4.xml │ │ ├── layout │ │ ├── dialog_loading.xml │ │ ├── layout_loading_header.xml │ │ └── widget_tips_toast.xml │ │ ├── mipmap-xhdpi-v4 │ │ ├── widget_toast_success.webp │ │ └── widget_toast_warning.webp │ │ ├── mipmap-xhdpi │ │ ├── ic_delete.webp │ │ └── ic_delete_gray.webp │ │ ├── mipmap-xxhdpi │ │ ├── bg_mine_head.webp │ │ ├── bg_refresh_header1.webp │ │ ├── bg_refresh_header2.webp │ │ ├── ic_delete.webp │ │ └── ic_loading.webp │ │ ├── mipmap-xxxhdpi │ │ ├── widget_toast_success.webp │ │ └── widget_toast_warning.webp │ │ └── values │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── ids.xml │ │ ├── strings.xml │ │ └── themes.xml │ └── test │ └── java │ └── com │ └── sum │ └── framework │ └── ExampleUnitTest.kt ├── lib_glide ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── sum │ │ └── glide │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── sum │ │ │ └── glide │ │ │ ├── GlideApp.kt │ │ │ ├── blur │ │ │ ├── FastBlur.java │ │ │ └── RSBlur.kt │ │ │ └── transformation │ │ │ ├── BitmapTransformation.java │ │ │ ├── BlurTransformation.kt │ │ │ └── CircleBorderTransform.kt │ └── res │ │ └── mipmap-xxhdpi │ │ ├── default_head.png │ │ └── default_img.png │ └── test │ └── java │ └── com │ └── sum │ └── glide │ └── ExampleUnitTest.kt ├── lib_network ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── sum │ │ └── network │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ └── java │ │ └── com │ │ └── sum │ │ └── network │ │ ├── api │ │ └── ApiInterface.kt │ │ ├── callback │ │ └── IApiErrorCallback.kt │ │ ├── constant │ │ └── HttpConstant.kt │ │ ├── error │ │ ├── ApiException.kt │ │ ├── ERROR.kt │ │ └── ExceptionHandler.kt │ │ ├── flow │ │ └── FlowExt.kt │ │ ├── interceptor │ │ ├── CookiesInterceptor.kt │ │ ├── HeaderInterceptor.kt │ │ └── PublicParameterInterceptor.kt │ │ ├── manager │ │ ├── ApiManager.kt │ │ ├── CookiesManager.kt │ │ └── HttpManager.kt │ │ ├── repository │ │ └── BaseRepository.kt │ │ ├── response │ │ └── BaseResponse.kt │ │ └── viewmodel │ │ └── BaseViewModel.kt │ └── test │ └── java │ └── com │ └── sum │ └── network │ └── ExampleUnitTest.kt ├── lib_room ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── sum │ │ └── room │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ └── java │ │ └── com │ │ └── sum │ │ └── room │ │ ├── dao │ │ └── VideoListCacheDao.kt │ │ ├── database │ │ └── SumDataBase.kt │ │ ├── entity │ │ └── VideoInfo.kt │ │ └── manager │ │ └── VideoCacheManager.kt │ └── test │ └── java │ └── com │ └── sum │ └── room │ └── ExampleUnitTest.kt ├── lib_stater ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── sum │ │ └── stater │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ └── java │ │ └── com │ │ └── sum │ │ └── stater │ │ ├── TaskStat.kt │ │ ├── TaskStatBean.kt │ │ ├── dispatcher │ │ ├── DelayInitDispatcher.kt │ │ └── TaskDispatcher.kt │ │ ├── sort │ │ ├── DirectionGraph.kt │ │ └── TaskSortUtil.kt │ │ ├── task │ │ ├── DispatchRunnable.kt │ │ ├── ITask.kt │ │ └── Task.kt │ │ └── utils │ │ ├── DispatcherExecutor.kt │ │ ├── DispatcherLog.kt │ │ ├── LaunchTimer.kt │ │ └── StaterUtils.kt │ └── test │ └── java │ └── com │ └── sum │ └── stater │ └── ExampleUnitTest.kt ├── mod_demo ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── sum │ │ └── demo │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── sum │ │ │ └── demo │ │ │ ├── lifecycle │ │ │ ├── DemoLifecycleActivity.kt │ │ │ └── LifecycleInterface.kt │ │ │ ├── livedata │ │ │ ├── DemoLiveDataActivity.kt │ │ │ ├── LiveDataBus.kt │ │ │ ├── LiveDataViewModel.kt │ │ │ ├── StickyLiveData.kt │ │ │ └── StickyObserver.kt │ │ │ ├── navigation │ │ │ ├── DemoNavigationActivity.kt │ │ │ ├── MainFragment.kt │ │ │ ├── NavActivity.kt │ │ │ ├── NavDialog.kt │ │ │ └── NavFragment.kt │ │ │ ├── viewbinding │ │ │ ├── BindingAdapterExt.kt │ │ │ ├── DataBindingActivity.kt │ │ │ └── ViewBindingActivity.kt │ │ │ └── viewmodel │ │ │ ├── DemoViewModelActivity.kt │ │ │ ├── MainViewModel.kt │ │ │ ├── UserFragment.kt │ │ │ └── VideoFragment.kt │ └── res │ │ ├── layout │ │ ├── activity_data_binding.xml │ │ ├── activity_lifecycle.xml │ │ ├── activity_livedata.xml │ │ ├── activity_nav.xml │ │ ├── activity_navigation.xml │ │ ├── activity_view_binding.xml │ │ ├── activity_viewmodel.xml │ │ ├── dialog_nav.xml │ │ ├── fragment_main.xml │ │ ├── fragment_nav.xml │ │ ├── fragment_viewmodel_video.xml │ │ ├── layout_binding_include.xml │ │ └── layout_binding_viewstub.xml │ │ ├── navigation │ │ └── demo_navigation.xml │ │ └── values │ │ ├── strings.xml │ │ └── themes.xml │ └── test │ └── java │ └── com │ └── sum │ └── demo │ └── ExampleUnitTest.kt ├── mod_login ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── sum │ │ └── login │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ ├── debug │ │ └── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── sum │ │ │ └── login │ │ │ ├── login │ │ │ ├── LoginActivity.kt │ │ │ ├── LoginRepository.kt │ │ │ └── LoginViewModel.kt │ │ │ ├── policy │ │ │ └── PrivacyPolicyActivity.kt │ │ │ ├── register │ │ │ └── RegisterActivity.kt │ │ │ └── service │ │ │ └── LoginService.kt │ └── res │ │ ├── drawable │ │ ├── checkbox_bg_default.xml │ │ └── login_phone_selector.xml │ │ ├── layout │ │ ├── activity_login.xml │ │ ├── activity_privacy_policy.xml │ │ └── activity_register.xml │ │ ├── mipmap-xhdpi │ │ ├── ic_agreement_default.webp │ │ └── ic_agreement_select.webp │ │ ├── mipmap-xxhdpi │ │ ├── ic_agreement_default.webp │ │ ├── ic_agreement_select.webp │ │ ├── ic_psw_invisible.webp │ │ ├── ic_psw_visible.webp │ │ ├── ic_qq.webp │ │ ├── ic_wechat.webp │ │ └── ic_weibo.webp │ │ └── values │ │ └── strings.xml │ └── test │ └── java │ └── com │ └── sum │ └── login │ └── ExampleUnitTest.kt ├── mod_main ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── sum │ │ └── main │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ ├── assets │ │ └── video_list.json │ ├── java │ │ └── com │ │ │ └── sum │ │ │ └── main │ │ │ ├── MainActivity.kt │ │ │ ├── aop │ │ │ └── SumOptAop.kt │ │ │ ├── banner │ │ │ ├── HomeBannerAdapter.kt │ │ │ └── HomeBannerView.kt │ │ │ ├── navigator │ │ │ ├── SumFragmentNavigator.kt │ │ │ ├── WindowFrameLayout.kt │ │ │ └── WindowNavHostFragment.kt │ │ │ ├── repository │ │ │ └── HomeRepository.kt │ │ │ ├── service │ │ │ └── MainService.kt │ │ │ ├── ui │ │ │ ├── ArticleDetailActivity.kt │ │ │ ├── ImagePreviewActivity.kt │ │ │ ├── SplashActivity.kt │ │ │ ├── category │ │ │ │ ├── CategoryFragment.kt │ │ │ │ ├── CategorySecondFragment.kt │ │ │ │ ├── adapter │ │ │ │ │ ├── CategorySecondItemAdapter.kt │ │ │ │ │ └── CategoryTabAdapter.kt │ │ │ │ └── viewmodel │ │ │ │ │ └── CategoryViewModel.kt │ │ │ ├── home │ │ │ │ ├── HomeFragment.kt │ │ │ │ ├── HomeTabFragment.kt │ │ │ │ ├── HomeVideoFragment.kt │ │ │ │ ├── adapter │ │ │ │ │ ├── HomeTabItemAdapter.kt │ │ │ │ │ └── HomeVideoItemAdapter.kt │ │ │ │ └── viewmodel │ │ │ │ │ └── HomeViewModel.kt │ │ │ ├── mine │ │ │ │ ├── MineFragment.kt │ │ │ │ └── viewmodel │ │ │ │ │ └── MineViewModel.kt │ │ │ └── system │ │ │ │ ├── ArticleListFragment.kt │ │ │ │ ├── ArticleTabActivity.kt │ │ │ │ ├── SystemFragment.kt │ │ │ │ ├── adapter │ │ │ │ ├── ArticleAdapter.kt │ │ │ │ ├── SystemAdapter.kt │ │ │ │ └── SystemSecondAdapter.kt │ │ │ │ └── viewmodel │ │ │ │ ├── ArticleListViewModel.kt │ │ │ │ └── SystemViewModel.kt │ │ │ └── utils │ │ │ ├── ImageUtil.kt │ │ │ └── ParseFileUtils.kt │ └── res │ │ ├── color │ │ └── selector_tab_color.xml │ │ ├── drawable │ │ ├── bg_skip_btn.xml │ │ ├── ic_dashboard_black_24dp.xml │ │ ├── ic_home_black_24dp.xml │ │ ├── ic_notifications_black_24dp.xml │ │ └── selector_tab_home.xml │ │ ├── layout │ │ ├── activity_article.xml │ │ ├── activity_article_detail.xml │ │ ├── activity_image_preview.xml │ │ ├── activity_main.xml │ │ ├── activity_splash.xml │ │ ├── fragment_article_list.xml │ │ ├── fragment_category.xml │ │ ├── fragment_category_second.xml │ │ ├── fragment_home.xml │ │ ├── fragment_home_video.xml │ │ ├── fragment_mine.xml │ │ ├── fragment_mine_head.xml │ │ ├── fragment_system.xml │ │ ├── layout_article_item.xml │ │ ├── layout_category_second_item.xml │ │ ├── layout_category_tab_item.xml │ │ ├── layout_home_tab_item.xml │ │ ├── layout_home_video_item.xml │ │ ├── layout_system_item.xml │ │ └── layout_system_second_item.xml │ │ ├── menu │ │ └── bottom_nav_menu.xml │ │ ├── mipmap-xhdpi │ │ ├── ic_mine_help.webp │ │ ├── ic_mine_message.webp │ │ ├── ic_mine_work.webp │ │ ├── ic_navi_cart.webp │ │ ├── ic_navi_cart_select.webp │ │ ├── ic_navi_categories.webp │ │ ├── ic_navi_categories_select.webp │ │ ├── ic_navi_find.webp │ │ ├── ic_navi_find_select.png │ │ ├── ic_navi_home.webp │ │ ├── ic_navi_home_select.webp │ │ ├── ic_navi_home_select_big.webp │ │ ├── ic_navi_home_select_scroll_top.webp │ │ ├── ic_navi_mine.webp │ │ ├── ic_navi_mine_select.webp │ │ ├── mine_address_ico.webp │ │ ├── mine_cart.webp │ │ ├── mine_comment_lab.webp │ │ ├── mine_consign_earnings.webp │ │ ├── mine_consign_plan.webp │ │ ├── mine_consign_sale.webp │ │ ├── mine_coupon_ico.webp │ │ ├── mine_exp_ico.webp │ │ ├── mine_reduced_amount.webp │ │ ├── mine_sale_center.webp │ │ ├── mine_service_ico.webp │ │ ├── mine_setting_ico.webp │ │ ├── mine_unpay_ico.webp │ │ ├── shadow_video_bottom.webp │ │ └── shadow_video_top.webp │ │ ├── mipmap-xxhdpi │ │ ├── bg_welcome.webp │ │ ├── ic_mine_help.webp │ │ ├── ic_mine_message.webp │ │ ├── ic_mine_work.webp │ │ ├── ic_navi_cart.webp │ │ ├── ic_navi_cart_select.webp │ │ ├── ic_navi_categories.webp │ │ ├── ic_navi_categories_select.webp │ │ ├── ic_navi_find.webp │ │ ├── ic_navi_find_select.webp │ │ ├── ic_navi_home.webp │ │ ├── ic_navi_home_select.webp │ │ ├── ic_navi_home_select_big.webp │ │ ├── ic_navi_home_select_scroll_top.webp │ │ ├── ic_navi_mine.webp │ │ ├── ic_navi_mine_select.webp │ │ ├── mine_address_ico.webp │ │ ├── mine_cart.webp │ │ ├── mine_collect_ico.webp │ │ ├── mine_comment_lab.webp │ │ ├── mine_consign_earnings.webp │ │ ├── mine_consign_plan.webp │ │ ├── mine_consign_sale.webp │ │ ├── mine_coupon_ico.webp │ │ ├── mine_exp_ico.webp │ │ ├── mine_reduced_amount.webp │ │ ├── mine_sale_center.webp │ │ ├── mine_service_ico.webp │ │ ├── mine_setting_ico.webp │ │ ├── mine_unpay_ico.webp │ │ ├── shadow_video_bottom.webp │ │ └── shadow_video_top.webp │ │ ├── navigation │ │ └── mobile_navigation.xml │ │ ├── values-night │ │ └── themes.xml │ │ ├── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── themes.xml │ │ └── xml │ │ ├── backup_rules.xml │ │ └── data_extraction_rules.xml │ └── test │ └── java │ └── com │ └── sum │ └── main │ └── ExampleUnitTest.kt ├── mod_search ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── sum │ │ └── search │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── sum │ │ │ └── search │ │ │ ├── SearchRepository.kt │ │ │ ├── SearchResultAdapter.kt │ │ │ ├── activity │ │ │ └── SearchActivity.kt │ │ │ ├── manager │ │ │ └── SearchManager.kt │ │ │ ├── service │ │ │ └── SearchService.kt │ │ │ ├── view │ │ │ └── SearchHistoryView.kt │ │ │ └── viewmodel │ │ │ └── SearchViewModel.kt │ └── res │ │ ├── layout │ │ ├── activity_search.xml │ │ ├── layout_history_search.xml │ │ ├── layout_history_search_chip_item.xml │ │ └── layout_search_result_item.xml │ │ ├── mipmap-xhdpi │ │ └── ic_gary_search.webp │ │ ├── mipmap-xxhdpi │ │ ├── ic_delete.webp │ │ ├── ic_gary_search.webp │ │ └── ic_search_empty.webp │ │ └── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── themes.xml │ └── test │ └── java │ └── com │ └── sum │ └── search │ └── ExampleUnitTest.kt ├── mod_user ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── sum │ │ └── user │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── sum │ │ │ └── user │ │ │ ├── about │ │ │ └── AboutUsActivity.kt │ │ │ ├── collection │ │ │ ├── MyCollectListAdapter.kt │ │ │ ├── MyCollectViewModel.kt │ │ │ └── MyCollectionActivity.kt │ │ │ ├── dialog │ │ │ ├── ChoosePhotoDialog.kt │ │ │ ├── ChooseSexDialog.kt │ │ │ ├── LogoutTipsDialog.kt │ │ │ └── SelectBirthdayDialog.kt │ │ │ ├── info │ │ │ └── UserInfoActivity.kt │ │ │ ├── manager │ │ │ └── UserManager.kt │ │ │ ├── service │ │ │ └── UserService.kt │ │ │ └── setting │ │ │ └── SettingActivity.kt │ └── res │ │ ├── drawable │ │ └── bg_ffffff_corner12.xml │ │ ├── layout │ │ ├── activity_about_us.xml │ │ ├── activity_my_collect_list.xml │ │ ├── activity_setting.xml │ │ ├── activity_user_info.xml │ │ ├── dialog_logout.xml │ │ ├── dialog_photo_choose.xml │ │ ├── dialog_picker_calendar.xml │ │ ├── dialog_sex_choose.xml │ │ └── layout_my_collect_item.xml │ │ ├── mipmap-xxhdpi │ │ └── wechat.webp │ │ └── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── themes.xml │ └── test │ └── java │ └── com │ └── sum │ └── user │ └── ExampleUnitTest.kt ├── mod_video ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── sum │ │ └── mod_video │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── sum │ │ │ └── video │ │ │ ├── VideoPlayActivity.kt │ │ │ ├── adapter │ │ │ └── VideoAdapter.kt │ │ │ ├── animatorpath │ │ │ ├── AnimatorPath.kt │ │ │ ├── PathEvaluator.kt │ │ │ └── PathPoint.kt │ │ │ ├── listener │ │ │ └── OnViewPagerListener.kt │ │ │ ├── manager │ │ │ └── PagerLayoutManager.kt │ │ │ └── view │ │ │ └── RotateNoteView.kt │ └── res │ │ ├── drawable │ │ └── bg_white_80ffffff_radius30.xml │ │ ├── layout │ │ ├── activity_video_play.xml │ │ ├── include_video_action.xml │ │ ├── layout_rotate_note_view.xml │ │ └── layout_video_item.xml │ │ ├── mipmap-xxhdpi │ │ ├── default_video_head.webp │ │ ├── ic_gray_back.webp │ │ ├── ic_head_record.webp │ │ ├── ic_heart.webp │ │ ├── ic_message.webp │ │ ├── ic_music_one.webp │ │ ├── ic_music_two.webp │ │ ├── ic_share.webp │ │ ├── ic_video_comment_publish.webp │ │ ├── ic_video_play.webp │ │ ├── shadow_list_bottom.webp │ │ └── shadow_list_top.webp │ │ └── values │ │ ├── colors.xml │ │ └── strings.xml │ └── test │ └── java │ └── com │ └── sum │ └── video │ └── ExampleUnitTest.kt ├── other ├── st_category.webp ├── st_category_system.gif ├── st_home.webp ├── st_login.gif ├── st_mine.webp ├── st_search.gif ├── st_system.webp └── st_video.gif └── settings.gradle /.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 | .idea/ 11 | .DS_Store 12 | /build 13 | /captures 14 | .externalNativeBuild 15 | .cxx 16 | local.properties -------------------------------------------------------------------------------- /SumTea.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/SumTea.jks -------------------------------------------------------------------------------- /SumTea_Android.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/SumTea_Android.apk -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /app/src/androidTest/java/com/sum/tea/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.sum.tea 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.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.getInstrumentation().targetContext 22 | assertEquals("com.sum.tea", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/values-v21/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/values-v26/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/values-v27/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #0165B8 6 | #0165B8 7 | #0165B8 8 | #FF000000 9 | #FFFFFFFF 10 | 11 | #3F51B5 12 | #303F9F 13 | #D81B60 14 | 15 | #0165B8 16 | #B8CFE6 17 | #F2AF00 18 | #B2D0E9 19 | #0159A5 20 | 21 | #90000000 22 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ST 3 | -------------------------------------------------------------------------------- /app/src/main/res/xml/backup_rules.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/xml/data_extraction_rules.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 12 | 13 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/xml/file_paths.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/xml/network_security_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/test/java/com/sum/tea/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.sum.tea 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 | } -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | //buildscript { 3 | // dependencies { 4 | // // AOP切面编程 5 | // classpath 'com.hujiang.aspectjx:gradle-android-plugin-aspectjx:2.0.10' 6 | // } 7 | //} 8 | 9 | plugins { 10 | id 'com.android.application' version '7.2.2' apply false 11 | id 'com.android.library' version '7.2.2' apply false 12 | id 'org.jetbrains.kotlin.android' version '1.6.10' apply false 13 | } 14 | apply from: this.rootProject.file('config.gradle') 15 | 16 | task clean(type: Delete) { 17 | delete rootProject.buildDir 18 | } -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Jan 31 22:10:53 CST 2023 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /lib_banner/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /lib_banner/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'com.android.library' 3 | id 'org.jetbrains.kotlin.android' 4 | } 5 | 6 | android { 7 | compileSdk rootProject.android.compileSdk 8 | 9 | defaultConfig { 10 | minSdk rootProject.android.minSdk 11 | targetSdk rootProject.android.targetSdk 12 | 13 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 14 | consumerProguardFiles "consumer-rules.pro" 15 | } 16 | 17 | buildTypes { 18 | release { 19 | minifyEnabled false 20 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 21 | } 22 | } 23 | compileOptions { 24 | sourceCompatibility JavaVersion.VERSION_1_8 25 | targetCompatibility JavaVersion.VERSION_1_8 26 | } 27 | kotlinOptions { 28 | jvmTarget = '1.8' 29 | } 30 | } 31 | 32 | dependencies { 33 | compileOnly fileTree(dir: 'libs', include: ['*.jar']) 34 | compileOnly rootProject.depsLibs.coreKtx 35 | compileOnly rootProject.depsLibs.appcompat 36 | compileOnly rootProject.depsLibs.material 37 | compileOnly rootProject.depsLibs.constraintlayout 38 | 39 | compileOnly project(path: ':lib_framework') 40 | } -------------------------------------------------------------------------------- /lib_banner/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/lib_banner/consumer-rules.pro -------------------------------------------------------------------------------- /lib_banner/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 -------------------------------------------------------------------------------- /lib_banner/src/androidTest/java/com/sum/banner/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.sum.banner 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.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.getInstrumentation().targetContext 22 | assertEquals("com.sum.banner.test", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /lib_banner/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /lib_banner/src/main/java/com/sum/banner/annotation/AIndicatorGravity.kt: -------------------------------------------------------------------------------- 1 | package com.sum.banner.annotation 2 | 3 | import androidx.annotation.IntDef 4 | import com.sum.banner.mode.IndicatorGravity 5 | import java.lang.annotation.ElementType 6 | import java.lang.annotation.Target 7 | 8 | /** 9 | * 指示器位置 10 | */ 11 | @IntDef(IndicatorGravity.CENTER, IndicatorGravity.START, IndicatorGravity.END) 12 | @kotlin.annotation.Retention(AnnotationRetention.SOURCE) 13 | @Target(ElementType.PARAMETER) 14 | annotation class AIndicatorGravity() 15 | -------------------------------------------------------------------------------- /lib_banner/src/main/java/com/sum/banner/annotation/AIndicatorOrientation.kt: -------------------------------------------------------------------------------- 1 | package com.sum.banner.annotation 2 | 3 | import androidx.annotation.IntDef 4 | import com.sum.banner.mode.IndicatorOrientation 5 | 6 | /** 7 | * 指示器方向 8 | */ 9 | @IntDef( 10 | IndicatorOrientation.INDICATOR_HORIZONTAL, IndicatorOrientation.INDICATOR_VERTICAL, 11 | IndicatorOrientation.INDICATOR_RTL 12 | ) 13 | @kotlin.annotation.Retention(AnnotationRetention.SOURCE) 14 | @Target(AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.FIELD) 15 | annotation class AIndicatorOrientation 16 | -------------------------------------------------------------------------------- /lib_banner/src/main/java/com/sum/banner/annotation/AIndicatorSlideMode.kt: -------------------------------------------------------------------------------- 1 | package com.sum.banner.annotation 2 | 3 | import androidx.annotation.IntDef 4 | import com.sum.banner.mode.IndicatorSlideMode.Companion.COLOR 5 | import com.sum.banner.mode.IndicatorSlideMode.Companion.NORMAL 6 | import com.sum.banner.mode.IndicatorSlideMode.Companion.SCALE 7 | import com.sum.banner.mode.IndicatorSlideMode.Companion.SMOOTH 8 | import com.sum.banner.mode.IndicatorSlideMode.Companion.WORM 9 | 10 | /** 11 | * 指示器滑动模式 12 | */ 13 | @IntDef(NORMAL, SMOOTH, WORM, COLOR, SCALE) 14 | @kotlin.annotation.Retention(AnnotationRetention.SOURCE) 15 | @Target(AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.FIELD) 16 | annotation class AIndicatorSlideMode 17 | -------------------------------------------------------------------------------- /lib_banner/src/main/java/com/sum/banner/annotation/AIndicatorStyle.kt: -------------------------------------------------------------------------------- 1 | package com.sum.banner.annotation 2 | 3 | import androidx.annotation.IntDef 4 | import com.sum.banner.mode.IndicatorStyle 5 | 6 | /** 7 | * 指示器样式 8 | */ 9 | @IntDef(IndicatorStyle.CIRCLE, IndicatorStyle.DASH, IndicatorStyle.ROUND_RECT) 10 | @kotlin.annotation.Retention(AnnotationRetention.SOURCE) 11 | @Target(AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.FIELD) 12 | annotation class AIndicatorStyle 13 | -------------------------------------------------------------------------------- /lib_banner/src/main/java/com/sum/banner/annotation/APageStyle.kt: -------------------------------------------------------------------------------- 1 | package com.sum.banner.annotation 2 | 3 | import androidx.annotation.IntDef 4 | import com.sum.banner.mode.PageStyle.MULTI_PAGE 5 | import com.sum.banner.mode.PageStyle.MULTI_PAGE_OVERLAP 6 | import com.sum.banner.mode.PageStyle.MULTI_PAGE_SCALE 7 | import com.sum.banner.mode.PageStyle.NORMAL 8 | import java.lang.annotation.ElementType 9 | 10 | /** 11 | * 指示器页面样式 12 | */ 13 | @Target(AnnotationTarget.VALUE_PARAMETER) 14 | @IntDef(NORMAL, MULTI_PAGE, MULTI_PAGE_OVERLAP, MULTI_PAGE_SCALE) 15 | @kotlin.annotation.Retention(AnnotationRetention.SOURCE) 16 | @java.lang.annotation.Target(ElementType.PARAMETER) 17 | annotation class APageStyle() 18 | -------------------------------------------------------------------------------- /lib_banner/src/main/java/com/sum/banner/annotation/Visibility.kt: -------------------------------------------------------------------------------- 1 | package com.sum.banner.annotation 2 | 3 | import android.view.View 4 | import androidx.annotation.IntDef 5 | import java.lang.annotation.ElementType 6 | import java.lang.annotation.Target 7 | 8 | /** 9 | * 指示器可见性 10 | */ 11 | @IntDef(View.VISIBLE, View.INVISIBLE, View.GONE) 12 | @kotlin.annotation.Retention(AnnotationRetention.SOURCE) 13 | @Target(ElementType.PARAMETER) 14 | annotation class Visibility() 15 | -------------------------------------------------------------------------------- /lib_banner/src/main/java/com/sum/banner/base/BaseViewHolder.kt: -------------------------------------------------------------------------------- 1 | package com.sum.banner.base 2 | 3 | import android.view.View 4 | import androidx.recyclerview.widget.RecyclerView 5 | 6 | /** 7 | * BaseViewHolder 8 | */ 9 | open class BaseViewHolder(view: View) : RecyclerView.ViewHolder(view) { 10 | } -------------------------------------------------------------------------------- /lib_banner/src/main/java/com/sum/banner/drawer/DashDrawer.kt: -------------------------------------------------------------------------------- 1 | package com.sum.banner.drawer 2 | 3 | import android.graphics.Canvas 4 | 5 | import com.sum.banner.options.IndicatorOptions 6 | 7 | /** 8 | * DashDrawer 9 | */ 10 | class DashDrawer internal constructor(indicatorOptions: IndicatorOptions) : RectDrawer( 11 | indicatorOptions 12 | ) { 13 | 14 | override fun drawDash(canvas: Canvas) { 15 | canvas.drawRect(mRectF, mPaint) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib_banner/src/main/java/com/sum/banner/drawer/DrawerFactory.kt: -------------------------------------------------------------------------------- 1 | package com.sum.banner.drawer 2 | 3 | import com.sum.banner.mode.IndicatorStyle 4 | import com.sum.banner.options.IndicatorOptions 5 | 6 | /** 7 | * Indicator Drawer Factory. 8 | */ 9 | internal object DrawerFactory { 10 | fun createDrawer(indicatorOptions: IndicatorOptions): IDrawer { 11 | return when (indicatorOptions.indicatorStyle) { 12 | IndicatorStyle.DASH -> DashDrawer(indicatorOptions) 13 | IndicatorStyle.ROUND_RECT -> RoundRectDrawer(indicatorOptions) 14 | else -> CircleDrawer(indicatorOptions) 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib_banner/src/main/java/com/sum/banner/drawer/DrawerProxy.kt: -------------------------------------------------------------------------------- 1 | package com.sum.banner.drawer 2 | 3 | import android.graphics.Canvas 4 | import com.sum.banner.base.BaseDrawer 5 | 6 | import com.sum.banner.options.IndicatorOptions 7 | 8 | /** 9 | * Indicator Drawer Proxy. 10 | */ 11 | class DrawerProxy(indicatorOptions: IndicatorOptions) : IDrawer { 12 | 13 | private lateinit var mIDrawer: IDrawer 14 | 15 | init { 16 | init(indicatorOptions) 17 | } 18 | 19 | private fun init(indicatorOptions: IndicatorOptions) { 20 | mIDrawer = DrawerFactory.createDrawer(indicatorOptions) 21 | } 22 | 23 | override fun onLayout( 24 | changed: Boolean, 25 | left: Int, 26 | top: Int, 27 | right: Int, 28 | bottom: Int 29 | ) { 30 | } 31 | 32 | override fun onMeasure( 33 | widthMeasureSpec: Int, 34 | heightMeasureSpec: Int 35 | ): BaseDrawer.MeasureResult { 36 | return mIDrawer.onMeasure(widthMeasureSpec, heightMeasureSpec) 37 | } 38 | 39 | override fun onDraw(canvas: Canvas) { 40 | mIDrawer.onDraw(canvas) 41 | } 42 | 43 | fun setIndicatorOptions(indicatorOptions: IndicatorOptions) { 44 | init(indicatorOptions) 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /lib_banner/src/main/java/com/sum/banner/drawer/IDrawer.kt: -------------------------------------------------------------------------------- 1 | package com.sum.banner.drawer 2 | 3 | import android.graphics.Canvas 4 | import com.sum.banner.base.BaseDrawer 5 | 6 | /** 7 | * IDrawer 8 | */ 9 | interface IDrawer { 10 | 11 | fun onLayout( 12 | changed: Boolean, 13 | left: Int, 14 | top: Int, 15 | right: Int, 16 | bottom: Int 17 | ) 18 | 19 | fun onMeasure( 20 | widthMeasureSpec: Int, 21 | heightMeasureSpec: Int 22 | ): BaseDrawer.MeasureResult 23 | 24 | fun onDraw(canvas: Canvas) 25 | } 26 | -------------------------------------------------------------------------------- /lib_banner/src/main/java/com/sum/banner/drawer/RoundRectDrawer.kt: -------------------------------------------------------------------------------- 1 | package com.sum.banner.drawer 2 | 3 | import android.graphics.Canvas 4 | import com.sum.banner.options.IndicatorOptions 5 | 6 | /** 7 | * 圆角Drawer 8 | */ 9 | class RoundRectDrawer internal constructor(indicatorOptions: IndicatorOptions) : RectDrawer( 10 | indicatorOptions 11 | ) { 12 | 13 | override fun drawRoundRect( 14 | canvas: Canvas, 15 | rx: Float, 16 | ry: Float 17 | ) { 18 | canvas.drawRoundRect(mRectF, rx, ry, mPaint) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib_banner/src/main/java/com/sum/banner/indicator/IIndicator.kt: -------------------------------------------------------------------------------- 1 | package com.sum.banner.indicator 2 | 3 | import androidx.viewpager.widget.ViewPager 4 | import com.sum.banner.options.IndicatorOptions 5 | 6 | /** 7 | * IIndicator 8 | */ 9 | interface IIndicator : ViewPager.OnPageChangeListener { 10 | 11 | fun notifyDataChanged() 12 | 13 | fun setIndicatorOptions(options: IndicatorOptions) 14 | } 15 | -------------------------------------------------------------------------------- /lib_banner/src/main/java/com/sum/banner/mode/IndicatorGravity.kt: -------------------------------------------------------------------------------- 1 | package com.sum.banner.mode 2 | 3 | /** 4 | * 指示器位置 5 | */ 6 | object IndicatorGravity { 7 | const val CENTER = 0 8 | const val START = 1 shl 1 9 | const val END = 1 shl 2 10 | } -------------------------------------------------------------------------------- /lib_banner/src/main/java/com/sum/banner/mode/IndicatorOrientation.kt: -------------------------------------------------------------------------------- 1 | package com.sum.banner.mode 2 | 3 | import android.widget.LinearLayout 4 | 5 | /** 6 | * 指示器方向 7 | */ 8 | class IndicatorOrientation { 9 | companion object { 10 | const val INDICATOR_HORIZONTAL = LinearLayout.HORIZONTAL 11 | const val INDICATOR_VERTICAL = LinearLayout.VERTICAL 12 | const val INDICATOR_RTL = 3 13 | } 14 | } -------------------------------------------------------------------------------- /lib_banner/src/main/java/com/sum/banner/mode/IndicatorSlideMode.kt: -------------------------------------------------------------------------------- 1 | package com.sum.banner.mode 2 | 3 | /** 4 | * 指示器滑动方式 5 | */ 6 | interface IndicatorSlideMode { 7 | companion object { 8 | const val NORMAL = 0 9 | const val SMOOTH = 2 10 | const val WORM = 3 11 | const val SCALE = 4 12 | const val COLOR = 5 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /lib_banner/src/main/java/com/sum/banner/mode/IndicatorStyle.kt: -------------------------------------------------------------------------------- 1 | package com.sum.banner.mode 2 | 3 | /** 4 | * 指示器样式 5 | */ 6 | interface IndicatorStyle { 7 | companion object { 8 | const val CIRCLE = 0 9 | const val DASH = 1 shl 1 10 | const val ROUND_RECT = 1 shl 2 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /lib_banner/src/main/java/com/sum/banner/mode/PageStyle.kt: -------------------------------------------------------------------------------- 1 | package com.sum.banner.mode 2 | 3 | /** 4 | * 指示器页面样式 5 | */ 6 | object PageStyle { 7 | const val NORMAL = 0 8 | 9 | @Deprecated("please use {@link BannerViewPager#setRevealWidth(int)} instead.") 10 | const val MULTI_PAGE = 1 shl 1 11 | 12 | /** 13 | * Requires Api Version >= 21 14 | */ 15 | const val MULTI_PAGE_OVERLAP = 1 shl 2 16 | 17 | const val MULTI_PAGE_SCALE = 1 shl 3 18 | } -------------------------------------------------------------------------------- /lib_banner/src/main/java/com/sum/banner/utils/IndicatorUtils.kt: -------------------------------------------------------------------------------- 1 | package com.sum.banner.utils 2 | 3 | import android.content.res.Resources 4 | import com.sum.banner.options.IndicatorOptions 5 | 6 | /** 7 | * 指示器工具类 8 | */ 9 | object IndicatorUtils { 10 | 11 | @JvmStatic 12 | fun dp2px(dpValue: Float): Int { 13 | return (0.5f + dpValue * Resources.getSystem().displayMetrics.density).toInt() 14 | } 15 | 16 | fun getCoordinateX( 17 | indicatorOptions: IndicatorOptions, 18 | maxDiameter: Float, 19 | index: Int 20 | ): Float { 21 | val normalIndicatorWidth = indicatorOptions.normalSliderWidth 22 | return maxDiameter / 2 + (normalIndicatorWidth + indicatorOptions.sliderGap) * index 23 | } 24 | 25 | fun getCoordinateY(maxDiameter: Float): Float { 26 | return maxDiameter / 2 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib_banner/src/test/java/com/sum/banner/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.sum.banner 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 | } -------------------------------------------------------------------------------- /lib_common/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /lib_common/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/lib_common/consumer-rules.pro -------------------------------------------------------------------------------- /lib_common/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 -------------------------------------------------------------------------------- /lib_common/src/androidTest/java/com/sum/common/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.sum.common 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.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.getInstrumentation().targetContext 22 | assertEquals("com.sum.common.test", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /lib_common/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /lib_common/src/main/java/com/sum/common/banner/BannerImageViewPager.kt: -------------------------------------------------------------------------------- 1 | package com.sum.common.banner 2 | 3 | import android.content.Context 4 | import android.util.AttributeSet 5 | import androidx.viewpager2.widget.ViewPager2 6 | import com.sum.banner.BannerViewPager 7 | import com.sum.common.holder.BannerImageHolder 8 | import com.sum.common.model.Banner 9 | 10 | /** 11 | * 图片类型Banner 12 | */ 13 | open class BannerImageViewPager(context: Context, attrs: AttributeSet? = null) : 14 | BannerViewPager(context, attrs) { 15 | 16 | init { 17 | registerOnPageChangeCallback(object : ViewPager2.OnPageChangeCallback() { 18 | override fun onPageSelected(position: Int) { 19 | super.onPageSelected(position) 20 | val banner = getData()[position] 21 | // val banner = ListUtils.getItem(getData(), position) 22 | } 23 | }) 24 | } 25 | } -------------------------------------------------------------------------------- /lib_common/src/main/java/com/sum/common/constant/Constant.kt: -------------------------------------------------------------------------------- 1 | package com.sum.common.constant 2 | 3 | /** 4 | * @author mingyan.su 5 | * @date 2023/3/5 09:03 6 | * @desc 常量管理 7 | */ 8 | 9 | const val USER_INFO_DATA = "user_info_data" // 用户缓存数据 10 | 11 | const val USER_PHONE_NUMBER = "user_phone_number" // 用户手机号 12 | 13 | const val HTTP_COOKIES_INFO = "http_cookies_info" //cookies缓存 14 | 15 | const val SEARCH_HISTORY_INFO = "search_history_info" //搜索历史缓存 16 | 17 | const val TABLE_VIDEO_LIST = "table_video_list" // 视频列表缓存表 18 | 19 | const val FILE_VIDEO_LIST = "video_list.json" // 视频列表数据json文件 20 | 21 | const val AUTHOR_MAIN_LINK = "https://juejin.cn/user/1654096907477549" // 我的主页 22 | 23 | const val AUTHOR_GITHUB_LINK = "https://github.com/suming77" // github地址 24 | -------------------------------------------------------------------------------- /lib_common/src/main/java/com/sum/common/constant/IntentKey.kt: -------------------------------------------------------------------------------- 1 | package com.sum.common.constant 2 | 3 | /** 4 | * @author mingyan.su 5 | * @date 2023/3/13 17:37 6 | * @desc IntentKey 7 | */ 8 | 9 | const val KEY_ID = "id" 10 | const val KEY_LIST = "list" 11 | const val KEY_DATA = "data" 12 | const val KEY_TYPE = "type" 13 | const val KEY_INDEX = "index" 14 | const val KEY_URL = "url" 15 | const val KEY_TITLE = "title" 16 | const val KEY_POSITION = "position" 17 | const val KEY_VIDEO_PLAY_LIST = "video_play_list" 18 | -------------------------------------------------------------------------------- /lib_common/src/main/java/com/sum/common/holder/BannerImageHolder.kt: -------------------------------------------------------------------------------- 1 | package com.sum.common.holder 2 | 3 | import androidx.appcompat.widget.AppCompatImageView 4 | import com.sum.banner.base.BaseViewHolder 5 | import com.sum.common.model.Banner 6 | 7 | /** 8 | * 轮播图ViewHolder 9 | */ 10 | class BannerImageHolder(val imageView: AppCompatImageView) : BaseViewHolder(imageView) -------------------------------------------------------------------------------- /lib_common/src/main/java/com/sum/common/model/ArticleInfo.kt: -------------------------------------------------------------------------------- 1 | package com.sum.common.model 2 | 3 | /** 4 | * @author mingyan.su 5 | * @date 2023/3/21 23:16 6 | * @desc 文章info 7 | */ 8 | data class ArticleList( 9 | val curPage: Int? = 0, 10 | val offset: Int? = 0, 11 | val size: Int? = 0, 12 | val total: Int? = 0, 13 | val pageCount: Int? = 0, 14 | val datas: MutableList? = mutableListOf() 15 | ) 16 | 17 | data class ArticleInfo( 18 | val id: Int, 19 | val userId: Int, 20 | val courseId: Int?, 21 | val originId: Int?, 22 | var collect: Boolean? = false, 23 | val title: String?, 24 | val desc: String?, 25 | val link: String?, 26 | val zan: Int?, 27 | val niceShareDate: String?, 28 | val niceDate: String?, 29 | val publishTime: Long, 30 | val shareUser: String?, 31 | val author: String? = "", 32 | val superChapterName: String? = "", 33 | val chapterName: String?, 34 | val tags: MutableList? = arrayListOf(), 35 | ) -------------------------------------------------------------------------------- /lib_common/src/main/java/com/sum/common/model/Banner.kt: -------------------------------------------------------------------------------- 1 | package com.sum.common.model 2 | 3 | /** 4 | * @author mingyan.su 5 | * @date 2023/3/7 22:52 6 | * @desc banner 7 | */ 8 | data class Banner( 9 | val id: Int? = 0, 10 | val url: String? = "", //网站地址 11 | val imagePath: String? = "", //图片地址 12 | val title: String? = "", 13 | val desc: String? = "", 14 | val isVisible: Int? = 0, 15 | val order: Int? = 0, 16 | val type: Int? = 0 17 | ) -------------------------------------------------------------------------------- /lib_common/src/main/java/com/sum/common/model/CategoryItem.kt: -------------------------------------------------------------------------------- 1 | package com.sum.common.model 2 | 3 | import android.os.Parcelable 4 | import kotlinx.parcelize.Parcelize 5 | 6 | /** 7 | * @author mingyan.su 8 | * @date 2023/3/19 18:12 9 | * @desc 分类tab信息 10 | */ 11 | data class CategoryItem( 12 | val cid: Int?, 13 | val name: String?, 14 | var isSelected: Boolean?, 15 | val articles: MutableList? = mutableListOf() 16 | ) 17 | 18 | @Parcelize 19 | data class CategorySecondItem( 20 | val id: Int?, 21 | val link: String?, 22 | val title: String?, 23 | val chapterId: Int? 24 | ) : Parcelable -------------------------------------------------------------------------------- /lib_common/src/main/java/com/sum/common/model/HomeInfo.kt: -------------------------------------------------------------------------------- 1 | package com.sum.common.model 2 | 3 | /** 4 | * @author mingyan.su 5 | * @date 2023/3/8 08:08 6 | * @desc 首页资讯列表 7 | */ 8 | data class HomeInfoList( 9 | val curPage: Int = 0, 10 | val offset: Int = 0, 11 | val pageCount: Int = 0, 12 | val size: Int = 0, 13 | val total: Int = 0, 14 | val over: Boolean = false, 15 | val datas: MutableList? = mutableListOf() 16 | ) 17 | 18 | /** 19 | * 首页列表item 20 | */ 21 | data class HomeInfo( 22 | val id: Int?, 23 | val title: String?, 24 | val desc: String?, 25 | val link: String?, 26 | val niceDate: String?, 27 | val author: String?, 28 | val shareUser: String?, 29 | val chapterName: String? 30 | ) -------------------------------------------------------------------------------- /lib_common/src/main/java/com/sum/common/model/ProjectTabItem.kt: -------------------------------------------------------------------------------- 1 | package com.sum.common.model 2 | 3 | /** 4 | * @author mingyan.su 5 | * @date 2023/2/27 21:19 6 | * @desc 项目信息 7 | */ 8 | data class ProjectTabItem(val id: Int, val name: String) 9 | 10 | /** 11 | * 项目二级列表 12 | */ 13 | data class ProjectSubList(val datas: MutableList) 14 | 15 | /** 16 | * 项目列表信息 17 | */ 18 | data class ProjectSubInfo( 19 | val id: Int?, 20 | val author: String?, 21 | val desc: String?, 22 | val envelopePic: String?, 23 | val link: String?, 24 | val niceDate: String?, 25 | val title: String?, 26 | val shareUser: String? 27 | ) -------------------------------------------------------------------------------- /lib_common/src/main/java/com/sum/common/model/SearchInfo.kt: -------------------------------------------------------------------------------- 1 | package com.sum.common.model 2 | 3 | import android.os.Parcelable 4 | import kotlinx.parcelize.Parcelize 5 | 6 | /** 7 | * @author mingyan.su 8 | * @date 2023/3/29 22:48 9 | * @desc 搜索相关 10 | */ 11 | @Parcelize 12 | data class KeyWord( 13 | val id: String?, 14 | val keyWord: String 15 | ) : Parcelable 16 | 17 | /** 18 | * 热门搜索 19 | */ 20 | @Parcelize 21 | data class HotSearch( 22 | val id: Int?, 23 | val link: String?, 24 | val name: String? = "", 25 | val order: Int?, 26 | val visible: Int? 27 | ) : Parcelable -------------------------------------------------------------------------------- /lib_common/src/main/java/com/sum/common/model/Student.kt: -------------------------------------------------------------------------------- 1 | package com.sum.common.model 2 | 3 | import androidx.databinding.BaseObservable 4 | import androidx.databinding.Bindable 5 | import com.sum.common.BR 6 | 7 | /** 8 | * @author mingyan.su 9 | * @date 2023/12/14 12:10 10 | * @desc Databinding单双向绑定数据类 11 | */ 12 | data class Student(var name: String) : BaseObservable() { 13 | 14 | //当使用name字段发生变更后,若想UI自动刷新, 15 | //要求方法名必须以get开头并且标记Bindable注解 16 | //注解才会自动在build目录BR类中生成entry 17 | @Bindable 18 | fun getStuName(): String { 19 | return name 20 | } 21 | 22 | fun setStuName(name: String) { 23 | this.name = name 24 | // 手动刷新 25 | notifyPropertyChanged(BR.stuName) 26 | } 27 | 28 | var age: String? = null 29 | } -------------------------------------------------------------------------------- /lib_common/src/main/java/com/sum/common/model/SystemInfo.kt: -------------------------------------------------------------------------------- 1 | package com.sum.common.model 2 | 3 | import android.os.Parcelable 4 | import kotlinx.parcelize.Parcelize 5 | 6 | /** 7 | * @author mingyan.su 8 | * @date 2023/3/21 7:52 9 | * @desc 体系 10 | */ 11 | data class SystemList( 12 | val id: Int?, 13 | val courseId: Int?, 14 | val name: String?, //一级名称 15 | val children: MutableList? = mutableListOf(), 16 | val visible: Int? 17 | ) 18 | 19 | /** 20 | * 二级列表 21 | */ 22 | @Parcelize 23 | data class SystemSecondList( 24 | val id: Int?, 25 | val name: String?, // 二级名称 26 | val visible: Int? 27 | ) : Parcelable -------------------------------------------------------------------------------- /lib_common/src/main/java/com/sum/common/model/UserInfo.kt: -------------------------------------------------------------------------------- 1 | package com.sum.common.model 2 | 3 | import android.os.Parcelable 4 | import kotlinx.parcelize.Parcelize 5 | 6 | /** 7 | * @author mingyan.su 8 | * @date 2023/3/24 18:46 9 | * @desc 用户信息 10 | */ 11 | @Parcelize 12 | data class User( 13 | val id: Int? = 0, 14 | val username: String?, 15 | var nickname: String?, 16 | val token: String?, 17 | var icon: String? = "", 18 | val email: String? = "", 19 | var password: String?, 20 | var signature: String?, 21 | var sex: String?, 22 | var birthday: String? = "" 23 | ) : Parcelable { 24 | fun getName(): String? { 25 | return if (!nickname.isNullOrEmpty()) { 26 | nickname 27 | } else { 28 | username 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /lib_common/src/main/java/com/sum/common/provider/MainServiceProvider.kt: -------------------------------------------------------------------------------- 1 | package com.sum.common.provider 2 | 3 | import android.content.Context 4 | import com.alibaba.android.arouter.facade.annotation.Autowired 5 | import com.alibaba.android.arouter.launcher.ARouter 6 | import com.sum.common.constant.MAIN_SERVICE_HOME 7 | import com.sum.common.service.IMainService 8 | 9 | /** 10 | * @author mingyan.su 11 | * @date 2023/3/26 18:30 12 | * @desc MainService提供类,对外提供相关能力 13 | * 任意模块就能通过MainServiceProvider使用对外暴露的能力 14 | */ 15 | object MainServiceProvider { 16 | 17 | @Autowired(name = MAIN_SERVICE_HOME) 18 | lateinit var mainService: IMainService 19 | 20 | init { 21 | ARouter.getInstance().inject(this) 22 | } 23 | 24 | /** 25 | * 跳转主页 26 | * @param context 27 | * @param index tab位置 28 | */ 29 | fun toMain(context: Context, index: Int = 0) { 30 | mainService.toMain(context, index) 31 | } 32 | 33 | /** 34 | * 跳转文章详情 35 | * @param context 36 | * @param url 文章链接 37 | * @param title 标题 38 | */ 39 | fun toArticleDetail(context: Context, url: String, title: String) { 40 | mainService.toArticleDetail(context, url, title) 41 | } 42 | } -------------------------------------------------------------------------------- /lib_common/src/main/java/com/sum/common/provider/SearchServiceProvider.kt: -------------------------------------------------------------------------------- 1 | package com.sum.common.provider 2 | 3 | import android.content.Context 4 | import com.alibaba.android.arouter.facade.annotation.Autowired 5 | import com.alibaba.android.arouter.launcher.ARouter 6 | import com.sum.common.constant.SEARCH_SERVICE_SEARCH 7 | import com.sum.common.service.ISearchService 8 | 9 | /** 10 | * @author mingyan.su 11 | * @date 2023/3/29 23:20 12 | * @desc SearchService提供类,对外提供相关能力 13 | * 任意模块就能通过SearchServiceProvider使用对外暴露的能力 14 | */ 15 | object SearchServiceProvider { 16 | @Autowired(name = "/search/service/search22") 17 | lateinit var searchService: ISearchService 18 | 19 | init { 20 | ARouter.getInstance().inject(this) 21 | } 22 | 23 | /** 24 | * 跳转搜索页 25 | * @param context 26 | */ 27 | fun toSearch(context: Context) { 28 | searchService.toSearch(context) 29 | } 30 | 31 | /** 32 | * 清除搜索历史缓存 33 | */ 34 | fun clearSearchHistoryCache() { 35 | searchService.clearSearchHistoryCache() 36 | } 37 | } -------------------------------------------------------------------------------- /lib_common/src/main/java/com/sum/common/service/ILoginService.kt: -------------------------------------------------------------------------------- 1 | package com.sum.common.service 2 | 3 | import android.content.Context 4 | import androidx.lifecycle.LifecycleOwner 5 | import androidx.lifecycle.Observer 6 | import com.alibaba.android.arouter.facade.template.IProvider 7 | import com.sum.common.model.User 8 | 9 | /** 10 | * @author mingyan.su 11 | * @date 2023/3/25 11:29 12 | * @desc 登录服务相关接口 13 | * 只是定义了一个接口,提供了对外相关能力,其他模块只需要按需添加,需要在login模块实现 14 | */ 15 | interface ILoginService : IProvider { 16 | /** 17 | * 是否登录 18 | * @return Boolean 19 | */ 20 | fun isLogin(): Boolean 21 | 22 | /** 23 | * 跳转登录页 24 | * @param context 25 | */ 26 | fun login(context: Context) 27 | 28 | /** 29 | * 跳转隐私协议 30 | * @param context 31 | */ 32 | fun readPolicy(context: Context) 33 | 34 | /** 35 | * 登出 36 | * @param context 37 | * @param lifecycleOwner 38 | * @param observer 39 | */ 40 | fun logout( 41 | context: Context, 42 | lifecycleOwner: LifecycleOwner?, 43 | observer: Observer 44 | ) 45 | 46 | } -------------------------------------------------------------------------------- /lib_common/src/main/java/com/sum/common/service/IMainService.kt: -------------------------------------------------------------------------------- 1 | package com.sum.common.service 2 | 3 | import android.content.Context 4 | import com.alibaba.android.arouter.facade.template.IProvider 5 | 6 | /** 7 | * @author mingyan.su 8 | * @date 2023/3/26 18:20 9 | * @desc 主页模块相关接口 10 | * 提供主页模块对外能力,其他模块只需要按需添加,需要在Main模块实现 11 | */ 12 | interface IMainService : IProvider { 13 | /** 14 | * 跳转主页 15 | * @param context 16 | * @param index tab位置 17 | */ 18 | fun toMain(context: Context, index: Int) 19 | 20 | /** 21 | * 跳转主页 22 | * @param url 23 | * @param title tab位置 24 | */ 25 | fun toArticleDetail(context: Context, url: String, title: String) 26 | } -------------------------------------------------------------------------------- /lib_common/src/main/java/com/sum/common/service/ISearchService.kt: -------------------------------------------------------------------------------- 1 | package com.sum.common.service 2 | 3 | import android.content.Context 4 | import com.alibaba.android.arouter.facade.template.IProvider 5 | 6 | /** 7 | * @author mingyan.su 8 | * @date 2023/3/29 23:18 9 | * @desc 登录服务相关接口 10 | * 提供了对外相关能力,其他模块只需要按需添加,需要在SearchService模块实现 11 | */ 12 | interface ISearchService : IProvider { 13 | /** 14 | * 跳转搜索页 15 | * @param context 16 | */ 17 | fun toSearch(context: Context) 18 | 19 | /** 20 | * 清除搜索历史缓存 21 | */ 22 | fun clearSearchHistoryCache() 23 | } -------------------------------------------------------------------------------- /lib_common/src/main/java/com/sum/common/service/IUserService.kt: -------------------------------------------------------------------------------- 1 | package com.sum.common.service 2 | 3 | import androidx.lifecycle.LiveData 4 | import com.alibaba.android.arouter.facade.template.IProvider 5 | import com.sum.common.model.User 6 | 7 | /** 8 | * @author mingyan.su 9 | * @date 2023/3/25 11:29 10 | * @desc 用户信息服务相关接口 11 | * 只是定义了一个接口,提供了对外相关能力,其他模块只需要按需添加,需要在User模块实现 12 | */ 13 | interface IUserService : IProvider { 14 | /** 15 | * 是否登录 16 | * @return Boolean 17 | */ 18 | fun isLogin(): Boolean 19 | 20 | /** 21 | * 获取用户信息 22 | * @return User or null 23 | */ 24 | fun getUserInfo(): User? 25 | 26 | /** 27 | * 保存用户信息 28 | * @param user 29 | */ 30 | fun saveUserInfo(user: User?) 31 | 32 | /** 33 | * 清除用户信息 34 | */ 35 | fun clearUserInfo() 36 | 37 | /** 38 | * 获取User信息LiveData 39 | */ 40 | fun getUserLiveData(): LiveData 41 | 42 | /** 43 | * 保存用户手机号码 44 | * @param phone 45 | */ 46 | fun saveUserPhone(phone: String?) 47 | 48 | /** 49 | * 保存用户手机号码 50 | * @return phone 51 | */ 52 | fun getUserPhone(): String? 53 | } -------------------------------------------------------------------------------- /lib_common/src/main/res/drawable/dialog_message_left_button.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /lib_common/src/main/res/drawable/dialog_message_one_button.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /lib_common/src/main/res/drawable/dialog_message_right_button.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /lib_common/src/main/res/drawable/ic_back.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /lib_common/src/main/res/drawable/selector_collect.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /lib_common/src/main/res/drawable/selector_collect_new.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib_common/src/main/res/drawable/shape_ffffff_radius10.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /lib_common/src/main/res/drawable/shape_ffffff_radius2.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /lib_common/src/main/res/drawable/shape_tab_indicator.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /lib_common/src/main/res/layout/layout_normal_recyclerview.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 16 | 17 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /lib_common/src/main/res/mipmap-xhdpi/ic_collect_normal.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/lib_common/src/main/res/mipmap-xhdpi/ic_collect_normal.webp -------------------------------------------------------------------------------- /lib_common/src/main/res/mipmap-xhdpi/ic_collect_selected.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/lib_common/src/main/res/mipmap-xhdpi/ic_collect_selected.webp -------------------------------------------------------------------------------- /lib_common/src/main/res/mipmap-xhdpi/ic_search.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/lib_common/src/main/res/mipmap-xhdpi/ic_search.webp -------------------------------------------------------------------------------- /lib_common/src/main/res/mipmap-xxhdpi/ic_collect_normal.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/lib_common/src/main/res/mipmap-xxhdpi/ic_collect_normal.webp -------------------------------------------------------------------------------- /lib_common/src/main/res/mipmap-xxhdpi/ic_collect_normal_new.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/lib_common/src/main/res/mipmap-xxhdpi/ic_collect_normal_new.webp -------------------------------------------------------------------------------- /lib_common/src/main/res/mipmap-xxhdpi/ic_collect_selected.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/lib_common/src/main/res/mipmap-xxhdpi/ic_collect_selected.webp -------------------------------------------------------------------------------- /lib_common/src/main/res/mipmap-xxhdpi/ic_collect_selected_new.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/lib_common/src/main/res/mipmap-xxhdpi/ic_collect_selected_new.webp -------------------------------------------------------------------------------- /lib_common/src/main/res/mipmap-xxhdpi/ic_data_empty.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/lib_common/src/main/res/mipmap-xxhdpi/ic_data_empty.webp -------------------------------------------------------------------------------- /lib_common/src/main/res/mipmap-xxhdpi/ic_next.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/lib_common/src/main/res/mipmap-xxhdpi/ic_next.webp -------------------------------------------------------------------------------- /lib_common/src/main/res/mipmap-xxhdpi/ic_search.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/lib_common/src/main/res/mipmap-xxhdpi/ic_search.webp -------------------------------------------------------------------------------- /lib_common/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1px 4 | 10dp 5 | 320dp 6 | -------------------------------------------------------------------------------- /lib_common/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Kotlin + MVVM + Android Jetpack + 协程 + Flow + 组件化 + 模块化 + 短视频 4 | 作者:%s 5 | 6 | 保存 7 | 保存成功 8 | 保存失败 9 | 正在开发中.... 10 | 正在加载.... 11 | 暂无数据 12 | 请授权相关权限后再使用 13 | 取消 14 | 确定 15 | 16 | 登录后了解更多Android技术 17 | 18 | 收藏成功 19 | 取消收藏 20 | 21 | 网络异常,请尝试刷新 22 | 23 | 温馨提示 24 | 隐私政策 25 | 26 | -------------------------------------------------------------------------------- /lib_common/src/test/java/com/sum/common/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.sum.common 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 | } -------------------------------------------------------------------------------- /lib_framework/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /lib_framework/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/lib_framework/consumer-rules.pro -------------------------------------------------------------------------------- /lib_framework/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 -------------------------------------------------------------------------------- /lib_framework/src/androidTest/java/com/sum/framework/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.sum.framework 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.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.getInstrumentation().targetContext 22 | assertEquals("com.sum.framework.test", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /lib_framework/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib_framework/src/main/java/com/sum/framework/adapter/BaseMultiItemAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.sum.framework.adapter 2 | 3 | import android.view.LayoutInflater 4 | import android.view.ViewGroup 5 | import androidx.viewbinding.ViewBinding 6 | import com.sum.framework.interfaces.MultiItemEntity 7 | 8 | /** 9 | * @author mingyan.su 10 | * @date 2023/3/13 18:33 11 | * @desc 多种类目Adapter 12 | */ 13 | abstract class BaseMultiItemAdapter : BaseRecyclerViewAdapter() { 14 | 15 | /** 16 | * model需要实现MultiItemEntity接口 17 | */ 18 | override fun getDefItemViewType(position: Int): Int { 19 | return getData()[position].itemType 20 | } 21 | 22 | /** 23 | * 如果需要实现多种类型子类ViewHolder,可以重写该方法 24 | */ 25 | override fun onCreateDefViewHolder( 26 | layoutInflater: LayoutInflater, 27 | parent: ViewGroup, 28 | viewType: Int 29 | ): BaseViewHolder { 30 | return BaseBindViewHolder(getViewBinding(layoutInflater, parent, viewType)) 31 | } 32 | } -------------------------------------------------------------------------------- /lib_framework/src/main/java/com/sum/framework/adapter/BaseViewHolder.kt: -------------------------------------------------------------------------------- 1 | package com.sum.framework.adapter 2 | 3 | import android.view.View 4 | import androidx.recyclerview.widget.RecyclerView 5 | import androidx.viewbinding.ViewBinding 6 | 7 | /** 8 | * @author mingyan.su 9 | * @date 2023/3/9 08:11 10 | * @desc 基本ViewHolder 11 | */ 12 | open class BaseViewHolder(rootView: View) : RecyclerView.ViewHolder(rootView) 13 | 14 | open class BaseBindViewHolder(val binding: B) : BaseViewHolder(binding.root) -------------------------------------------------------------------------------- /lib_framework/src/main/java/com/sum/framework/adapter/ViewPage2FragmentAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.sum.framework.adapter 2 | 3 | import android.util.SparseArray 4 | import androidx.core.util.size 5 | import androidx.fragment.app.Fragment 6 | import androidx.fragment.app.FragmentManager 7 | import androidx.lifecycle.Lifecycle 8 | import androidx.viewpager2.adapter.FragmentStateAdapter 9 | 10 | /** 11 | * @创建者 mingyan.su 12 | * @创建时间 2023/3/5 15:32 13 | * @类描述 FragmentStateAdapter 14 | */ 15 | class ViewPage2FragmentAdapter( 16 | fragmentManager: FragmentManager, 17 | lifecycle: Lifecycle, 18 | var fragments: SparseArray 19 | ) : 20 | FragmentStateAdapter(fragmentManager, lifecycle) { 21 | /**class ViewPage2FragmentAdapter(activity: FragmentActivity, var fragments: SparseArray) : 22 | FragmentStateAdapter(activity) {*/ 23 | //FragmentStateAdapter内部自己会管理已实例化的fragment对象,所以不需要考虑复用的问题。 24 | override fun createFragment(i: Int): Fragment { 25 | return fragments[i] 26 | } 27 | 28 | override fun getItemCount(): Int { 29 | return fragments.size 30 | } 31 | 32 | fun setData(fragments: SparseArray) { 33 | this.fragments = fragments 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib_framework/src/main/java/com/sum/framework/base/BaseDataBindActivity.kt: -------------------------------------------------------------------------------- 1 | package com.sum.framework.base 2 | 3 | import android.view.LayoutInflater 4 | import androidx.databinding.ViewDataBinding 5 | import androidx.viewbinding.ViewBinding 6 | import com.sum.framework.ext.saveAs 7 | import com.sum.framework.ext.saveAsUnChecked 8 | import java.lang.reflect.ParameterizedType 9 | 10 | /** 11 | * @author mingyan.su 12 | * @date 2023/2/26 11:48 13 | * @desc dataBinding Activity基类 14 | */ 15 | abstract class BaseDataBindActivity : BaseActivity() { 16 | lateinit var mBinding: DB 17 | 18 | override fun setContentLayout() { 19 | // mBinding = DataBindingUtil.setContentView(this, getLayoutResId()) 20 | val type = javaClass.genericSuperclass 21 | val vbClass: Class = type!!.saveAs().actualTypeArguments[0].saveAs() 22 | val method = vbClass.getDeclaredMethod("inflate", LayoutInflater::class.java) 23 | mBinding = method.invoke(this, layoutInflater)!!.saveAsUnChecked() 24 | setContentView(mBinding.root) 25 | } 26 | 27 | override fun getLayoutResId(): Int = 0 28 | } -------------------------------------------------------------------------------- /lib_framework/src/main/java/com/sum/framework/base/BaseMvvmFragment.kt: -------------------------------------------------------------------------------- 1 | package com.sum.framework.base 2 | 3 | import android.os.Bundle 4 | import android.view.View 5 | import androidx.databinding.ViewDataBinding 6 | import androidx.lifecycle.ViewModel 7 | import androidx.lifecycle.ViewModelProvider 8 | import java.lang.reflect.ParameterizedType 9 | 10 | /** 11 | * @author mingyan.su 12 | * @date 2023/2/27 12:31 13 | * @desc DataBinding和ViewModel基类 14 | */ 15 | abstract class BaseMvvmFragment : BaseDataBindFragment() { 16 | lateinit var mViewModel: VM 17 | 18 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { 19 | initViewModel() 20 | super.onViewCreated(view, savedInstanceState) 21 | } 22 | 23 | open fun initViewModel() { 24 | val argument = (this.javaClass.genericSuperclass as ParameterizedType).actualTypeArguments 25 | mViewModel = ViewModelProvider(this).get(argument[1] as Class) 26 | } 27 | } -------------------------------------------------------------------------------- /lib_framework/src/main/java/com/sum/framework/decoration/StaggeredItemDecoration.kt: -------------------------------------------------------------------------------- 1 | package com.sum.framework.decoration 2 | 3 | import android.graphics.Rect 4 | import android.view.View 5 | import androidx.recyclerview.widget.RecyclerView.ItemDecoration 6 | import androidx.recyclerview.widget.RecyclerView 7 | import androidx.recyclerview.widget.StaggeredGridLayoutManager 8 | 9 | /** 10 | * @author mingyan.su 11 | * @date 2023/3/8 22:57 12 | * @desc 瀑布流分割线 13 | */ 14 | class StaggeredItemDecoration(private val space: Int) : ItemDecoration() { 15 | override fun getItemOffsets(outRect: Rect, view: View, parent: RecyclerView, state: RecyclerView.State) { 16 | super.getItemOffsets(outRect, view, parent, state) 17 | outRect.top = space 18 | //瀑布流专属分割线 19 | val params = view.layoutParams as StaggeredGridLayoutManager.LayoutParams 20 | 21 | //根据params.getSpanIndex()来判断左右边确定分割线,第一列设置左边距为space,右边距为space/2(第二列反之) 22 | if (params.spanIndex % 2 == 0) { 23 | outRect.left = space 24 | outRect.right = space / 2 25 | } else { 26 | outRect.left = space / 2 27 | outRect.right = space 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /lib_framework/src/main/java/com/sum/framework/ext/AnyExt.kt: -------------------------------------------------------------------------------- 1 | package com.sum.framework.ext 2 | 3 | 4 | inline fun Any.saveAs() : T{ 5 | return this as T 6 | } 7 | 8 | @Suppress("UNCHECKED_CAST") 9 | fun Any.saveAsUnChecked() : T{ 10 | return this as T 11 | } 12 | 13 | inline fun Any.isEqualType() : Boolean{ 14 | return this is T 15 | } 16 | 17 | -------------------------------------------------------------------------------- /lib_framework/src/main/java/com/sum/framework/ext/FlowExt.kt: -------------------------------------------------------------------------------- 1 | package com.sum.framework.ext 2 | 3 | import kotlinx.coroutines.CoroutineScope 4 | import kotlinx.coroutines.Dispatchers 5 | import kotlinx.coroutines.Job 6 | import kotlinx.coroutines.delay 7 | import kotlinx.coroutines.flow.flow 8 | import kotlinx.coroutines.flow.flowOn 9 | import kotlinx.coroutines.flow.launchIn 10 | import kotlinx.coroutines.flow.onCompletion 11 | import kotlinx.coroutines.flow.onEach 12 | import kotlinx.coroutines.flow.onStart 13 | 14 | 15 | /** 16 | * 倒计时 17 | */ 18 | fun countDownCoroutines( 19 | total: Int, 20 | scope: CoroutineScope, 21 | onTick: (Int) -> Unit, 22 | onStart: (() -> Unit)? = null, 23 | onFinish: (() -> Unit)? = null, 24 | ): Job { 25 | return flow { 26 | for (i in total downTo 0) { 27 | emit(i) 28 | delay(1000) 29 | } 30 | } 31 | .flowOn(Dispatchers.Main) 32 | .onStart { onStart?.invoke() } 33 | .onCompletion { onFinish?.invoke() }//like java finally 34 | .onEach { onTick.invoke(it) } 35 | .launchIn(scope) 36 | } -------------------------------------------------------------------------------- /lib_framework/src/main/java/com/sum/framework/ext/TimeExt.kt: -------------------------------------------------------------------------------- 1 | package com.sum.framework.ext 2 | 3 | //秒的long时间转化 4 | fun Long.getDay(): String = (this / (3600 * 24)).asTwoDigit() 5 | fun Long.getHour(): String = (this % (3600 * 24) / 3600).asTwoDigit() 6 | fun Long.getMin(): String = (this % (3600 * 24) % 3600 / 60).asTwoDigit() 7 | fun Long.getSec(): String = (this % (3600 * 24) % 3600 % 60).asTwoDigit() 8 | 9 | fun Long.formattedTime(keepHours: Boolean = false): String { 10 | val seconds = this 11 | val h = seconds / 3600 12 | val m = (seconds % 3600) / 60 13 | val s = (seconds % 3600) % 60 14 | 15 | return if (!keepHours && h == 0L) { 16 | "${m.asTwoDigit()}:${s.asTwoDigit()}" 17 | } else { 18 | "${h.asTwoDigit()}:${m.asTwoDigit()}:${s.asTwoDigit()}" 19 | } 20 | } 21 | 22 | fun Long.asTwoDigit(): String { 23 | val value = StringBuilder() 24 | if (this < 10) { 25 | value.append("0") 26 | } 27 | value.append(toString()) 28 | return value.toString() 29 | } -------------------------------------------------------------------------------- /lib_framework/src/main/java/com/sum/framework/helper/SumAppHelper.kt: -------------------------------------------------------------------------------- 1 | package com.sum.framework.helper 2 | 3 | import android.app.Application 4 | 5 | /** 6 | * @author mingyan.su 7 | * @date 2023/3/2 16:10 8 | * @desc 提供应用环境 9 | */ 10 | object SumAppHelper { 11 | private lateinit var app: Application 12 | private var isDebug = false 13 | 14 | fun init(application: Application, isDebug: Boolean) { 15 | this.app = application 16 | this.isDebug = isDebug 17 | } 18 | 19 | /** 20 | * 获取全局应用 21 | */ 22 | fun getApplication() = app 23 | 24 | /** 25 | * 是否为debug环境 26 | */ 27 | fun isDebug() = isDebug 28 | } -------------------------------------------------------------------------------- /lib_framework/src/main/java/com/sum/framework/interfaces/MultiItemEntity.kt: -------------------------------------------------------------------------------- 1 | package com.sum.framework.interfaces 2 | 3 | /** 4 | * 多布局类型 5 | */ 6 | interface MultiItemEntity { 7 | val itemType: Int 8 | } 9 | -------------------------------------------------------------------------------- /lib_framework/src/main/java/com/sum/framework/utils/dpToPx.kt: -------------------------------------------------------------------------------- 1 | @file:JvmName("DisplayUtil") 2 | @file:JvmMultifileClass 3 | 4 | package com.sum.framework.utils 5 | 6 | import android.content.Context 7 | import android.util.TypedValue 8 | import androidx.annotation.Dimension 9 | import com.sum.framework.helper.SumAppHelper 10 | 11 | fun dpToPx(dpValue: Float): Float { 12 | return TypedValue.applyDimension( 13 | TypedValue.COMPLEX_UNIT_DIP, dpValue, 14 | SumAppHelper.getApplication().resources.displayMetrics 15 | ) 16 | } 17 | 18 | fun dpToPx(dpValue: Int): Int { 19 | return TypedValue.applyDimension( 20 | TypedValue.COMPLEX_UNIT_DIP, dpValue.toFloat(), 21 | SumAppHelper.getApplication().resources.displayMetrics 22 | ).toInt() 23 | } 24 | 25 | fun dpToPx(context: Context, @Dimension(unit = Dimension.DP) dp: Int): Float { 26 | val r = context.resources 27 | return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp.toFloat(), r.displayMetrics) 28 | } 29 | 30 | /** 31 | * 所有字体均使用dp 32 | */ 33 | fun spToPx(spValue: Float): Float { 34 | return TypedValue.applyDimension( 35 | TypedValue.COMPLEX_UNIT_DIP, 36 | spValue, 37 | SumAppHelper.getApplication().resources.displayMetrics 38 | ) 39 | } -------------------------------------------------------------------------------- /lib_framework/src/main/res/anim/dialog_bottom_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /lib_framework/src/main/res/anim/dialog_bottom_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /lib_framework/src/main/res/anim/dialog_ios_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | 13 | 17 | -------------------------------------------------------------------------------- /lib_framework/src/main/res/anim/dialog_ios_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | 13 | 17 | 18 | -------------------------------------------------------------------------------- /lib_framework/src/main/res/anim/dialog_left_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /lib_framework/src/main/res/anim/dialog_left_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /lib_framework/src/main/res/anim/dialog_right_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /lib_framework/src/main/res/anim/dialog_right_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /lib_framework/src/main/res/anim/dialog_scale_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | 13 | 18 | 19 | -------------------------------------------------------------------------------- /lib_framework/src/main/res/anim/dialog_top_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /lib_framework/src/main/res/anim/dialog_top_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /lib_framework/src/main/res/drawable/animation_loading_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /lib_framework/src/main/res/drawable/dialog_loading_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 16 | 17 | -------------------------------------------------------------------------------- /lib_framework/src/main/res/drawable/tip_toast_bg_conner_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /lib_framework/src/main/res/layout/layout_loading_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | -------------------------------------------------------------------------------- /lib_framework/src/main/res/layout/widget_tips_toast.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 21 | 22 | -------------------------------------------------------------------------------- /lib_framework/src/main/res/mipmap-xhdpi-v4/widget_toast_success.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/lib_framework/src/main/res/mipmap-xhdpi-v4/widget_toast_success.webp -------------------------------------------------------------------------------- /lib_framework/src/main/res/mipmap-xhdpi-v4/widget_toast_warning.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/lib_framework/src/main/res/mipmap-xhdpi-v4/widget_toast_warning.webp -------------------------------------------------------------------------------- /lib_framework/src/main/res/mipmap-xhdpi/ic_delete.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/lib_framework/src/main/res/mipmap-xhdpi/ic_delete.webp -------------------------------------------------------------------------------- /lib_framework/src/main/res/mipmap-xhdpi/ic_delete_gray.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/lib_framework/src/main/res/mipmap-xhdpi/ic_delete_gray.webp -------------------------------------------------------------------------------- /lib_framework/src/main/res/mipmap-xxhdpi/bg_mine_head.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/lib_framework/src/main/res/mipmap-xxhdpi/bg_mine_head.webp -------------------------------------------------------------------------------- /lib_framework/src/main/res/mipmap-xxhdpi/bg_refresh_header1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/lib_framework/src/main/res/mipmap-xxhdpi/bg_refresh_header1.webp -------------------------------------------------------------------------------- /lib_framework/src/main/res/mipmap-xxhdpi/bg_refresh_header2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/lib_framework/src/main/res/mipmap-xxhdpi/bg_refresh_header2.webp -------------------------------------------------------------------------------- /lib_framework/src/main/res/mipmap-xxhdpi/ic_delete.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/lib_framework/src/main/res/mipmap-xxhdpi/ic_delete.webp -------------------------------------------------------------------------------- /lib_framework/src/main/res/mipmap-xxhdpi/ic_loading.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/lib_framework/src/main/res/mipmap-xxhdpi/ic_loading.webp -------------------------------------------------------------------------------- /lib_framework/src/main/res/mipmap-xxxhdpi/widget_toast_success.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/lib_framework/src/main/res/mipmap-xxxhdpi/widget_toast_success.webp -------------------------------------------------------------------------------- /lib_framework/src/main/res/mipmap-xxxhdpi/widget_toast_warning.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/lib_framework/src/main/res/mipmap-xxxhdpi/widget_toast_warning.webp -------------------------------------------------------------------------------- /lib_framework/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | 11 | #3F51B5 12 | #303F9F 13 | #D81B60 14 | 15 | #0165B8 16 | #B8CFE6 17 | #F2AF00 18 | #B2D0E9 19 | #0159A5 20 | 21 | #90000000 22 | #27000000 23 | -------------------------------------------------------------------------------- /lib_framework/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib_framework/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 加载中... 4 | 再按一次退出程序 5 | -------------------------------------------------------------------------------- /lib_framework/src/test/java/com/sum/framework/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.sum.framework 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 | } -------------------------------------------------------------------------------- /lib_glide/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /lib_glide/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/lib_glide/consumer-rules.pro -------------------------------------------------------------------------------- /lib_glide/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 -------------------------------------------------------------------------------- /lib_glide/src/androidTest/java/com/sum/glide/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.sum.glide 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.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.getInstrumentation().targetContext 22 | assertEquals("com.sum.glide.test", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /lib_glide/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /lib_glide/src/main/res/mipmap-xxhdpi/default_head.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/lib_glide/src/main/res/mipmap-xxhdpi/default_head.png -------------------------------------------------------------------------------- /lib_glide/src/main/res/mipmap-xxhdpi/default_img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/lib_glide/src/main/res/mipmap-xxhdpi/default_img.png -------------------------------------------------------------------------------- /lib_glide/src/test/java/com/sum/glide/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.sum.glide 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 | } -------------------------------------------------------------------------------- /lib_network/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /lib_network/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/lib_network/consumer-rules.pro -------------------------------------------------------------------------------- /lib_network/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 -------------------------------------------------------------------------------- /lib_network/src/androidTest/java/com/sum/network/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.sum.network 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.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.getInstrumentation().targetContext 22 | assertEquals("com.sum.network.test", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /lib_network/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib_network/src/main/java/com/sum/network/callback/IApiErrorCallback.kt: -------------------------------------------------------------------------------- 1 | package com.sum.network.callback 2 | 3 | import com.sum.framework.toast.TipsToast 4 | 5 | /** 6 | * @author mingyan.su 7 | * @date 2023/3/1 12:05 8 | * @desc 接口请求错误回调 9 | */ 10 | interface IApiErrorCallback { 11 | /** 12 | * 错误回调处理 13 | */ 14 | fun onError(code: Int?, error: String?) { 15 | TipsToast.showTips(error) 16 | } 17 | 18 | /** 19 | * 登录失效处理 20 | */ 21 | fun onLoginFail(code: Int?, error: String?) { 22 | TipsToast.showTips(error) 23 | } 24 | } -------------------------------------------------------------------------------- /lib_network/src/main/java/com/sum/network/constant/HttpConstant.kt: -------------------------------------------------------------------------------- 1 | package com.sum.network.constant 2 | 3 | /** 4 | * @author mingyan.su 5 | * @date 2023/3/27 07:58 6 | * @desc Http常量类 7 | */ 8 | 9 | /** 10 | * base_url 11 | */ 12 | const val BASE_URL = "https://www.wanandroid.com" 13 | 14 | const val KEY_TOKEN = "token" 15 | const val KEY_COOKIE = "Cookie" 16 | const val KEY_SET_COOKIE = "set-cookie" 17 | 18 | const val KEY_SAVE_USER_LOGIN = "user/login" 19 | const val KEY_SAVE_USER_REGISTER = "user/register" 20 | 21 | const val COLLECTION_WEBSITE = "lg/collect" 22 | const val NOT_COLLECTION_WEBSITE = "lg/uncollect" 23 | const val ARTICLE_WEBSITE = "article" 24 | const val COIN_WEBSITE = "lg/coin" 25 | -------------------------------------------------------------------------------- /lib_network/src/main/java/com/sum/network/error/ApiException.kt: -------------------------------------------------------------------------------- 1 | package com.sum.network.error 2 | 3 | import java.io.IOException 4 | 5 | /** 6 | * 结果异常类 7 | * 服务器非200状态,对应的异常 8 | */ 9 | open class ApiException : Exception { 10 | var errCode: Int 11 | var errMsg: String 12 | 13 | constructor(error: ERROR, e: Throwable? = null) : super(e) { 14 | errCode = error.code 15 | errMsg = error.errMsg 16 | } 17 | 18 | constructor(code: Int, msg: String, e: Throwable? = null) : super(e) { 19 | this.errCode = code 20 | this.errMsg = msg 21 | } 22 | } 23 | 24 | /** 25 | * 无网络连接异常 26 | */ 27 | class NoNetWorkException : IOException { 28 | var errCode: Int 29 | var errMsg: String 30 | 31 | constructor(error: ERROR, e: Throwable? = null) : super(e) { 32 | errCode = error.code 33 | errMsg = error.errMsg 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib_network/src/main/java/com/sum/network/manager/ApiManager.kt: -------------------------------------------------------------------------------- 1 | package com.sum.network.manager 2 | 3 | import com.sum.network.api.ApiInterface 4 | 5 | /** 6 | * @author mingyan.su 7 | * @date 2023/2/27 21:14 8 | * @desc API管理器 9 | */ 10 | object ApiManager { 11 | val api by lazy { HttpManager.create(ApiInterface::class.java) } 12 | } -------------------------------------------------------------------------------- /lib_network/src/main/java/com/sum/network/repository/BaseRepository.kt: -------------------------------------------------------------------------------- 1 | package com.sum.network.repository 2 | 3 | import com.sum.network.error.ApiException 4 | import com.sum.network.response.BaseResponse 5 | import kotlinx.coroutines.Dispatchers 6 | import kotlinx.coroutines.withContext 7 | import kotlinx.coroutines.withTimeout 8 | 9 | /** 10 | * @author mingyan.su 11 | * @date 2023/2/23 23:31 12 | * @desc 基础仓库 13 | */ 14 | open class BaseRepository { 15 | 16 | /** 17 | * IO中处理请求 18 | */ 19 | suspend fun requestResponse(requestCall: suspend () -> BaseResponse?): T? { 20 | val response = withContext(Dispatchers.IO) { 21 | withTimeout(10 * 1000) { 22 | requestCall() 23 | } 24 | } ?: return null 25 | 26 | if (response.isFailed()) { 27 | throw ApiException(response.errorCode, response.errorMsg) 28 | } 29 | return response.data 30 | } 31 | } -------------------------------------------------------------------------------- /lib_network/src/main/java/com/sum/network/response/BaseResponse.kt: -------------------------------------------------------------------------------- 1 | package com.sum.network.response 2 | 3 | /** 4 | * @author mingyan.su 5 | * @date 2023/2/24 13:10 6 | * @desc 通用数据类 7 | */ 8 | data class BaseResponse( 9 | val data: T?, 10 | val errorCode: Int = 0,//服务器状态码 这里0表示请求成功 11 | val errorMsg: String = ""//错误信息 12 | ) { 13 | 14 | /** 15 | * 判定接口返回是否正常 16 | */ 17 | fun isFailed(): Boolean { 18 | return errorCode != 0 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib_network/src/test/java/com/sum/network/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.sum.network 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 | } -------------------------------------------------------------------------------- /lib_room/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /lib_room/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/lib_room/consumer-rules.pro -------------------------------------------------------------------------------- /lib_room/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 -------------------------------------------------------------------------------- /lib_room/src/androidTest/java/com/sum/room/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.sum.room 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.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.getInstrumentation().targetContext 22 | assertEquals("com.sum.room.test", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /lib_room/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /lib_room/src/test/java/com/sum/room/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.sum.room 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 | } -------------------------------------------------------------------------------- /lib_stater/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /lib_stater/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'com.android.library' 3 | id 'org.jetbrains.kotlin.android' 4 | } 5 | 6 | android { 7 | compileSdk rootProject.android.compileSdk 8 | 9 | defaultConfig { 10 | minSdk rootProject.android.minSdk 11 | targetSdk rootProject.android.targetSdk 12 | 13 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 14 | consumerProguardFiles "consumer-rules.pro" 15 | } 16 | 17 | buildTypes { 18 | release { 19 | minifyEnabled false 20 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 21 | } 22 | } 23 | compileOptions { 24 | sourceCompatibility JavaVersion.VERSION_1_8 25 | targetCompatibility JavaVersion.VERSION_1_8 26 | } 27 | kotlinOptions { 28 | jvmTarget = '1.8' 29 | } 30 | } 31 | 32 | dependencies { 33 | compileOnly fileTree(dir: 'libs', include: ['*.jar']) 34 | compileOnly rootProject.depsLibs.coreKtx 35 | compileOnly rootProject.depsLibs.appcompat 36 | compileOnly rootProject.depsLibs.material 37 | 38 | compileOnly project(path: ':lib_framework') 39 | } -------------------------------------------------------------------------------- /lib_stater/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/lib_stater/consumer-rules.pro -------------------------------------------------------------------------------- /lib_stater/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 -------------------------------------------------------------------------------- /lib_stater/src/androidTest/java/com/sum/stater/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.sum.stater 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.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.getInstrumentation().targetContext 22 | assertEquals("com.sum.stater.test", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /lib_stater/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /lib_stater/src/main/java/com/sum/stater/TaskStat.kt: -------------------------------------------------------------------------------- 1 | package com.sum.stater 2 | 3 | import com.sum.stater.utils.DispatcherLog.i 4 | import java.util.concurrent.atomic.AtomicInteger 5 | 6 | /** 7 | * 任务开始 8 | */ 9 | object TaskStat { 10 | @Volatile 11 | private var sCurrentSituation = "" 12 | private val sBeans: MutableList = ArrayList() 13 | private var sTaskDoneCount = AtomicInteger() 14 | private const val sOpenLaunchStat = false // 是否开启统计 15 | var currentSituation: String 16 | get() = sCurrentSituation 17 | set(currentSituation) { 18 | if (!sOpenLaunchStat) { 19 | return 20 | } 21 | i("currentSituation $currentSituation") 22 | sCurrentSituation = currentSituation 23 | setLaunchStat() 24 | } 25 | 26 | fun markTaskDone() { 27 | sTaskDoneCount.getAndIncrement() 28 | } 29 | 30 | fun setLaunchStat() { 31 | val bean = TaskStatBean() 32 | bean.situation = sCurrentSituation 33 | bean.count = sTaskDoneCount.get() 34 | sBeans.add(bean) 35 | sTaskDoneCount = AtomicInteger(0) 36 | } 37 | } -------------------------------------------------------------------------------- /lib_stater/src/main/java/com/sum/stater/TaskStatBean.kt: -------------------------------------------------------------------------------- 1 | package com.sum.stater 2 | 3 | internal class TaskStatBean { 4 | var situation: String? = null 5 | var count = 0 6 | } -------------------------------------------------------------------------------- /lib_stater/src/main/java/com/sum/stater/dispatcher/DelayInitDispatcher.kt: -------------------------------------------------------------------------------- 1 | package com.sum.stater.dispatcher 2 | 3 | import android.os.Looper 4 | import android.os.MessageQueue.IdleHandler 5 | import com.sum.stater.task.DispatchRunnable 6 | import com.sum.stater.task.Task 7 | import java.util.LinkedList 8 | import java.util.Queue 9 | 10 | /** 11 | * 延迟初始化 12 | * 利用IdleHandler的等待主线程空闲特性,在空闲时才去执行任务 13 | */ 14 | class DelayInitDispatcher { 15 | // 任务集合 16 | private val mDelayTasks: Queue = LinkedList() 17 | 18 | private val mIdleHandler = IdleHandler { 19 | if (mDelayTasks.size > 0) { 20 | val task = mDelayTasks.poll() 21 | task?.let { 22 | DispatchRunnable(it).run() 23 | } 24 | } 25 | !mDelayTasks.isEmpty() 26 | } 27 | 28 | /** 29 | * 添加任务 30 | */ 31 | fun addTask(task: Task): DelayInitDispatcher { 32 | mDelayTasks.add(task) 33 | return this 34 | } 35 | 36 | /** 37 | * 开启延迟启动器 38 | */ 39 | fun start() { 40 | Looper.myQueue().addIdleHandler(mIdleHandler) 41 | } 42 | } -------------------------------------------------------------------------------- /lib_stater/src/main/java/com/sum/stater/utils/DispatcherLog.kt: -------------------------------------------------------------------------------- 1 | package com.sum.stater.utils 2 | 3 | import com.sum.framework.helper.SumAppHelper 4 | import com.sum.framework.log.LogUtil 5 | 6 | object DispatcherLog { 7 | var isDebug = SumAppHelper.isDebug() 8 | 9 | @JvmStatic 10 | fun i(msg: String?) { 11 | if (msg == null) { 12 | return 13 | } 14 | LogUtil.i(msg, tag = "StartTask") 15 | } 16 | } -------------------------------------------------------------------------------- /lib_stater/src/main/java/com/sum/stater/utils/LaunchTimer.kt: -------------------------------------------------------------------------------- 1 | package com.sum.stater.utils 2 | 3 | import com.sum.framework.log.LogUtil 4 | 5 | /** 6 | * 自定义埋点工具 7 | */ 8 | object LaunchTimer { 9 | object LaunchTimer { 10 | private var currentTime: Long = 0 11 | 12 | // 记录开始时间 13 | fun startRecord() { 14 | currentTime = System.currentTimeMillis() 15 | } 16 | 17 | // 记录结束时间,某个tag的耗时 18 | @JvmOverloads 19 | fun stopRecord(title: String = "") { 20 | val t = System.currentTimeMillis() - currentTime 21 | LogUtil.d("$title | time:$t", tag = "LaunchTimer") 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /lib_stater/src/test/java/com/sum/stater/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.sum.stater 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 | } -------------------------------------------------------------------------------- /mod_demo/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /mod_demo/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_demo/consumer-rules.pro -------------------------------------------------------------------------------- /mod_demo/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 -------------------------------------------------------------------------------- /mod_demo/src/androidTest/java/com/sum/demo/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.sum.demo 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.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.getInstrumentation().targetContext 22 | assertEquals("com.sum.demo.test", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /mod_demo/src/main/java/com/sum/demo/lifecycle/DemoLifecycleActivity.kt: -------------------------------------------------------------------------------- 1 | package com.sum.demo.lifecycle 2 | 3 | import android.os.Bundle 4 | import com.alibaba.android.arouter.facade.annotation.Route 5 | import com.sum.common.constant.DEMO_ACTIVITY_LIFECYCLE 6 | import com.sum.demo.databinding.ActivityLifecycleBinding 7 | import com.sum.framework.base.BaseDataBindActivity 8 | 9 | /** 10 | * @author mingyan.su 11 | * @date 2023/6/9 18:32 12 | * @desc Lifecycle三种使用方式 13 | */ 14 | @Route(path = DEMO_ACTIVITY_LIFECYCLE) 15 | class DemoLifecycleActivity : BaseDataBindActivity() { 16 | override fun initView(savedInstanceState: Bundle?) { 17 | //第一种.注册观察者,观察宿主生命周期状态变化 18 | val observer = MyLifecycleObserver() 19 | lifecycle.addObserver(observer) 20 | 21 | //第二种 22 | val observer2 = MyFullLifeObserver() 23 | lifecycle.addObserver(observer2) 24 | 25 | //第三种 26 | val observer3 = MyLifecycleEventObserver() 27 | lifecycle.addObserver(observer3) 28 | } 29 | } -------------------------------------------------------------------------------- /mod_demo/src/main/java/com/sum/demo/livedata/LiveDataViewModel.kt: -------------------------------------------------------------------------------- 1 | package com.sum.demo.livedata 2 | 3 | import androidx.lifecycle.MediatorLiveData 4 | import androidx.lifecycle.MutableLiveData 5 | import androidx.lifecycle.ViewModel 6 | import androidx.lifecycle.viewModelScope 7 | import kotlinx.coroutines.delay 8 | import kotlinx.coroutines.launch 9 | 10 | /** 11 | * @author mingyan.su 12 | * @date 2023/6/28 17:42 13 | * @desc 14 | */ 15 | class LiveDataViewModel : ViewModel() { 16 | val userLiveData = MutableLiveData() 17 | 18 | fun getUserInfo() { 19 | // 模拟请求接口返回数据 20 | viewModelScope.launch { 21 | delay(1000) 22 | userLiveData.postValue("苏火火 苏火火 苏火火 苏火火 苏火火") 23 | } 24 | } 25 | 26 | 27 | val shareLiveData = MutableLiveData() 28 | 29 | } -------------------------------------------------------------------------------- /mod_demo/src/main/java/com/sum/demo/navigation/DemoNavigationActivity.kt: -------------------------------------------------------------------------------- 1 | package com.sum.demo.navigation 2 | 3 | import android.os.Bundle 4 | import androidx.navigation.findNavController 5 | import com.alibaba.android.arouter.facade.annotation.Route 6 | import com.sum.common.constant.DEMO_ACTIVITY_NAVIGATION 7 | import com.sum.demo.R 8 | import com.sum.demo.databinding.ActivityNavigationBinding 9 | import com.sum.framework.base.BaseDataBindActivity 10 | 11 | /** 12 | * @author mingyan.su 13 | * @date 2023/5/12 15:32 14 | * @desc Navigation Demo 15 | */ 16 | @Route(path = DEMO_ACTIVITY_NAVIGATION) 17 | class DemoNavigationActivity : BaseDataBindActivity() { 18 | 19 | override fun initView(savedInstanceState: Bundle?) { 20 | // MainFragment 为首次加载的Fragment 21 | val navController = findNavController(R.id.nav_host_fragment) 22 | 23 | //进入页面 24 | // navController.navigate(Uri.parse("www.baidu.com")) 25 | // 26 | // //回退页面 27 | // navController.navigateUp() 28 | // navController.popBackStack( 29 | // R.id.blankFragment, 30 | // true 31 | // )//回退到blankFragment页面,inclusive表示是否一同将blankFragment回退 32 | } 33 | } -------------------------------------------------------------------------------- /mod_demo/src/main/java/com/sum/demo/navigation/NavActivity.kt: -------------------------------------------------------------------------------- 1 | package com.sum.demo.navigation 2 | 3 | import android.os.Bundle 4 | import androidx.appcompat.app.AppCompatActivity 5 | import com.sum.demo.databinding.ActivityNavBinding 6 | 7 | /** 8 | * @author mingyan.su 9 | * @date 2023/5/12 16:46 10 | * @desc MineNavActivity 11 | */ 12 | class NavActivity : AppCompatActivity() { 13 | 14 | override fun onCreate(savedInstanceState: Bundle?) { 15 | super.onCreate(savedInstanceState) 16 | val binding = ActivityNavBinding.inflate(layoutInflater) 17 | setContentView(binding.root) 18 | } 19 | } -------------------------------------------------------------------------------- /mod_demo/src/main/java/com/sum/demo/navigation/NavDialog.kt: -------------------------------------------------------------------------------- 1 | package com.sum.demo.navigation 2 | 3 | import android.os.Bundle 4 | import android.view.LayoutInflater 5 | import android.view.View 6 | import android.view.ViewGroup 7 | import androidx.fragment.app.DialogFragment 8 | import com.sum.demo.databinding.DialogNavBinding 9 | 10 | /** 11 | * @author mingyan.su 12 | * @date 2023/6/5 15:38 13 | * @desc 14 | */ 15 | class NavDialog : DialogFragment() { 16 | lateinit var binding: DialogNavBinding 17 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { 18 | super.onViewCreated(view, savedInstanceState) 19 | } 20 | 21 | override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { 22 | binding = DialogNavBinding.inflate(layoutInflater) 23 | return binding.root 24 | } 25 | } -------------------------------------------------------------------------------- /mod_demo/src/main/java/com/sum/demo/navigation/NavFragment.kt: -------------------------------------------------------------------------------- 1 | package com.sum.demo.navigation 2 | 3 | import android.os.Bundle 4 | import android.view.LayoutInflater 5 | import android.view.View 6 | import android.view.ViewGroup 7 | import androidx.fragment.app.Fragment 8 | import com.sum.demo.databinding.FragmentNavBinding 9 | 10 | /** 11 | * @author mingyan.su 12 | * @date 2023/5/12 16:46 13 | * @desc HomeNavFragment 14 | */ 15 | class NavFragment : Fragment() { 16 | 17 | lateinit var binding: FragmentNavBinding 18 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { 19 | super.onViewCreated(view, savedInstanceState) 20 | // findNavController().navigate(R.id.nav_find) 21 | } 22 | 23 | override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { 24 | binding = FragmentNavBinding.inflate(layoutInflater) 25 | return binding.root 26 | } 27 | } -------------------------------------------------------------------------------- /mod_demo/src/main/java/com/sum/demo/viewbinding/BindingAdapterExt.kt: -------------------------------------------------------------------------------- 1 | package com.sum.demo.viewbinding 2 | 3 | import android.widget.Button 4 | import android.widget.ImageView 5 | import androidx.databinding.BindingAdapter 6 | import com.sum.glide.setUrl 7 | import com.sum.glide.setUrlRound 8 | 9 | 10 | /** 11 | * @author mingyan.su 12 | * @date 2023/12/15 23:32 13 | * @desc BindingAdapter扩展类 14 | */ 15 | 16 | /** 17 | * 1.需要定义成public static ,使用BindingAdapter注解并标记 18 | * 2.value中的字段根据需要添加,与方法参数一一对应 19 | * 3.requireAll代表是否以下两个属性在xml中同时使用才会调用到该方法,为false的话,只要有一个属性被使用就能调用该方法 20 | */ 21 | @BindingAdapter(value = ["imageUrl", "radius"], requireAll = false) 22 | fun setImageUrl(view: ImageView, imageUrl: String, radius: Int) { 23 | if (radius > 0) { 24 | view.setUrlRound(imageUrl, radius) 25 | } else { 26 | view.setUrl(imageUrl) 27 | } 28 | } 29 | 30 | @BindingAdapter("android:text") 31 | fun setText(view: Button, text: String) { 32 | view.text = "$text-改变原生控件属性" 33 | } -------------------------------------------------------------------------------- /mod_demo/src/main/java/com/sum/demo/viewbinding/ViewBindingActivity.kt: -------------------------------------------------------------------------------- 1 | package com.sum.demo.viewbinding 2 | 3 | import android.os.Bundle 4 | import androidx.appcompat.app.AppCompatActivity 5 | import com.alibaba.android.arouter.facade.annotation.Route 6 | import com.sum.common.constant.DEMO_ACTIVITY_VIEWBINDING 7 | import com.sum.demo.databinding.ActivityViewBindingBinding 8 | 9 | /** 10 | * @author mingyan.su 11 | * @date 2023/7/5 07:21 12 | * @desc ViewBindingDemo 13 | */ 14 | @Route(path = DEMO_ACTIVITY_VIEWBINDING) 15 | class ViewBindingActivity : AppCompatActivity() { 16 | override fun onCreate(savedInstanceState: Bundle?) { 17 | super.onCreate(savedInstanceState) 18 | 19 | // 解析ActivityViewBindingBinding 20 | val binding = ActivityViewBindingBinding.inflate(layoutInflater) 21 | val contentView = binding.root 22 | setContentView(contentView) 23 | 24 | // 通过binding对象直接获取到xml中的控件 25 | binding.tvName.text = "苏火火苏火火" 26 | binding.tvName.setOnClickListener { 27 | 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /mod_demo/src/main/java/com/sum/demo/viewmodel/UserFragment.kt: -------------------------------------------------------------------------------- 1 | package com.sum.demo.viewmodel 2 | 3 | import android.os.Bundle 4 | import android.view.View 5 | import androidx.lifecycle.ViewModelProvider 6 | import com.sum.demo.databinding.FragmentViewmodelVideoBinding 7 | import com.sum.framework.base.BaseDataBindFragment 8 | import com.sum.framework.ext.gone 9 | 10 | /** 11 | * @author mingyan.su 12 | * @date 2023/6/17 08:28 13 | * @desc 14 | */ 15 | class UserFragment : BaseDataBindFragment() { 16 | override fun initView(view: View, savedInstanceState: Bundle?) { 17 | mBinding?.tvTitle?.text = "UserFragment" 18 | mBinding?.tvSaveInfo?.gone() 19 | mBinding?.rlRoot?.setBackgroundResource(com.sum.common.R.color.colorAccent) 20 | val viewModel = ViewModelProvider(requireActivity()).get(MainViewModel::class.java) 21 | // 获取ViewModel,注意传入的是宿主Activity 22 | viewModel.shareLiveData.observe(this) { 23 | mBinding?.tvTitle?.text = "UserFragment \n\n\n $it" 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /mod_demo/src/main/java/com/sum/demo/viewmodel/VideoFragment.kt: -------------------------------------------------------------------------------- 1 | package com.sum.demo.viewmodel 2 | 3 | import android.os.Bundle 4 | import android.view.View 5 | import androidx.lifecycle.ViewModelProvider 6 | import com.sum.demo.databinding.FragmentViewmodelVideoBinding 7 | import com.sum.framework.base.BaseDataBindFragment 8 | import com.sum.framework.ext.onClick 9 | 10 | /** 11 | * @author mingyan.su 12 | * @date 2023/6/17 08:28 13 | * @desc 14 | */ 15 | class VideoFragment : BaseDataBindFragment() { 16 | override fun initView(view: View, savedInstanceState: Bundle?) { 17 | // 获取ViewModel,注意传入的是宿主Activity 18 | val viewModel = ViewModelProvider(requireActivity()).get(MainViewModel::class.java) 19 | mBinding?.tvSaveInfo?.onClick { 20 | viewModel.shareLiveData.value = "数据共享:VideoFragment中的数据" 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /mod_demo/src/main/res/layout/activity_lifecycle.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 22 | 23 | -------------------------------------------------------------------------------- /mod_demo/src/main/res/layout/activity_nav.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 21 | 22 | -------------------------------------------------------------------------------- /mod_demo/src/main/res/layout/activity_navigation.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 14 | 15 | -------------------------------------------------------------------------------- /mod_demo/src/main/res/layout/activity_view_binding.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 20 | -------------------------------------------------------------------------------- /mod_demo/src/main/res/layout/fragment_nav.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 21 | 22 | -------------------------------------------------------------------------------- /mod_demo/src/main/res/layout/layout_binding_include.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 20 | -------------------------------------------------------------------------------- /mod_demo/src/main/res/layout/layout_binding_viewstub.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | 21 | -------------------------------------------------------------------------------- /mod_demo/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /mod_demo/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /mod_demo/src/test/java/com/sum/demo/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.sum.demo 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 | } -------------------------------------------------------------------------------- /mod_login/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /mod_login/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_login/consumer-rules.pro -------------------------------------------------------------------------------- /mod_login/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 -------------------------------------------------------------------------------- /mod_login/src/androidTest/java/com/sum/login/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.sum.login 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.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.getInstrumentation().targetContext 22 | assertEquals("com.sum.login.test", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /mod_login/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 15 | 20 | 24 | 25 | -------------------------------------------------------------------------------- /mod_login/src/main/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /mod_login/src/main/java/com/sum/login/login/LoginRepository.kt: -------------------------------------------------------------------------------- 1 | package com.sum.login.login 2 | 3 | import com.sum.common.model.User 4 | import com.sum.network.manager.ApiManager 5 | import com.sum.network.repository.BaseRepository 6 | 7 | /** 8 | * @author mingyan.su 9 | * @date 2023/3/24 18:36 10 | * @desc 登录仓库 11 | */ 12 | class LoginRepository : BaseRepository() { 13 | 14 | /** 15 | * 登录 16 | * @param username 用户名 17 | * @param password 密码 18 | */ 19 | suspend fun login(username: String, password: String): User? { 20 | return requestResponse { 21 | ApiManager.api.login(username, password) 22 | } 23 | } 24 | 25 | /** 26 | * 注册 27 | * @param username 用户名 28 | * @param password 密码 29 | * @param repassword 确认密码 30 | */ 31 | suspend fun register(username: String, password: String, repassword: String): User? { 32 | return requestResponse { 33 | ApiManager.api.register(username, password, repassword) 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /mod_login/src/main/java/com/sum/login/policy/PrivacyPolicyActivity.kt: -------------------------------------------------------------------------------- 1 | package com.sum.login.policy 2 | 3 | import android.content.Context 4 | import android.content.Intent 5 | import android.os.Bundle 6 | import com.alibaba.android.arouter.facade.annotation.Route 7 | import com.sum.common.constant.Login_ACTIVITY_POLICY 8 | import com.sum.framework.base.BaseDataBindActivity 9 | import com.sum.login.databinding.ActivityPrivacyPolicyBinding 10 | 11 | /** 12 | * @author mingyan.su 13 | * @date 2023/4/26 12:57 14 | * @desc 隐私协议 15 | */ 16 | @Route(path = Login_ACTIVITY_POLICY) 17 | class PrivacyPolicyActivity : BaseDataBindActivity() { 18 | 19 | companion object { 20 | fun start(context: Context) { 21 | val intent = Intent(context, PrivacyPolicyActivity::class.java) 22 | context.startActivity(intent) 23 | } 24 | } 25 | 26 | override fun initView(savedInstanceState: Bundle?) { 27 | 28 | } 29 | } -------------------------------------------------------------------------------- /mod_login/src/main/res/drawable/checkbox_bg_default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /mod_login/src/main/res/drawable/login_phone_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /mod_login/src/main/res/mipmap-xhdpi/ic_agreement_default.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_login/src/main/res/mipmap-xhdpi/ic_agreement_default.webp -------------------------------------------------------------------------------- /mod_login/src/main/res/mipmap-xhdpi/ic_agreement_select.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_login/src/main/res/mipmap-xhdpi/ic_agreement_select.webp -------------------------------------------------------------------------------- /mod_login/src/main/res/mipmap-xxhdpi/ic_agreement_default.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_login/src/main/res/mipmap-xxhdpi/ic_agreement_default.webp -------------------------------------------------------------------------------- /mod_login/src/main/res/mipmap-xxhdpi/ic_agreement_select.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_login/src/main/res/mipmap-xxhdpi/ic_agreement_select.webp -------------------------------------------------------------------------------- /mod_login/src/main/res/mipmap-xxhdpi/ic_psw_invisible.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_login/src/main/res/mipmap-xxhdpi/ic_psw_invisible.webp -------------------------------------------------------------------------------- /mod_login/src/main/res/mipmap-xxhdpi/ic_psw_visible.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_login/src/main/res/mipmap-xxhdpi/ic_psw_visible.webp -------------------------------------------------------------------------------- /mod_login/src/main/res/mipmap-xxhdpi/ic_qq.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_login/src/main/res/mipmap-xxhdpi/ic_qq.webp -------------------------------------------------------------------------------- /mod_login/src/main/res/mipmap-xxhdpi/ic_wechat.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_login/src/main/res/mipmap-xxhdpi/ic_wechat.webp -------------------------------------------------------------------------------- /mod_login/src/main/res/mipmap-xxhdpi/ic_weibo.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_login/src/main/res/mipmap-xxhdpi/ic_weibo.webp -------------------------------------------------------------------------------- /mod_login/src/test/java/com/sum/login/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.sum.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 | } -------------------------------------------------------------------------------- /mod_main/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /mod_main/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/consumer-rules.pro -------------------------------------------------------------------------------- /mod_main/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 -------------------------------------------------------------------------------- /mod_main/src/androidTest/java/com/sum/main/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.sum.main 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.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.getInstrumentation().targetContext 22 | assertEquals("com.sum.main.test", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /mod_main/src/main/java/com/sum/main/navigator/WindowFrameLayout.kt: -------------------------------------------------------------------------------- 1 | package com.sum.main.navigator 2 | 3 | import android.content.Context 4 | import android.util.AttributeSet 5 | import android.view.View 6 | import android.view.WindowInsets 7 | import android.widget.FrameLayout 8 | 9 | /** 10 | * 处理Navigation重建问题 11 | */ 12 | class WindowFrameLayout(context: Context, attributeSet: AttributeSet? = null, defStyle: Int = 0) : 13 | FrameLayout(context, attributeSet, defStyle) { 14 | 15 | 16 | override fun addView(child: View?) { 17 | super.addView(child) 18 | requestApplyInsets() 19 | } 20 | 21 | override fun dispatchApplyWindowInsets(insets: WindowInsets?): WindowInsets { 22 | var windowInsets = super.dispatchApplyWindowInsets(insets) 23 | if (insets?.isConsumed == false) { 24 | val count = childCount 25 | for (i in 0 until count) { 26 | windowInsets = getChildAt(i).dispatchApplyWindowInsets(insets) 27 | } 28 | } 29 | return windowInsets 30 | } 31 | } -------------------------------------------------------------------------------- /mod_main/src/main/java/com/sum/main/navigator/WindowNavHostFragment.kt: -------------------------------------------------------------------------------- 1 | package com.sum.main.navigator 2 | 3 | import android.os.Bundle 4 | import android.view.LayoutInflater 5 | import android.view.View 6 | import android.view.ViewGroup 7 | import androidx.navigation.fragment.NavHostFragment 8 | 9 | /** 10 | * 处理Navigation重建问题 11 | */ 12 | class WindowNavHostFragment : NavHostFragment() { 13 | override fun onCreateView( 14 | inflater: LayoutInflater, 15 | container: ViewGroup?, 16 | savedInstanceState: Bundle? 17 | ): View { 18 | val frameLayout = WindowFrameLayout(inflater.context) 19 | frameLayout.id = id 20 | return frameLayout 21 | } 22 | } -------------------------------------------------------------------------------- /mod_main/src/main/java/com/sum/main/service/MainService.kt: -------------------------------------------------------------------------------- 1 | package com.sum.main.service 2 | 3 | import android.content.Context 4 | import com.alibaba.android.arouter.facade.annotation.Route 5 | import com.sum.common.constant.MAIN_SERVICE_HOME 6 | import com.sum.common.service.IMainService 7 | import com.sum.main.MainActivity 8 | import com.sum.main.ui.ArticleDetailActivity 9 | 10 | /** 11 | * @author mingyan.su 12 | * @date 2023/3/26 18:23 13 | * @desc 主页服务 14 | * 提供对IMainService接口的具体实现 15 | */ 16 | @Route(path = MAIN_SERVICE_HOME) 17 | class MainService : IMainService { 18 | /** 19 | * 跳转主页 20 | * @param context 21 | * @param index tab位置 22 | */ 23 | override fun toMain(context: Context, index: Int) { 24 | MainActivity.start(context, index) 25 | } 26 | 27 | /** 28 | * 跳转主页 29 | * @param context 30 | * @param url 31 | * @param title 标题 32 | */ 33 | override fun toArticleDetail(context: Context, url: String, title: String) { 34 | ArticleDetailActivity.start(context, url, title) 35 | } 36 | 37 | override fun init(context: Context?) { 38 | } 39 | } -------------------------------------------------------------------------------- /mod_main/src/main/java/com/sum/main/ui/SplashActivity.kt: -------------------------------------------------------------------------------- 1 | package com.sum.main.ui 2 | 3 | import android.os.Bundle 4 | import androidx.lifecycle.lifecycleScope 5 | import com.sum.common.provider.MainServiceProvider 6 | import com.sum.framework.base.BaseDataBindActivity 7 | import com.sum.framework.ext.countDownCoroutines 8 | import com.sum.framework.ext.onClick 9 | import com.sum.framework.utils.StatusBarSettingHelper 10 | import com.sum.main.R 11 | import com.sum.main.databinding.ActivitySplashBinding 12 | 13 | /** 14 | * @author mingyan.su 15 | * @date 2023/3/29 14:25 16 | * @desc 启动页 17 | */ 18 | class SplashActivity : BaseDataBindActivity() { 19 | 20 | override fun initView(savedInstanceState: Bundle?) { 21 | StatusBarSettingHelper.setStatusBarTranslucent(this) 22 | mBinding.tvSkip.onClick { 23 | MainServiceProvider.toMain(this) 24 | } 25 | //倒计时 26 | countDownCoroutines(2, lifecycleScope, onTick = { 27 | mBinding.tvSkip.text = getString(R.string.splash_time, it.plus(1).toString()) 28 | }) { 29 | MainServiceProvider.toMain(this) 30 | finish() 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /mod_main/src/main/java/com/sum/main/ui/category/viewmodel/CategoryViewModel.kt: -------------------------------------------------------------------------------- 1 | package com.sum.main.ui.category.viewmodel 2 | 3 | import androidx.lifecycle.MutableLiveData 4 | import com.sum.common.model.CategoryItem 5 | import com.sum.framework.toast.TipsToast 6 | import com.sum.network.callback.IApiErrorCallback 7 | import com.sum.network.manager.ApiManager 8 | import com.sum.network.viewmodel.BaseViewModel 9 | 10 | /** 11 | * @author mingyan.su 12 | * @date 2023/3/3 8:12 13 | * @desc 分类ViewModel 14 | */ 15 | class CategoryViewModel : BaseViewModel() { 16 | val categoryItemLiveData = MutableLiveData?>() 17 | 18 | /** 19 | * 获取分类信息 20 | * 不依赖repository,错误回调实现IApiErrorCallback 21 | */ 22 | fun getCategoryData() { 23 | launchUIWithResult(responseBlock = { 24 | ApiManager.api.getCategoryData() 25 | }, errorCall = object : IApiErrorCallback { 26 | override fun onError(code: Int?, error: String?) { 27 | super.onError(code, error) 28 | TipsToast.showTips(error) 29 | categoryItemLiveData.value = null 30 | } 31 | }) { 32 | categoryItemLiveData.value = it 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /mod_main/src/main/java/com/sum/main/ui/system/adapter/SystemSecondAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.sum.main.ui.system.adapter 2 | 3 | import android.view.LayoutInflater 4 | import android.view.ViewGroup 5 | import com.sum.common.model.SystemSecondList 6 | import com.sum.framework.adapter.BaseBindViewHolder 7 | import com.sum.framework.adapter.BaseRecyclerViewAdapter 8 | import com.sum.main.databinding.LayoutSystemSecondItemBinding 9 | 10 | /** 11 | * @author mingyan.su 12 | * @date 2023/3/21 8:49 13 | * @desc 体系adapter 14 | */ 15 | class SystemSecondAdapter : BaseRecyclerViewAdapter() { 16 | 17 | override fun getViewBinding( 18 | layoutInflater: LayoutInflater, 19 | parent: ViewGroup, 20 | viewType: Int 21 | ): LayoutSystemSecondItemBinding { 22 | return LayoutSystemSecondItemBinding.inflate(layoutInflater, parent, false) 23 | } 24 | 25 | override fun onBindDefViewHolder( 26 | holder: BaseBindViewHolder, 27 | item: SystemSecondList?, 28 | position: Int 29 | ) { 30 | if (item == null) return 31 | holder.binding.apply { 32 | tvName.text = item.name 33 | } 34 | } 35 | 36 | } -------------------------------------------------------------------------------- /mod_main/src/main/res/color/selector_tab_color.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /mod_main/src/main/res/drawable/bg_skip_btn.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /mod_main/src/main/res/drawable/ic_dashboard_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /mod_main/src/main/res/drawable/ic_home_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /mod_main/src/main/res/drawable/ic_notifications_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /mod_main/src/main/res/drawable/selector_tab_home.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /mod_main/src/main/res/layout/activity_article_detail.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | 20 | -------------------------------------------------------------------------------- /mod_main/src/main/res/layout/fragment_article_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 16 | 17 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /mod_main/src/main/res/layout/fragment_category_second.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | 17 | 18 | 23 | 24 | -------------------------------------------------------------------------------- /mod_main/src/main/res/layout/fragment_home_video.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 16 | 17 | 21 | 22 | 23 | 28 | 29 | -------------------------------------------------------------------------------- /mod_main/src/main/res/layout/layout_category_second_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 23 | -------------------------------------------------------------------------------- /mod_main/src/main/res/layout/layout_system_second_item.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /mod_main/src/main/res/menu/bottom_nav_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 13 | 14 | 18 | 19 | 23 | 24 | -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xhdpi/ic_mine_help.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xhdpi/ic_mine_help.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xhdpi/ic_mine_message.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xhdpi/ic_mine_message.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xhdpi/ic_mine_work.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xhdpi/ic_mine_work.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xhdpi/ic_navi_cart.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xhdpi/ic_navi_cart.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xhdpi/ic_navi_cart_select.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xhdpi/ic_navi_cart_select.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xhdpi/ic_navi_categories.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xhdpi/ic_navi_categories.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xhdpi/ic_navi_categories_select.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xhdpi/ic_navi_categories_select.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xhdpi/ic_navi_find.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xhdpi/ic_navi_find.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xhdpi/ic_navi_find_select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xhdpi/ic_navi_find_select.png -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xhdpi/ic_navi_home.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xhdpi/ic_navi_home.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xhdpi/ic_navi_home_select.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xhdpi/ic_navi_home_select.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xhdpi/ic_navi_home_select_big.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xhdpi/ic_navi_home_select_big.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xhdpi/ic_navi_home_select_scroll_top.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xhdpi/ic_navi_home_select_scroll_top.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xhdpi/ic_navi_mine.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xhdpi/ic_navi_mine.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xhdpi/ic_navi_mine_select.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xhdpi/ic_navi_mine_select.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xhdpi/mine_address_ico.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xhdpi/mine_address_ico.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xhdpi/mine_cart.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xhdpi/mine_cart.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xhdpi/mine_comment_lab.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xhdpi/mine_comment_lab.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xhdpi/mine_consign_earnings.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xhdpi/mine_consign_earnings.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xhdpi/mine_consign_plan.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xhdpi/mine_consign_plan.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xhdpi/mine_consign_sale.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xhdpi/mine_consign_sale.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xhdpi/mine_coupon_ico.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xhdpi/mine_coupon_ico.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xhdpi/mine_exp_ico.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xhdpi/mine_exp_ico.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xhdpi/mine_reduced_amount.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xhdpi/mine_reduced_amount.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xhdpi/mine_sale_center.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xhdpi/mine_sale_center.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xhdpi/mine_service_ico.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xhdpi/mine_service_ico.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xhdpi/mine_setting_ico.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xhdpi/mine_setting_ico.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xhdpi/mine_unpay_ico.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xhdpi/mine_unpay_ico.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xhdpi/shadow_video_bottom.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xhdpi/shadow_video_bottom.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xhdpi/shadow_video_top.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xhdpi/shadow_video_top.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/bg_welcome.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/bg_welcome.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/ic_mine_help.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/ic_mine_help.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/ic_mine_message.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/ic_mine_message.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/ic_mine_work.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/ic_mine_work.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/ic_navi_cart.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/ic_navi_cart.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/ic_navi_cart_select.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/ic_navi_cart_select.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/ic_navi_categories.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/ic_navi_categories.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/ic_navi_categories_select.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/ic_navi_categories_select.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/ic_navi_find.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/ic_navi_find.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/ic_navi_find_select.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/ic_navi_find_select.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/ic_navi_home.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/ic_navi_home.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/ic_navi_home_select.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/ic_navi_home_select.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/ic_navi_home_select_big.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/ic_navi_home_select_big.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/ic_navi_home_select_scroll_top.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/ic_navi_home_select_scroll_top.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/ic_navi_mine.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/ic_navi_mine.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/ic_navi_mine_select.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/ic_navi_mine_select.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/mine_address_ico.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/mine_address_ico.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/mine_cart.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/mine_cart.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/mine_collect_ico.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/mine_collect_ico.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/mine_comment_lab.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/mine_comment_lab.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/mine_consign_earnings.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/mine_consign_earnings.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/mine_consign_plan.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/mine_consign_plan.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/mine_consign_sale.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/mine_consign_sale.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/mine_coupon_ico.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/mine_coupon_ico.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/mine_exp_ico.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/mine_exp_ico.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/mine_reduced_amount.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/mine_reduced_amount.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/mine_sale_center.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/mine_sale_center.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/mine_service_ico.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/mine_service_ico.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/mine_setting_ico.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/mine_setting_ico.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/mine_unpay_ico.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/mine_unpay_ico.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/shadow_video_bottom.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/shadow_video_bottom.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/mipmap-xxhdpi/shadow_video_top.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_main/src/main/res/mipmap-xxhdpi/shadow_video_top.webp -------------------------------------------------------------------------------- /mod_main/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /mod_main/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | -------------------------------------------------------------------------------- /mod_main/src/main/res/xml/backup_rules.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 13 | -------------------------------------------------------------------------------- /mod_main/src/main/res/xml/data_extraction_rules.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 12 | 13 | 19 | -------------------------------------------------------------------------------- /mod_main/src/test/java/com/sum/main/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.sum.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 | } -------------------------------------------------------------------------------- /mod_search/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /mod_search/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_search/consumer-rules.pro -------------------------------------------------------------------------------- /mod_search/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 -------------------------------------------------------------------------------- /mod_search/src/androidTest/java/com/sum/search/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.sum.search 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.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.getInstrumentation().targetContext 22 | assertEquals("com.sum.search.test", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /mod_search/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 11 | 12 | -------------------------------------------------------------------------------- /mod_search/src/main/java/com/sum/search/service/SearchService.kt: -------------------------------------------------------------------------------- 1 | package com.sum.search.service 2 | 3 | import android.content.Context 4 | import android.content.Intent 5 | import com.alibaba.android.arouter.facade.annotation.Route 6 | import com.sum.common.constant.SEARCH_SERVICE_SEARCH 7 | import com.sum.common.service.ISearchService 8 | import com.sum.search.activity.SearchActivity 9 | import com.sum.search.manager.SearchManager 10 | 11 | /** 12 | * @author mingyan.su 13 | * @date 2023/3/29 23:26 14 | * @desc 搜索Service 15 | * 提供对ISearchService接口的具体实现 16 | */ 17 | @Route(path = "/search/service/search22") 18 | class SearchService : ISearchService { 19 | 20 | /** 21 | * 跳转搜索页 22 | * @param context 23 | */ 24 | override fun toSearch(context: Context) { 25 | val intent = Intent(context, SearchActivity::class.java) 26 | context.startActivity(intent) 27 | } 28 | 29 | /** 30 | * 清除搜索历史缓存 31 | */ 32 | override fun clearSearchHistoryCache() { 33 | SearchManager.clearSearchHistory() 34 | } 35 | 36 | override fun init(context: Context?) { 37 | 38 | } 39 | } -------------------------------------------------------------------------------- /mod_search/src/main/res/layout/layout_history_search_chip_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | -------------------------------------------------------------------------------- /mod_search/src/main/res/mipmap-xhdpi/ic_gary_search.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_search/src/main/res/mipmap-xhdpi/ic_gary_search.webp -------------------------------------------------------------------------------- /mod_search/src/main/res/mipmap-xxhdpi/ic_delete.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_search/src/main/res/mipmap-xxhdpi/ic_delete.webp -------------------------------------------------------------------------------- /mod_search/src/main/res/mipmap-xxhdpi/ic_gary_search.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_search/src/main/res/mipmap-xxhdpi/ic_gary_search.webp -------------------------------------------------------------------------------- /mod_search/src/main/res/mipmap-xxhdpi/ic_search_empty.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_search/src/main/res/mipmap-xxhdpi/ic_search_empty.webp -------------------------------------------------------------------------------- /mod_search/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /mod_search/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 请输入您想搜索的内容 4 | 搜索 5 | 搜索历史 6 | 搜索推荐 7 | 是否清除搜索历史记录? 8 | 没有找到您要搜索的内容,换个关键词试试~ 9 | -------------------------------------------------------------------------------- /mod_search/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /mod_search/src/test/java/com/sum/search/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.sum.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 | } -------------------------------------------------------------------------------- /mod_user/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /mod_user/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_user/consumer-rules.pro -------------------------------------------------------------------------------- /mod_user/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 -------------------------------------------------------------------------------- /mod_user/src/androidTest/java/com/sum/user/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.sum.user 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.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.getInstrumentation().targetContext 22 | assertEquals("com.sum.user.test", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /mod_user/src/main/res/drawable/bg_ffffff_corner12.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /mod_user/src/main/res/mipmap-xxhdpi/wechat.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_user/src/main/res/mipmap-xxhdpi/wechat.webp -------------------------------------------------------------------------------- /mod_user/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /mod_user/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /mod_user/src/test/java/com/sum/user/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.sum.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 | } -------------------------------------------------------------------------------- /mod_video/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /mod_video/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_video/consumer-rules.pro -------------------------------------------------------------------------------- /mod_video/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 -------------------------------------------------------------------------------- /mod_video/src/androidTest/java/com/sum/mod_video/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.sum.mod_video 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.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.getInstrumentation().targetContext 22 | assertEquals("com.sum.mod_video.test", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /mod_video/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 13 | 14 | -------------------------------------------------------------------------------- /mod_video/src/main/java/com/sum/video/listener/OnViewPagerListener.kt: -------------------------------------------------------------------------------- 1 | package com.sum.video.listener 2 | 3 | import android.view.View 4 | 5 | /** 6 | * itemView选中回调 7 | */ 8 | interface OnViewPagerListener { 9 | /** 10 | * 初始化 11 | */ 12 | fun onInitComplete(view: View?) 13 | 14 | /** 15 | * 释放 16 | */ 17 | fun onPageRelease(isNext: Boolean, position: Int, view: View?) 18 | 19 | /** 20 | * 选中 21 | */ 22 | fun onPageSelected(position: Int, isBottom: Boolean, view: View?) 23 | } -------------------------------------------------------------------------------- /mod_video/src/main/res/drawable/bg_white_80ffffff_radius30.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | -------------------------------------------------------------------------------- /mod_video/src/main/res/mipmap-xxhdpi/default_video_head.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_video/src/main/res/mipmap-xxhdpi/default_video_head.webp -------------------------------------------------------------------------------- /mod_video/src/main/res/mipmap-xxhdpi/ic_gray_back.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_video/src/main/res/mipmap-xxhdpi/ic_gray_back.webp -------------------------------------------------------------------------------- /mod_video/src/main/res/mipmap-xxhdpi/ic_head_record.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_video/src/main/res/mipmap-xxhdpi/ic_head_record.webp -------------------------------------------------------------------------------- /mod_video/src/main/res/mipmap-xxhdpi/ic_heart.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_video/src/main/res/mipmap-xxhdpi/ic_heart.webp -------------------------------------------------------------------------------- /mod_video/src/main/res/mipmap-xxhdpi/ic_message.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_video/src/main/res/mipmap-xxhdpi/ic_message.webp -------------------------------------------------------------------------------- /mod_video/src/main/res/mipmap-xxhdpi/ic_music_one.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_video/src/main/res/mipmap-xxhdpi/ic_music_one.webp -------------------------------------------------------------------------------- /mod_video/src/main/res/mipmap-xxhdpi/ic_music_two.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_video/src/main/res/mipmap-xxhdpi/ic_music_two.webp -------------------------------------------------------------------------------- /mod_video/src/main/res/mipmap-xxhdpi/ic_share.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_video/src/main/res/mipmap-xxhdpi/ic_share.webp -------------------------------------------------------------------------------- /mod_video/src/main/res/mipmap-xxhdpi/ic_video_comment_publish.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_video/src/main/res/mipmap-xxhdpi/ic_video_comment_publish.webp -------------------------------------------------------------------------------- /mod_video/src/main/res/mipmap-xxhdpi/ic_video_play.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_video/src/main/res/mipmap-xxhdpi/ic_video_play.webp -------------------------------------------------------------------------------- /mod_video/src/main/res/mipmap-xxhdpi/shadow_list_bottom.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_video/src/main/res/mipmap-xxhdpi/shadow_list_bottom.webp -------------------------------------------------------------------------------- /mod_video/src/main/res/mipmap-xxhdpi/shadow_list_top.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/mod_video/src/main/res/mipmap-xxhdpi/shadow_list_top.webp -------------------------------------------------------------------------------- /mod_video/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /mod_video/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 播放错误,请稍后重试~ 4 | 出了点小问题,请稍后重试~ 5 | 重试 6 | -------------------------------------------------------------------------------- /mod_video/src/test/java/com/sum/video/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.sum.video 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 | } -------------------------------------------------------------------------------- /other/st_category.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/other/st_category.webp -------------------------------------------------------------------------------- /other/st_category_system.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/other/st_category_system.gif -------------------------------------------------------------------------------- /other/st_home.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/other/st_home.webp -------------------------------------------------------------------------------- /other/st_login.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/other/st_login.gif -------------------------------------------------------------------------------- /other/st_mine.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/other/st_mine.webp -------------------------------------------------------------------------------- /other/st_search.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/other/st_search.gif -------------------------------------------------------------------------------- /other/st_system.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/other/st_system.webp -------------------------------------------------------------------------------- /other/st_video.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suming77/SumTea_Android/c5413d3ff7e4dbaaf3d0b859138d8f4d8da626c3/other/st_video.gif -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | google() 5 | mavenCentral() 6 | maven { url 'https://jitpack.io' } 7 | } 8 | } 9 | dependencyResolutionManagement { 10 | //repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS) // AOP 11 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 12 | repositories { 13 | google() 14 | mavenCentral() 15 | maven { url 'https://jitpack.io' } 16 | } 17 | } 18 | rootProject.name = "SumTea_Android" 19 | include ':app' 20 | include ':mod_main' 21 | include ':mod_user' 22 | include ':mod_login' 23 | include ':mod_search' 24 | include ':mod_video' 25 | include ':lib_framework' 26 | include ':lib_common' 27 | include ':lib_network' 28 | include ':lib_stater' 29 | include ':lib_banner' 30 | include ':lib_glide' 31 | include ':lib_room' 32 | include ':mod_demo' 33 | --------------------------------------------------------------------------------