├── .gitignore ├── .gitmodules ├── Frame ├── LibFlycoTabLayout │ ├── .gitignore │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── flyco │ │ │ └── tablayout │ │ │ ├── CommonTabLayout.java │ │ │ ├── SegmentTabLayout.java │ │ │ ├── SlidingTabLayout.java │ │ │ ├── listener │ │ │ ├── CustomTabEntity.java │ │ │ └── OnTabSelectListener.java │ │ │ ├── utils │ │ │ ├── FragmentChangeManager.java │ │ │ └── UnreadMsgUtils.java │ │ │ └── widget │ │ │ └── MsgView.java │ │ └── res │ │ ├── layout │ │ ├── layout_tab.xml │ │ ├── layout_tab_bottom.xml │ │ ├── layout_tab_left.xml │ │ ├── layout_tab_right.xml │ │ ├── layout_tab_segment.xml │ │ └── layout_tab_top.xml │ │ └── values │ │ └── attrs.xml └── LibLoadsir │ ├── .gitignore │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── kingja │ │ └── loadsir │ │ ├── LoadSirUtil.java │ │ ├── callback │ │ ├── Callback.java │ │ ├── HintCallback.java │ │ ├── ProgressCallback.java │ │ └── SuccessCallback.java │ │ ├── core │ │ ├── Convertor.java │ │ ├── LoadLayout.java │ │ ├── LoadService.java │ │ ├── LoadSir.java │ │ └── Transport.java │ │ └── target │ │ ├── ActivityTarget.java │ │ ├── ITarget.java │ │ └── ViewTarget.java │ └── res │ └── layout │ └── layout_load_sir_default_layout.xml ├── README.md ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── winwang │ │ └── readinggallery │ │ ├── AppApplicationInitManager.kt │ │ ├── MainActivity.kt │ │ └── MyApplication.kt │ └── res │ ├── drawable-v24 │ └── ic_launcher_foreground.xml │ ├── drawable │ └── ic_launcher_background.xml │ ├── layout │ └── activity_main.xml │ ├── mipmap-anydpi-v26 │ ├── ic_launcher.xml │ └── ic_launcher_round.xml │ ├── mipmap-hdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-mdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-xhdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-xxhdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-xxxhdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── values-night │ └── themes.xml │ └── values │ ├── colors.xml │ ├── strings.xml │ └── themes.xml ├── bizModule ├── catModule │ ├── .gitignore │ ├── build.gradle │ ├── consumer-rules.pro │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ ├── com │ │ │ └── winwang │ │ │ │ └── catmodule │ │ │ │ ├── CatApplication.kt │ │ │ │ ├── MainActivity.kt │ │ │ │ ├── business │ │ │ │ ├── adapter │ │ │ │ │ ├── BookCatAdapter.kt │ │ │ │ │ └── BookTypeListAdapter.kt │ │ │ │ └── ui │ │ │ │ │ ├── activity │ │ │ │ │ └── CatTypeListActivity.kt │ │ │ │ │ └── fragment │ │ │ │ │ └── CatFragment.kt │ │ │ │ ├── di │ │ │ │ └── cat_module.kt │ │ │ │ ├── http │ │ │ │ ├── CatApi.kt │ │ │ │ ├── HttpServiceManager.kt │ │ │ │ └── HttpUrl.kt │ │ │ │ ├── model │ │ │ │ ├── BookCategoryModel.kt │ │ │ │ ├── BookType.kt │ │ │ │ └── BookTypeList.kt │ │ │ │ └── provider │ │ │ │ └── CatProvider.kt │ │ └── debug │ │ │ └── CatApplication.kt │ │ ├── module │ │ └── AndroidManifest.xml │ │ └── res │ │ ├── drawable-v24 │ │ └── ic_launcher_foreground.xml │ │ ├── drawable │ │ └── ic_launcher_background.xml │ │ ├── layout │ │ ├── activity_main.xml │ │ ├── cat_module_activity_cat_list_layout.xml │ │ ├── cat_module_item_cat_content_layout.xml │ │ ├── cat_module_item_cat_section_layout.xml │ │ ├── cat_module_item_home_vertical_layout.xml │ │ └── fragment_cat.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── values-night │ │ └── themes.xml │ │ └── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── themes.xml ├── detailModule │ ├── .gitignore │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ ├── com │ │ │ └── winwang │ │ │ │ └── detailmodule │ │ │ │ ├── DetailApplication.kt │ │ │ │ ├── MainActivity.kt │ │ │ │ ├── business │ │ │ │ ├── activity │ │ │ │ │ └── BookDetailActivity.kt │ │ │ │ └── fragment │ │ │ │ │ ├── BookDescFragment.kt │ │ │ │ │ └── PlayListFragment.kt │ │ │ │ ├── di │ │ │ │ └── detail_module.kt │ │ │ │ ├── http │ │ │ │ ├── DetailApi.kt │ │ │ │ ├── HttpServiceManager.kt │ │ │ │ └── HttpUrl.kt │ │ │ │ └── model │ │ │ │ ├── BookDetailModel.kt │ │ │ │ ├── PlayData.kt │ │ │ │ └── RecommendBook.kt │ │ └── debug │ │ │ └── DetailApplication.kt │ │ ├── module │ │ └── AndroidManifest.xml │ │ └── res │ │ ├── drawable-v24 │ │ └── ic_launcher_foreground.xml │ │ ├── drawable │ │ └── ic_launcher_background.xml │ │ ├── layout │ │ ├── activity_main.xml │ │ ├── book_detail_activity_book.xml │ │ ├── book_detail_activity_play_layout.xml │ │ ├── book_detail_fragment_book_desc_layout.xml │ │ ├── book_detail_fragment_play_list_layout.xml │ │ ├── book_detail_item_book_layout.xml │ │ └── book_detail_item_play_list_layout.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── values-night │ │ └── themes.xml │ │ └── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── themes.xml ├── homeModule-api │ ├── build.gradle │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── winwang │ │ └── homemodule │ │ └── model │ │ └── Book.kt ├── homeModule │ ├── .gitignore │ ├── build.gradle │ ├── consumer-rules.pro │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ ├── com │ │ │ └── winwang │ │ │ │ └── homemodule │ │ │ │ ├── HomeApplication.kt │ │ │ │ ├── MainActivity.kt │ │ │ │ ├── business │ │ │ │ ├── adapter │ │ │ │ │ └── HomeItemAdpater.kt │ │ │ │ └── ui │ │ │ │ │ ├── fragment │ │ │ │ │ ├── HomeFragment.kt │ │ │ │ │ ├── HomeItemFragment.kt │ │ │ │ │ ├── PagingTestFragment.kt │ │ │ │ │ └── TestFragment.kt │ │ │ │ │ └── viewcomponent │ │ │ │ │ ├── TestShimmer1ViewComponent.kt │ │ │ │ │ ├── TestShimmerViewComponent.kt │ │ │ │ │ └── TestViewComponent.kt │ │ │ │ ├── di │ │ │ │ └── home_module.kt │ │ │ │ ├── http │ │ │ │ ├── HomeApi.kt │ │ │ │ ├── HttpServiceManager.kt │ │ │ │ └── HttpUrl.kt │ │ │ │ ├── model │ │ │ │ ├── Book.api │ │ │ │ └── HomeListModel.kt │ │ │ │ └── provider │ │ │ │ └── HomeProvider.kt │ │ └── debug │ │ │ └── HomeApplication.kt │ │ ├── module │ │ └── AndroidManifest.xml │ │ └── res │ │ ├── drawable-v24 │ │ └── ic_launcher_foreground.xml │ │ ├── drawable │ │ └── ic_launcher_background.xml │ │ ├── layout │ │ ├── activity_main.xml │ │ ├── fragment_home_item_layout.xml │ │ ├── fragment_home_layout.xml │ │ ├── fragment_home_paging_layout.xml │ │ ├── fragment_home_test_layout.xml │ │ ├── home_module_item_home_horizental_layout.xml │ │ ├── home_module_item_home_section_layout.xml │ │ ├── home_module_item_home_vertical_layout.xml │ │ ├── item_test_layout.xml │ │ ├── layout_test_component_shimmer.xml │ │ ├── layout_test_shimmer.xml │ │ └── view_test_viewcomponent.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── values-night │ │ └── themes.xml │ │ └── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── themes.xml └── mainModule │ ├── .gitignore │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── winwang │ │ └── main │ │ └── MainActivity.kt │ └── res │ ├── color │ ├── selector_bottom_navigation_item.xml │ └── selector_color_category_item.xml │ ├── drawable-v24 │ └── ic_launcher_foreground.xml │ ├── drawable │ ├── ic_dashboard_black_24dp.xml │ ├── ic_home_black_24dp.xml │ ├── ic_launcher_background.xml │ ├── ic_live_black_24dp.xml │ └── ic_notifications_black_24dp.xml │ ├── layout │ └── activity_main_module.xml │ ├── menu │ └── bottom_nav_menu.xml │ ├── mipmap-anydpi-v26 │ ├── ic_launcher.xml │ └── ic_launcher_round.xml │ ├── mipmap-hdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-mdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-xhdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-xxhdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-xxxhdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── values-night │ └── themes.xml │ └── values │ ├── colors.xml │ ├── strings.xml │ ├── styles.xml │ └── themes.xml ├── build.gradle ├── commonAppLib ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── com │ └── winwang │ └── commonapplib │ ├── common │ └── Constant.kt │ └── provider │ ├── ICatProvider.kt │ └── IHomeProvider.kt ├── commonBaseLib ├── .gitignore ├── api.gradle ├── build.gradle ├── consumer-rules.pro ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── winwang │ │ └── mvvm │ │ ├── base │ │ ├── BaseApplication.kt │ │ ├── IApplication.kt │ │ ├── IView.kt │ │ ├── activity │ │ │ ├── BaseActivity.kt │ │ │ ├── BaseDBActivity.kt │ │ │ ├── BaseVBActivity.kt │ │ │ ├── BaseVmActivity.kt │ │ │ ├── BaseVmDBActivity.kt │ │ │ └── BaseVmVBActivity.kt │ │ ├── dialog │ │ │ ├── BaseDBDialog.kt │ │ │ ├── BaseDialog.kt │ │ │ ├── BaseVBDialog.kt │ │ │ ├── BaseVmDBDialog.kt │ │ │ ├── BaseVmDialog.kt │ │ │ └── BaseVmVBDialog.kt │ │ ├── fragment │ │ │ ├── BaseDBFragment.kt │ │ │ ├── BaseFragment.kt │ │ │ ├── BaseVBFragment.kt │ │ │ ├── BaseVmDBFragment.kt │ │ │ ├── BaseVmFragment.kt │ │ │ └── BaseVmVBFragment.kt │ │ ├── lifecycle │ │ │ └── MyLifecycleObserver.kt │ │ ├── view │ │ │ ├── BaseDIViewComponent.kt │ │ │ ├── BaseVBViewComponent.kt │ │ │ └── BaseViewComponent.kt │ │ └── viewmodel │ │ │ └── BaseViewModel.kt │ │ ├── common │ │ ├── ActivityLifecycleCallbacksAdapter.kt │ │ ├── ActivityManager.kt │ │ ├── CrashHandler.kt │ │ ├── HttpJsonUtil.java │ │ ├── KVutils.kt │ │ ├── SimpleFragmentActivityPagerAdapter.kt │ │ ├── SimpleFragmentPagerAdapter.kt │ │ └── UrlConfig.kt │ │ ├── enums │ │ └── ViewStatusEnum.kt │ │ ├── ext │ │ └── ContextExt.kt │ │ ├── http │ │ ├── ApiException.kt │ │ ├── ApiResult.kt │ │ ├── HttpInterceptorLog.kt │ │ └── RetrofitClient.kt │ │ ├── loadsir │ │ ├── AnimateCallback.java │ │ ├── CustomCallback.java │ │ ├── EmptyCallback.java │ │ ├── ErrorCallback.java │ │ ├── LoadingCallback.java │ │ ├── LoadingNestedScrollView.java │ │ ├── PlaceholderCallback.java │ │ ├── ShimmerCallback.kt │ │ ├── TimeoutCallback.java │ │ └── adapter │ │ │ └── DefaultShimmerAdapter.kt │ │ └── widget │ │ ├── FakeStatusBar.kt │ │ └── LoadDialog.kt │ └── res │ ├── drawable-xxhdpi │ ├── common_empty_img.png │ ├── custom.png │ ├── error.png │ └── timeout.png │ ├── drawable │ ├── bg_dialog.xml │ ├── common_loading.png │ ├── common_loading_rotate.xml │ ├── custom_loading_progress_bg.xml │ ├── custom_loading_view_bg.xml │ └── placeholder.9.png │ ├── layout │ ├── custom_loading_view.xml │ ├── fragment_progress_dialog.xml │ ├── head_top_bar_layout.xml │ ├── layout_animate.xml │ ├── layout_custom.xml │ ├── layout_custom_error.xml │ ├── layout_default_item_shimmer_layout.xml │ ├── layout_empty.xml │ ├── layout_error.xml │ ├── layout_load_sir.xml │ ├── layout_loading.xml │ ├── layout_placeholder.xml │ ├── layout_shimmer_layout.xml │ └── layout_timeout.xml │ └── values │ ├── colors.xml │ ├── ids.xml │ ├── strings.xml │ └── styles.xml ├── compile-api.gradle ├── conf.gradle ├── depends.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── 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 17 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "flutter_wan_android"] 2 | path = flutter_wan_android 3 | url = https://github.com/WinWang/flutter_wan_android.git 4 | -------------------------------------------------------------------------------- /Frame/LibFlycoTabLayout/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /Frame/LibFlycoTabLayout/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply from: '../../conf.gradle' 3 | // 这个version是区分library版本的,因此当我们需要更新library时记得修改这个version 4 | version = "2.1.2" 5 | android { 6 | namespace 'com.flyco.tablayout' 7 | compileSdkVersion rootProject.ext.android["compileSdkVersion"] 8 | 9 | defaultConfig { 10 | minSdkVersion rootProject.ext.android["minSdkVersion"] 11 | targetSdkVersion rootProject.ext.android["targetSdkVersion"] 12 | multiDexEnabled true 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | api fileTree(dir: 'libs', include: ['*.jar']) 24 | implementation rootProject.ext.dependencies["appcompat"] 25 | } 26 | 27 | 28 | -------------------------------------------------------------------------------- /Frame/LibFlycoTabLayout/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/lihui/work/AndroidStudio/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /Frame/LibFlycoTabLayout/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Frame/LibFlycoTabLayout/src/main/java/com/flyco/tablayout/listener/CustomTabEntity.java: -------------------------------------------------------------------------------- 1 | package com.flyco.tablayout.listener; 2 | 3 | import androidx.annotation.DrawableRes; 4 | 5 | public interface CustomTabEntity { 6 | String getTabTitle(); 7 | 8 | @DrawableRes 9 | int getTabSelectedIcon(); 10 | 11 | @DrawableRes 12 | int getTabUnselectedIcon(); 13 | } -------------------------------------------------------------------------------- /Frame/LibFlycoTabLayout/src/main/java/com/flyco/tablayout/listener/OnTabSelectListener.java: -------------------------------------------------------------------------------- 1 | package com.flyco.tablayout.listener; 2 | 3 | public interface OnTabSelectListener { 4 | void onTabSelect(int position); 5 | void onTabReselect(int position); 6 | } -------------------------------------------------------------------------------- /Frame/LibFlycoTabLayout/src/main/java/com/flyco/tablayout/utils/FragmentChangeManager.java: -------------------------------------------------------------------------------- 1 | package com.flyco.tablayout.utils; 2 | 3 | import androidx.fragment.app.Fragment; 4 | import androidx.fragment.app.FragmentManager; 5 | import androidx.fragment.app.FragmentTransaction; 6 | 7 | import java.util.ArrayList; 8 | 9 | public class FragmentChangeManager { 10 | private FragmentManager mFragmentManager; 11 | private int mContainerViewId; 12 | /** Fragment切换数组 */ 13 | private ArrayList mFragments; 14 | /** 当前选中的Tab */ 15 | private int mCurrentTab; 16 | 17 | public FragmentChangeManager(FragmentManager fm, int containerViewId, ArrayList fragments) { 18 | this.mFragmentManager = fm; 19 | this.mContainerViewId = containerViewId; 20 | this.mFragments = fragments; 21 | initFragments(); 22 | } 23 | 24 | /** 初始化fragments */ 25 | private void initFragments() { 26 | for (Fragment fragment : mFragments) { 27 | mFragmentManager.beginTransaction().add(mContainerViewId, fragment).hide(fragment).commit(); 28 | } 29 | 30 | setFragments(0); 31 | } 32 | 33 | /** 界面切换控制 */ 34 | public void setFragments(int index) { 35 | for (int i = 0; i < mFragments.size(); i++) { 36 | FragmentTransaction ft = mFragmentManager.beginTransaction(); 37 | Fragment fragment = mFragments.get(i); 38 | if (i == index) { 39 | ft.show(fragment); 40 | } else { 41 | ft.hide(fragment); 42 | } 43 | ft.commit(); 44 | } 45 | mCurrentTab = index; 46 | } 47 | 48 | public int getCurrentTab() { 49 | return mCurrentTab; 50 | } 51 | 52 | public Fragment getCurrentFragment() { 53 | return mFragments.get(mCurrentTab); 54 | } 55 | } -------------------------------------------------------------------------------- /Frame/LibFlycoTabLayout/src/main/res/layout/layout_tab.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 16 | 17 | 30 | 31 | -------------------------------------------------------------------------------- /Frame/LibFlycoTabLayout/src/main/res/layout/layout_tab_bottom.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 16 | 17 | 22 | 23 | 27 | 28 | 29 | 30 | 44 | 45 | -------------------------------------------------------------------------------- /Frame/LibFlycoTabLayout/src/main/res/layout/layout_tab_left.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 16 | 17 | 21 | 22 | 27 | 28 | 29 | 43 | 44 | -------------------------------------------------------------------------------- /Frame/LibFlycoTabLayout/src/main/res/layout/layout_tab_right.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 16 | 17 | 22 | 23 | 27 | 28 | 29 | 30 | 44 | 45 | -------------------------------------------------------------------------------- /Frame/LibFlycoTabLayout/src/main/res/layout/layout_tab_segment.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 16 | 17 | 22 | 23 | 24 | 38 | 39 | -------------------------------------------------------------------------------- /Frame/LibFlycoTabLayout/src/main/res/layout/layout_tab_top.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 16 | 17 | 21 | 22 | 27 | 28 | 29 | 43 | 44 | -------------------------------------------------------------------------------- /Frame/LibLoadsir/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /Frame/LibLoadsir/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | //apply plugin: 'maven-publish' 3 | apply from: '../../conf.gradle' 4 | 5 | group = 'com.github.WinWang' 6 | 7 | android { 8 | namespace 'com.kingja.loadsir' 9 | compileSdkVersion rootProject.ext.android["compileSdkVersion"] 10 | 11 | defaultConfig { 12 | minSdkVersion rootProject.ext.android["minSdkVersion"] 13 | targetSdkVersion rootProject.ext.android["targetSdkVersion"] 14 | multiDexEnabled true 15 | } 16 | buildTypes { 17 | release { 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | implementation fileTree(include: ['*.jar'], dir: 'libs') 24 | // implementation rootProject.ext.dependencies["appcompat"] 25 | implementation rootProject.ext.dependencies["appcompat"] 26 | 27 | } 28 | 29 | //afterEvaluate { 30 | // publishing { 31 | // publications { 32 | // release(MavenPublication) { 33 | // from components.release 34 | // groupId = 'com.github.WinWang' 35 | // artifactId = 'LibLoadsir' 36 | // version = project.libVersion 37 | // } 38 | // } 39 | // } 40 | //} 41 | 42 | -------------------------------------------------------------------------------- /Frame/LibLoadsir/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in D:\Android\SDK/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | 27 | #-dontwarn com.kingja.loadsir.** 28 | #-keep class com.kingja.loadsir.** {*;} 29 | -------------------------------------------------------------------------------- /Frame/LibLoadsir/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Frame/LibLoadsir/src/main/java/com/kingja/loadsir/LoadSirUtil.java: -------------------------------------------------------------------------------- 1 | package com.kingja.loadsir; 2 | 3 | import android.os.Looper; 4 | import android.util.Log; 5 | 6 | import com.kingja.loadsir.target.ITarget; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * Description:TODO 12 | * Create Time:2017/9/4 16:24 13 | * Author:KingJA 14 | * Email:kingjavip@gmail.com 15 | */ 16 | public class LoadSirUtil { 17 | 18 | public static boolean isMainThread() { 19 | return Looper.myLooper() == Looper.getMainLooper(); 20 | } 21 | 22 | public static ITarget getTargetContext(Object target, List targetContextList) { 23 | for (ITarget targetContext : targetContextList) { 24 | if (targetContext.equals(target)) { 25 | return targetContext; 26 | } 27 | 28 | } 29 | throw new IllegalArgumentException("No TargetContext fit it"); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Frame/LibLoadsir/src/main/java/com/kingja/loadsir/core/Convertor.java: -------------------------------------------------------------------------------- 1 | package com.kingja.loadsir.core; 2 | 3 | import com.kingja.loadsir.callback.Callback; 4 | 5 | /** 6 | * Description:TODO 7 | * Create Time:2017/9/4 8:58 8 | * Author:KingJA 9 | * Email:kingjavip@gmail.com 10 | */ 11 | public interface Convertor { 12 | Class map(T t); 13 | } 14 | -------------------------------------------------------------------------------- /Frame/LibLoadsir/src/main/java/com/kingja/loadsir/core/Transport.java: -------------------------------------------------------------------------------- 1 | package com.kingja.loadsir.core; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | 6 | /** 7 | * Description:TODO 8 | * Create Time:2017/9/28 6:45 9 | * Author:KingJA 10 | * Email:kingjavip@gmail.com 11 | */ 12 | public interface Transport { 13 | void order(Context context, View view); 14 | } 15 | -------------------------------------------------------------------------------- /Frame/LibLoadsir/src/main/java/com/kingja/loadsir/target/ActivityTarget.java: -------------------------------------------------------------------------------- 1 | package com.kingja.loadsir.target; 2 | 3 | import android.app.Activity; 4 | import android.view.View; 5 | import android.view.ViewGroup; 6 | 7 | import com.kingja.loadsir.callback.Callback; 8 | import com.kingja.loadsir.callback.SuccessCallback; 9 | import com.kingja.loadsir.core.LoadLayout; 10 | 11 | /** 12 | * Description:TODO 13 | * Create Time:2019/8/29 0029 下午 2:44 14 | * Author:KingJA 15 | * Email:kingjavip@gmail.com 16 | */ 17 | public class ActivityTarget implements ITarget { 18 | 19 | @Override 20 | public boolean equals(Object target) { 21 | return target instanceof Activity; 22 | } 23 | 24 | @Override 25 | public LoadLayout replaceView(Object target, Callback.OnReloadListener onReloadListener) { 26 | Activity activity = (Activity) target; 27 | ViewGroup contentParent = activity.findViewById(android.R.id.content); 28 | int childIndex = 0; 29 | View oldContent = contentParent.getChildAt(childIndex); 30 | contentParent.removeView(oldContent); 31 | 32 | ViewGroup.LayoutParams oldLayoutParams = oldContent.getLayoutParams(); 33 | LoadLayout loadLayout = new LoadLayout(activity, onReloadListener); 34 | loadLayout.setupSuccessLayout(new SuccessCallback(oldContent, activity, 35 | onReloadListener)); 36 | contentParent.addView(loadLayout, childIndex, oldLayoutParams); 37 | return loadLayout; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Frame/LibLoadsir/src/main/java/com/kingja/loadsir/target/ITarget.java: -------------------------------------------------------------------------------- 1 | package com.kingja.loadsir.target; 2 | 3 | import com.kingja.loadsir.callback.Callback; 4 | import com.kingja.loadsir.core.LoadLayout; 5 | 6 | /** 7 | * Description:TODO 8 | * Create Time:2019/8/29 0029 下午 2:43 9 | * Author:KingJA 10 | * Email:kingjavip@gmail.com 11 | */ 12 | public interface ITarget { 13 | /** 14 | * 15 | * @param target 16 | * @return 17 | * v1.3.8 18 | */ 19 | boolean equals(Object target); 20 | /** 21 | * 1.removeView 2.确定LP 3.addView 22 | * @param target 23 | * @param onReloadListener 24 | * @return 25 | * v1.3.8 26 | */ 27 | LoadLayout replaceView(Object target, Callback.OnReloadListener onReloadListener); 28 | } 29 | -------------------------------------------------------------------------------- /Frame/LibLoadsir/src/main/java/com/kingja/loadsir/target/ViewTarget.java: -------------------------------------------------------------------------------- 1 | package com.kingja.loadsir.target; 2 | 3 | import android.view.View; 4 | import android.view.ViewGroup; 5 | 6 | import com.kingja.loadsir.callback.Callback; 7 | import com.kingja.loadsir.callback.SuccessCallback; 8 | import com.kingja.loadsir.core.LoadLayout; 9 | 10 | /** 11 | * Description:TODO 12 | * Create Time:2019/8/29 0029 下午 2:44 13 | * Author:KingJA 14 | * Email:kingjavip@gmail.com 15 | */ 16 | public class ViewTarget implements ITarget { 17 | 18 | @Override 19 | public boolean equals(Object target) { 20 | return target instanceof View; 21 | } 22 | 23 | @Override 24 | public LoadLayout replaceView(Object target, Callback.OnReloadListener onReloadListener) { 25 | View oldContent = (android.view.View) target; 26 | ViewGroup contentParent = (ViewGroup) (oldContent.getParent()); 27 | int childIndex = 0; 28 | int childCount = contentParent == null ? 0 : contentParent.getChildCount(); 29 | for (int i = 0; i < childCount; i++) { 30 | if (contentParent.getChildAt(i) == oldContent) { 31 | childIndex = i; 32 | break; 33 | } 34 | } 35 | if (contentParent != null) { 36 | contentParent.removeView(oldContent); 37 | } 38 | ViewGroup.LayoutParams oldLayoutParams = oldContent.getLayoutParams(); 39 | LoadLayout loadLayout = new LoadLayout(oldContent.getContext(), onReloadListener); 40 | loadLayout.setupSuccessLayout(new SuccessCallback(oldContent, oldContent.getContext(), onReloadListener)); 41 | if (contentParent != null) { 42 | contentParent.addView(loadLayout, childIndex, oldLayoutParams); 43 | } 44 | return loadLayout; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Frame/LibLoadsir/src/main/res/layout/layout_load_sir_default_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## ReadingGallery(Android组件化项目)
2 | 3 | 1、本项目基于Jetpack组件开发的MVVM组件化项目,通过gradle.properties中变量isModule控制整包编译还是分包编译;
4 | 2、内容包含Kotlin+Koin(依赖注入)+coil(图片加载)+couroutine(协程)+ViewModel+LiveData+ViewBinding+DataBinding;
5 | 3、组件化通信基于阿里Arouter开源框架;
6 | 4、使用了腾讯API去中心化方案,降低代码耦合;
7 | 5、内部封装了具有网络请求和生命周期感知能力的自定义组合View,针对单页面多接口场景比较实用,目前已在生产项目中运用2年多时间,具体可见项目中BaseVBViewComponent; 8 | 内部可以根据使用爱好选择Viewbinding还是DataBinding,都在基类做了对应集成,viewmodel同时也可以按自己喜好是否使用koin注入对应View层 9 | 10 | ## 其他一些学习练手的项目
11 | 12 | **Android组件化项目初始化工具**ApplicationInit链接(gradle-plugin+注解APT+ASM):https://github.com/WinWang/ApplicationInit
13 | 14 | **Flutter版本**的音乐播放App链接(getx+retrofit+dio):https://github.com/WinWang/music_listener
15 | 16 | **React版本**的开眼App链接(React18+React-Vant+Mobx+axios):https://github.com/WinWang/react-oepn-eye
17 | 18 | **Vue2版本**WanAndroid链接(Vue2+vuex+vant+axios):https://github.com/WinWang/Vue-WanAndroid
19 | 20 | **Vue3版本**WanAndroid链接(vue3+typeScript+pinia+vant+vite):https://github.com/WinWang/Vue3-wanAndroid
21 | 22 | 23 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | apply plugin: 'kotlin-android' 3 | 4 | android { 5 | namespace 'com.winwang.readinggallery' 6 | compileSdkVersion rootProject.ext.android["compileSdkVersion"] 7 | 8 | 9 | defaultConfig { 10 | applicationId "com.winwang.readinggallery" 11 | minSdkVersion rootProject.ext.android["minSdkVersion"] 12 | targetSdkVersion rootProject.ext.android["targetSdkVersion"] 13 | versionCode 1 14 | versionName "1.0" 15 | } 16 | 17 | buildTypes { 18 | release { 19 | minifyEnabled false 20 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 21 | } 22 | } 23 | 24 | compileOptions { 25 | sourceCompatibility JavaVersion.VERSION_17 26 | targetCompatibility JavaVersion.VERSION_17 27 | } 28 | 29 | kotlinOptions { 30 | jvmTarget = JavaVersion.VERSION_17 31 | } 32 | 33 | // kapt { 34 | // arguments { 35 | // // 路由框架译配置 36 | // // module名称 37 | // arg("AROUTER_MODULE_NAME", project.getName()) 38 | // // 是否生成路由文档,"enable":生成文档,其他字符串不生成路由文档 39 | // arg("AROUTER_GENERATE_DOC", "enable") 40 | // } 41 | // } 42 | } 43 | 44 | dependencies { 45 | 46 | implementation project(':commonAppLib') 47 | if (!isModule.toBoolean()) { 48 | implementation project(':bizModule:mainModule') 49 | implementation project(':bizModule:homeModule') 50 | implementation project(':bizModule:catModule') 51 | implementation project(':bizModule:detailModule') 52 | } 53 | 54 | } -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/java/com/winwang/readinggallery/AppApplicationInitManager.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.readinggallery 2 | 3 | import android.content.Context 4 | import com.winwang.catmodule.CatApplication 5 | import com.winwang.detailmodule.DetailApplication 6 | import com.winwang.homemodule.HomeApplication 7 | import com.winwang.mvvm.base.IApplication 8 | 9 | /** 10 | * 11 | * @Desc - 12 | * @author WinWang 13 | * @date 2025/3/13 14 | * @version 15 | */ 16 | class AppApplicationInitManager private constructor() { 17 | private val appInitArray: MutableList = mutableListOf() 18 | private var hasInitFlag = false 19 | 20 | companion object { 21 | private var instance: AppApplicationInitManager? = null 22 | 23 | fun getInstance(): AppApplicationInitManager { 24 | return instance ?: synchronized(this) { 25 | instance ?: AppApplicationInitManager().also { instance = it } 26 | } 27 | } 28 | } 29 | 30 | init { 31 | addInitApplication() 32 | } 33 | 34 | private fun addInitApplication() { 35 | appInitArray.add(HomeApplication()) 36 | appInitArray.add(CatApplication()) 37 | appInitArray.add(DetailApplication()) 38 | } 39 | 40 | /** 41 | * 初始化Application 42 | * @param context 43 | */ 44 | fun initAppApplication(context: Context) { 45 | for (application in appInitArray) { 46 | if (!hasInitFlag) { 47 | runCatching { 48 | application.onCreate(context) 49 | } 50 | } 51 | } 52 | hasInitFlag = true 53 | } 54 | } -------------------------------------------------------------------------------- /app/src/main/java/com/winwang/readinggallery/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.readinggallery 2 | 3 | import androidx.appcompat.app.AppCompatActivity 4 | import android.os.Bundle 5 | 6 | class MainActivity : AppCompatActivity() { 7 | override fun onCreate(savedInstanceState: Bundle?) { 8 | super.onCreate(savedInstanceState) 9 | setContentView(R.layout.activity_main) 10 | } 11 | } -------------------------------------------------------------------------------- /app/src/main/java/com/winwang/readinggallery/MyApplication.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.readinggallery 2 | 3 | import com.blankj.utilcode.util.LogUtils 4 | import com.winwang.mvvm.base.BaseApplication 5 | 6 | /** 7 | *Created by WinWang on 2021/5/14 8 | *Description-> 9 | */ 10 | class MyApplication : BaseApplication() { 11 | 12 | override fun onCreate() { 13 | super.onCreate() 14 | AppApplicationInitManager.getInstance().initAppApplication(this.applicationContext) 15 | LogUtils.d("初始化壳工程") 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 15 | 18 | 21 | 22 | 23 | 24 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ReadingGallery 3 | -------------------------------------------------------------------------------- /app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /bizModule/catModule/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /bizModule/catModule/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/catModule/consumer-rules.pro -------------------------------------------------------------------------------- /bizModule/catModule/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 -------------------------------------------------------------------------------- /bizModule/catModule/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 9 | 10 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /bizModule/catModule/src/main/java/com/winwang/catmodule/CatApplication.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.catmodule 2 | 3 | import android.content.Context 4 | import com.blankj.utilcode.util.LogUtils 5 | import com.hm.iou.lifecycle.annotation.AppLifecycle 6 | import com.winwang.catmodule.di.catModule 7 | import com.winwang.mvvm.base.IApplication 8 | import org.koin.core.context.GlobalContext 9 | import org.koin.core.context.loadKoinModules 10 | import org.koin.core.context.startKoin 11 | 12 | /** 13 | *Created by WinWang on 2021/5/18 14 | *Description-> 15 | */ 16 | class CatApplication : IApplication { 17 | override fun onCreate(context: Context) { 18 | initKoin() 19 | } 20 | 21 | private fun initKoin() { 22 | try { 23 | if (GlobalContext.getOrNull() == null) { 24 | startKoin { 25 | modules(catModule) 26 | } 27 | } else { 28 | loadKoinModules(catModule) 29 | } 30 | } catch (e: Exception) { 31 | LogUtils.e("KoinCat${e.toString()}") 32 | } 33 | LogUtils.d("初始化Cat工程") 34 | } 35 | } -------------------------------------------------------------------------------- /bizModule/catModule/src/main/java/com/winwang/catmodule/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.catmodule 2 | 3 | import com.winwang.catmodule.databinding.ActivityMainBinding 4 | import com.winwang.mvvm.base.activity.BaseVBActivity 5 | 6 | class MainActivity : BaseVBActivity() { 7 | 8 | } -------------------------------------------------------------------------------- /bizModule/catModule/src/main/java/com/winwang/catmodule/business/adapter/BookCatAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.catmodule.business.adapter 2 | 3 | import com.chad.library.adapter.base.BaseMultiItemQuickAdapter 4 | import com.chad.library.adapter.base.viewholder.BaseViewHolder 5 | import com.winwang.catmodule.R 6 | import com.winwang.catmodule.model.BookCategoryModel 7 | import com.winwang.catmodule.model.BookType 8 | 9 | /** 10 | *Created by WinWang on 2021/5/19 11 | *Description-> 12 | */ 13 | class BookCatAdapter(data: MutableList) : 14 | BaseMultiItemQuickAdapter(data = data) { 15 | 16 | companion object { 17 | const val CAT_CONTENT = 0 18 | const val CAT_HEADER = 1 19 | } 20 | 21 | init { 22 | addItemType(CAT_HEADER, R.layout.cat_module_item_cat_section_layout) 23 | addItemType(CAT_CONTENT, R.layout.cat_module_item_cat_content_layout) 24 | } 25 | 26 | 27 | override fun convert(holder: BaseViewHolder, item: BookType) { 28 | when (item.itemType) { 29 | CAT_CONTENT -> { 30 | holder.setText(R.id.qmbt_content_title, item.name) 31 | } 32 | 33 | CAT_HEADER -> { 34 | holder.setText(R.id.tv_title_home_section, item.name) 35 | } 36 | 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /bizModule/catModule/src/main/java/com/winwang/catmodule/business/adapter/BookTypeListAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.catmodule.business.adapter 2 | 3 | import android.widget.ImageView 4 | import coil.load 5 | import com.chad.library.adapter.base.BaseQuickAdapter 6 | import com.chad.library.adapter.base.viewholder.BaseViewHolder 7 | import com.winwang.catmodule.R 8 | import com.winwang.catmodule.http.HttpURL.BASE_IMAGE_URL 9 | import com.winwang.homemodule.model.Book 10 | 11 | /** 12 | *Created by WinWang on 2021/5/20 13 | *Description-> 14 | */ 15 | class BookTypeListAdapter(dataList: MutableList) : 16 | BaseQuickAdapter( 17 | data = dataList, 18 | layoutResId = R.layout.cat_module_item_home_vertical_layout 19 | ) { 20 | 21 | override fun convert(holder: BaseViewHolder, item: Book) { 22 | holder.getView(R.id.iv_cover_home_vertical) 23 | .load(BASE_IMAGE_URL + item.pic) 24 | holder.setText(R.id.tv_title_home_vertical, item.name) 25 | holder.setText(R.id.tv_desc_home_vertical, item.synopsis) 26 | holder.setText(R.id.tv_voice_home_vertical, item.teller) 27 | holder.setText(R.id.tv_type_home_vertical, item.type) 28 | holder.setText(R.id.tv_status_home_vertical, item.status + item.count) 29 | } 30 | } -------------------------------------------------------------------------------- /bizModule/catModule/src/main/java/com/winwang/catmodule/di/cat_module.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.catmodule.di 2 | 3 | 4 | import com.winwang.catmodule.business.ui.activity.CatTypeListViewModel 5 | import com.winwang.catmodule.business.ui.fragment.CatViewModel 6 | import com.winwang.catmodule.http.CatApi 7 | import com.winwang.catmodule.http.CatServiceApi 8 | import org.koin.androidx.viewmodel.dsl.viewModel 9 | import org.koin.dsl.module 10 | 11 | /** 12 | * 三者的关系是一层一层依赖,中间的查找在koin里面通过get()查找获取 -viewmodle依赖Respository --> Respository依赖remoteModule的ApiService 13 | */ 14 | 15 | 16 | //viewmodel注入管理类 17 | val viewModelModule = module { 18 | viewModel { CatViewModel(get()) } 19 | viewModel { CatTypeListViewModel(get()) } 20 | } 21 | 22 | //远程请求数据类 23 | val remoteModule = module { 24 | //single 单列注入 25 | single { CatServiceApi } 26 | } 27 | 28 | val catModule = listOf(viewModelModule, remoteModule) 29 | 30 | -------------------------------------------------------------------------------- /bizModule/catModule/src/main/java/com/winwang/catmodule/http/CatApi.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.catmodule.http 2 | 3 | import com.winwang.catmodule.model.BookCategoryModel 4 | import com.winwang.catmodule.model.BookTypeList 5 | import com.winwang.mvvm.http.BaseResponse 6 | import retrofit2.http.GET 7 | import retrofit2.http.Path 8 | 9 | /** 10 | *Created by WinWang on 2021/5/19 11 | *Description-> 12 | */ 13 | interface CatApi { 14 | 15 | /** 16 | * 获取分类信息 17 | */ 18 | @GET("/json/v1/cat/index.json") 19 | suspend fun getCategory(): BaseResponse> 20 | 21 | 22 | /** 23 | * 获取分类信息的列表数据 24 | */ 25 | @GET("/json/v1/cat_list/{typeId}/index/1.json") 26 | suspend fun getCategoryList(@Path("typeId") typeId: String): BaseResponse 27 | 28 | 29 | } -------------------------------------------------------------------------------- /bizModule/catModule/src/main/java/com/winwang/catmodule/http/HttpServiceManager.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.catmodule.http 2 | 3 | import com.winwang.mvvm.http.RetrofitClient 4 | 5 | /** 6 | *Created by WinWang on 2021/5/17 7 | *Description-> 8 | */ 9 | 10 | 11 | /** 12 | * 首页API 13 | */ 14 | object CatServiceApi : 15 | CatApi by RetrofitClient.getRetrofitByUrl(HttpURL.BASE_HOME_URL) 16 | .create(CatApi::class.java) -------------------------------------------------------------------------------- /bizModule/catModule/src/main/java/com/winwang/catmodule/http/HttpUrl.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.catmodule.http 2 | 3 | /** 4 | *Created by WinWang on 2021/5/17 5 | *Description-> 6 | */ 7 | object HttpURL { 8 | 9 | const val BASE_HOME_URL = "https://app.zzd3.com" 10 | 11 | /** 12 | * 图片加载基本连接 13 | */ 14 | const val BASE_IMAGE_URL = "https://img.jqkan.com/" 15 | 16 | 17 | } -------------------------------------------------------------------------------- /bizModule/catModule/src/main/java/com/winwang/catmodule/model/BookCategoryModel.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.catmodule.model 2 | 3 | data class BookCategoryModel( 4 | val title: String, 5 | val types: List 6 | ) -------------------------------------------------------------------------------- /bizModule/catModule/src/main/java/com/winwang/catmodule/model/BookType.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.catmodule.model 2 | 3 | import com.chad.library.adapter.base.entity.MultiItemEntity 4 | 5 | data class BookType( 6 | val name: String, 7 | val type_id: String 8 | ) : MultiItemEntity { 9 | override var itemType = 0 10 | } -------------------------------------------------------------------------------- /bizModule/catModule/src/main/java/com/winwang/catmodule/model/BookTypeList.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.catmodule.model 2 | 3 | import com.winwang.homemodule.model.Book 4 | 5 | /** 6 | *Created by WinWang on 2021/5/20 7 | *Description-> 8 | */ 9 | data class BookTypeList( 10 | val books: List 11 | ) -------------------------------------------------------------------------------- /bizModule/catModule/src/main/java/com/winwang/catmodule/provider/CatProvider.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.catmodule.provider 2 | 3 | import android.content.Context 4 | import com.alibaba.android.arouter.facade.annotation.Route 5 | import com.winwang.catmodule.business.ui.fragment.CatFragment 6 | import com.winwang.commonapplib.common.ServiceConstant 7 | import com.winwang.commonapplib.provider.ICatProvider 8 | 9 | /** 10 | *Created by WinWang on 2021/5/13 11 | *Description-> 12 | */ 13 | @Route(path = ServiceConstant.CAT_MODULE_CAT_ROUTE, name = "分类服务") 14 | class CatProvider : ICatProvider { 15 | 16 | override fun getCatFragment() = CatFragment() 17 | 18 | override fun init(context: Context?) { 19 | 20 | } 21 | } -------------------------------------------------------------------------------- /bizModule/catModule/src/main/java/debug/CatApplication.kt: -------------------------------------------------------------------------------- 1 | package debug 2 | 3 | import com.winwang.catmodule.di.catModule 4 | import com.winwang.mvvm.base.BaseApplication 5 | import org.koin.android.ext.android.getKoin 6 | import org.koin.core.context.loadKoinModules 7 | import org.koin.core.context.startKoin 8 | 9 | /** 10 | *Created by WinWang on 2021/5/15 11 | *Description-> 12 | */ 13 | class CatApplication : BaseApplication() { 14 | 15 | override fun initMethod() { 16 | super.initMethod() 17 | startKoin { 18 | modules(catModule) 19 | } 20 | } 21 | 22 | } -------------------------------------------------------------------------------- /bizModule/catModule/src/main/module/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 17 | 18 | 21 | 24 | 25 | 26 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /bizModule/catModule/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 15 | 18 | 21 | 22 | 23 | 24 | 30 | -------------------------------------------------------------------------------- /bizModule/catModule/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 18 | 19 | -------------------------------------------------------------------------------- /bizModule/catModule/src/main/res/layout/cat_module_activity_cat_list_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 15 | 16 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /bizModule/catModule/src/main/res/layout/cat_module_item_cat_content_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 22 | 23 | -------------------------------------------------------------------------------- /bizModule/catModule/src/main/res/layout/cat_module_item_cat_section_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 16 | 17 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /bizModule/catModule/src/main/res/layout/fragment_cat.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 17 | 18 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /bizModule/catModule/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /bizModule/catModule/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /bizModule/catModule/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/catModule/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /bizModule/catModule/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/catModule/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /bizModule/catModule/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/catModule/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /bizModule/catModule/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/catModule/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /bizModule/catModule/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/catModule/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /bizModule/catModule/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/catModule/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /bizModule/catModule/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/catModule/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /bizModule/catModule/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/catModule/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /bizModule/catModule/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/catModule/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /bizModule/catModule/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/catModule/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /bizModule/catModule/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /bizModule/catModule/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | 11 | 12 | #333 13 | #666 14 | #64666666 15 | #999 16 | #dfdfdf 17 | -------------------------------------------------------------------------------- /bizModule/catModule/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 分类Module 3 | 4 | Hello blank fragment 5 | -------------------------------------------------------------------------------- /bizModule/catModule/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /bizModule/detailModule/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /bizModule/detailModule/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 -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 9 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/java/com/winwang/detailmodule/DetailApplication.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.detailmodule 2 | 3 | import android.content.Context 4 | import com.blankj.utilcode.util.LogUtils 5 | import com.hm.iou.lifecycle.annotation.AppLifecycle 6 | import com.winwang.detailmodule.di.detailModule 7 | import com.winwang.mvvm.base.IApplication 8 | import org.koin.core.context.GlobalContext 9 | import org.koin.core.context.loadKoinModules 10 | import org.koin.core.context.startKoin 11 | 12 | /** 13 | *Created by WinWang on 2021/5/19 14 | *Description-> 15 | */ 16 | class DetailApplication : IApplication { 17 | 18 | override fun onCreate(context: Context) { 19 | initKoin() 20 | } 21 | 22 | private fun initKoin() { 23 | try { 24 | if (GlobalContext.getOrNull() == null) { 25 | startKoin { 26 | modules(detailModule) 27 | } 28 | } else { 29 | loadKoinModules(detailModule) 30 | } 31 | } catch (e: Exception) { 32 | LogUtils.e("KoinDetail${e.toString()}") 33 | } 34 | LogUtils.d("初始化Detail工程") 35 | } 36 | } -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/java/com/winwang/detailmodule/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.detailmodule 2 | 3 | import androidx.appcompat.app.AppCompatActivity 4 | import android.os.Bundle 5 | 6 | class MainActivity : AppCompatActivity() { 7 | override fun onCreate(savedInstanceState: Bundle?) { 8 | super.onCreate(savedInstanceState) 9 | setContentView(R.layout.activity_main) 10 | } 11 | } -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/java/com/winwang/detailmodule/di/detail_module.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.detailmodule.di 2 | 3 | 4 | import com.winwang.detailmodule.business.activity.BookDetailViewModel 5 | import com.winwang.detailmodule.business.fragment.BookDescFragment 6 | import com.winwang.detailmodule.business.fragment.PlayListFragment 7 | import com.winwang.detailmodule.http.DetailApi 8 | import com.winwang.detailmodule.http.DetailServiceApi 9 | import org.koin.androidx.fragment.dsl.fragment 10 | import org.koin.androidx.viewmodel.dsl.viewModel 11 | import org.koin.dsl.module 12 | 13 | /** 14 | * 三者的关系是一层一层依赖,中间的查找在koin里面通过get()查找获取 -viewmodle依赖Respository --> Respository依赖remoteModule的ApiService 15 | */ 16 | 17 | 18 | //viewmodel注入管理类 19 | val viewModelModule = module { 20 | viewModel { BookDetailViewModel(get()) } 21 | } 22 | 23 | val fragmentModule = module { 24 | fragment { BookDescFragment() } 25 | fragment { PlayListFragment() } 26 | } 27 | 28 | 29 | //远程请求数据类 30 | val remoteModule = module { 31 | //single 单列注入 32 | single { DetailServiceApi } 33 | } 34 | 35 | val detailModule = listOf(viewModelModule, remoteModule, fragmentModule) 36 | 37 | -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/java/com/winwang/detailmodule/http/DetailApi.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.detailmodule.http 2 | 3 | import com.winwang.detailmodule.model.BookDetailModel 4 | import com.winwang.detailmodule.model.RecommendBook 5 | import com.winwang.mvvm.http.BaseResponse 6 | import retrofit2.http.GET 7 | import retrofit2.http.Path 8 | 9 | /** 10 | *Created by WinWang on 2021/5/19 11 | *Description-> 12 | */ 13 | 14 | interface DetailApi { 15 | 16 | /** 17 | * 获取详情数据 18 | */ 19 | @GET("/json/v1/cont/{bookID}.json") 20 | suspend fun getBookDetail(@Path("bookID") bookID: String): BaseResponse 21 | 22 | 23 | /** 24 | * 获取相关推荐书籍 25 | */ 26 | @GET("/json/v1/about/{bookID}.json") 27 | suspend fun getAboutBook(@Path("bookID") bookID: String): BaseResponse 28 | 29 | } -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/java/com/winwang/detailmodule/http/HttpServiceManager.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.detailmodule.http 2 | 3 | import com.winwang.mvvm.http.RetrofitClient 4 | 5 | /** 6 | *Created by WinWang on 2021/5/17 7 | *Description-> 8 | */ 9 | 10 | 11 | /** 12 | * 详情API 13 | */ 14 | object DetailServiceApi : 15 | DetailApi by RetrofitClient.getRetrofitByUrl(HttpURL.BASE_HOME_URL) 16 | .create(DetailApi::class.java) -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/java/com/winwang/detailmodule/http/HttpUrl.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.detailmodule.http 2 | 3 | /** 4 | *Created by WinWang on 2021/5/17 5 | *Description-> 6 | */ 7 | object HttpURL { 8 | 9 | const val BASE_HOME_URL = "https://app.zzd3.com" 10 | 11 | /** 12 | * 图片加载基本连接 13 | */ 14 | const val BASE_IMAGE_URL = "https://img.jqkan.com/" 15 | 16 | 17 | } -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/java/com/winwang/detailmodule/model/BookDetailModel.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.detailmodule.model 2 | 3 | data class BookDetailModel( 4 | val book_id: String, 5 | val click: String, 6 | val count: String, 7 | val name: String, 8 | val pic: String, 9 | val play_data: List, 10 | val status: String, 11 | val synopsis: String, 12 | val teller: String, 13 | val time: String, 14 | val type: String, 15 | val type_id: String 16 | ) -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/java/com/winwang/detailmodule/model/PlayData.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.detailmodule.model 2 | 3 | data class PlayData( 4 | val name: String, 5 | val play_id: String 6 | ) -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/java/com/winwang/detailmodule/model/RecommendBook.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.detailmodule.model 2 | 3 | import com.winwang.homemodule.model.Book 4 | 5 | /** 6 | *Created by WinWang on 2021/5/22 7 | *Description-> 8 | */ 9 | data class RecommendBook( 10 | val recommend: List 11 | ) -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/java/debug/DetailApplication.kt: -------------------------------------------------------------------------------- 1 | package debug 2 | 3 | import com.winwang.mvvm.base.BaseApplication 4 | 5 | /** 6 | *Created by WinWang on 2021/5/19 7 | *Description-> 8 | */ 9 | class DetailApplication : BaseApplication() { 10 | 11 | } -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/module/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 15 | 16 | 19 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 15 | 18 | 21 | 22 | 23 | 24 | 30 | -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | 18 | -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/res/layout/book_detail_activity_book.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 28 | 29 | 33 | 34 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/res/layout/book_detail_activity_play_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/res/layout/book_detail_item_play_list_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 17 | 18 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/detailModule/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/detailModule/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/detailModule/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/detailModule/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/detailModule/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/detailModule/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/detailModule/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/detailModule/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/detailModule/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/detailModule/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | 11 | 12 | #333 13 | #666 14 | #64666666 15 | #999 16 | 17 | -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | detailModule 3 | 4 | 5 | 播放列表 6 | 资源简介 7 | 8 | 9 | -------------------------------------------------------------------------------- /bizModule/detailModule/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /bizModule/homeModule-api/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply plugin: 'kotlin-android' 3 | apply from: '../../depends.gradle' 4 | 5 | android { 6 | namespace 'com.homeModule.api.mvvm' 7 | compileOptions { 8 | sourceCompatibility JavaVersion.VERSION_17 9 | targetCompatibility JavaVersion.VERSION_17 10 | } 11 | 12 | kotlinOptions { 13 | jvmTarget = JavaVersion.VERSION_17 14 | } 15 | } 16 | 17 | dependencies { 18 | implementation project(path: ':commonAppLib') 19 | } -------------------------------------------------------------------------------- /bizModule/homeModule-api/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /bizModule/homeModule-api/src/main/java/com/winwang/homemodule/model/Book.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.homemodule.model 2 | 3 | import com.chad.library.adapter.base.entity.MultiItemEntity 4 | 5 | data class Book( 6 | var book_id: String = "", 7 | var click: String = "", 8 | var count: String = "", 9 | var name: String = "", 10 | var pic: String = "", 11 | var status: String = "", 12 | var synopsis: String = "", 13 | var teller: String = "", 14 | var time: String = "", 15 | var type: String = "", 16 | var viewType: Int = 0 17 | ) : MultiItemEntity { 18 | override var itemType: Int = 19 | viewType 20 | 21 | } -------------------------------------------------------------------------------- /bizModule/homeModule/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /bizModule/homeModule/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/homeModule/consumer-rules.pro -------------------------------------------------------------------------------- /bizModule/homeModule/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 -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/java/com/winwang/homemodule/HomeApplication.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.homemodule 2 | 3 | import android.content.Context 4 | import com.blankj.utilcode.util.LogUtils 5 | import com.hm.iou.lifecycle.annotation.AppLifecycle 6 | import com.winwang.homemodule.di.homeModule 7 | import com.winwang.mvvm.base.IApplication 8 | import org.koin.core.context.GlobalContext 9 | import org.koin.core.context.loadKoinModules 10 | import org.koin.core.context.startKoin 11 | 12 | /** 13 | *Created by WinWang on 2021/5/17 14 | *Description-> 15 | */ 16 | class HomeApplication : IApplication { 17 | 18 | override fun onCreate(context: Context) { 19 | initKoin() 20 | } 21 | 22 | private fun initKoin() { 23 | try { 24 | if (GlobalContext.getOrNull() == null) { 25 | startKoin { 26 | modules(homeModule) 27 | } 28 | } else { 29 | loadKoinModules(homeModule) 30 | } 31 | 32 | } catch (e: Exception) { 33 | LogUtils.e("KoinHome${e.toString()}") 34 | } 35 | LogUtils.d("初始化Home工程") 36 | } 37 | } -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/java/com/winwang/homemodule/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.homemodule 2 | 3 | import com.blankj.utilcode.util.FragmentUtils 4 | import com.winwang.homemodule.business.ui.fragment.HomeFragment 5 | import com.winwang.homemodule.databinding.ActivityMainBinding 6 | import com.winwang.mvvm.base.activity.BaseVBActivity 7 | 8 | class MainActivity : BaseVBActivity() { 9 | 10 | override fun initViewData() { 11 | super.initViewData() 12 | val homeFragment = HomeFragment() 13 | FragmentUtils.add(supportFragmentManager, homeFragment, R.id.frame_home_module) 14 | FragmentUtils.show(homeFragment) 15 | } 16 | 17 | } -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/java/com/winwang/homemodule/business/ui/fragment/HomeFragment.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.homemodule.business.ui.fragment 2 | 3 | import androidx.fragment.app.Fragment 4 | import com.blankj.utilcode.util.BarUtils 5 | import com.winwang.homemodule.R 6 | import com.winwang.homemodule.databinding.FragmentHomeLayoutBinding 7 | import com.winwang.mvvm.base.fragment.BaseVmVBFragment 8 | import com.winwang.mvvm.base.viewmodel.BaseViewModel 9 | import com.winwang.mvvm.common.SimpleFragmentPagerAdapter 10 | 11 | /** 12 | *Created by WinWang on 2021/5/13 13 | *Description-> 14 | */ 15 | class HomeFragment : BaseVmVBFragment() { 16 | 17 | private val fragmentList: ArrayList = ArrayList() 18 | 19 | override fun isDIViewModel() = true 20 | 21 | override fun initView() { 22 | mTopBar?.setTitle("首页") 23 | val stringArray = resources.getStringArray(R.array.tabList) 24 | fragmentList.add(HomeItemFragment.getInstance(1)) 25 | fragmentList.add(HomeItemFragment.getInstance(2)) 26 | fragmentList.add(HomeItemFragment.getInstance(3)) 27 | fragmentList.add(HomeItemFragment.getInstance(4)) 28 | mBinding.vpHome.offscreenPageLimit = 4 29 | val simpleFragmentPagerAdapter = 30 | SimpleFragmentPagerAdapter(childFragmentManager, fragmentList) 31 | mBinding.vpHome.adapter = simpleFragmentPagerAdapter 32 | mBinding.tabHome.setViewPager(mBinding.vpHome, stringArray) 33 | } 34 | 35 | 36 | override fun initObserve() { 37 | 38 | } 39 | 40 | } 41 | 42 | 43 | class HomeViewModel : BaseViewModel() { 44 | 45 | } 46 | -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/java/com/winwang/homemodule/business/ui/fragment/PagingTestFragment.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.homemodule.business.ui.fragment 2 | 3 | import com.winwang.homemodule.databinding.FragmentHomePagingLayoutBinding 4 | import com.winwang.mvvm.base.fragment.BaseVmVBFragment 5 | import com.winwang.mvvm.base.viewmodel.BaseViewModel 6 | 7 | /** 8 | * Created by WinWang on 2023/2/1 9 | * Description: 10 | **/ 11 | class PagingTestFragment : BaseVmVBFragment() { 12 | 13 | override fun initView() { 14 | super.initView() 15 | } 16 | 17 | override fun initData() { 18 | super.initData() 19 | } 20 | 21 | 22 | override fun initObserve() { 23 | 24 | } 25 | } 26 | 27 | class PageingTestViewModel : BaseViewModel() { 28 | 29 | } 30 | 31 | //class PagingTestAdapter: 32 | 33 | 34 | -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/java/com/winwang/homemodule/business/ui/viewcomponent/TestShimmer1ViewComponent.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.homemodule.business.ui.viewcomponent 2 | 3 | import android.content.Context 4 | import android.util.AttributeSet 5 | import androidx.lifecycle.LifecycleOwner 6 | import androidx.lifecycle.lifecycleScope 7 | import com.blankj.utilcode.util.LogUtils 8 | import com.winwang.homemodule.R 9 | import com.winwang.homemodule.business.ui.fragment.DataBean 10 | import com.winwang.homemodule.databinding.ViewTestViewcomponentBinding 11 | import com.winwang.mvvm.base.view.BaseVBViewComponent 12 | import kotlinx.coroutines.delay 13 | import kotlinx.coroutines.launch 14 | 15 | 16 | /** 17 | * Created by WinWang at 2021/10/11 18 | * Description->测试ViewComponent版本ShimmerLayout 19 | */ 20 | class TestShimmer1ViewComponent @JvmOverloads constructor( 21 | context: Context, 22 | attrs: AttributeSet? = null 23 | ) : BaseVBViewComponent(context, attrs) { 24 | 25 | var position = 0 26 | var itemData: DataBean? = null 27 | 28 | override fun useShimmerLayout() = true 29 | 30 | override fun shimmerLayout() = R.layout.layout_test_component_shimmer 31 | 32 | override fun initData() { 33 | LogUtils.d("我在执行") 34 | } 35 | 36 | override fun initObserve() { 37 | super.initObserve() 38 | lifecycleOwner.run { 39 | 40 | } 41 | } 42 | 43 | override fun onCreate(source: LifecycleOwner) { 44 | super.onCreate(source) 45 | LogUtils.d(">>>>>>>>>>>>初始化") 46 | lifecycleOwner.lifecycleScope.launch { 47 | delay(11000) 48 | showSuccess() 49 | } 50 | } 51 | 52 | override fun onDestroy(source: LifecycleOwner) { 53 | super.onDestroy(source) 54 | LogUtils.e("<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>销毁") 55 | } 56 | 57 | 58 | } 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/java/com/winwang/homemodule/di/home_module.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.homemodule.di 2 | 3 | 4 | import com.winwang.homemodule.business.ui.fragment.HomeItemViewModel 5 | import com.winwang.homemodule.business.ui.fragment.HomeViewModel 6 | import com.winwang.homemodule.http.HomeApi 7 | import com.winwang.homemodule.http.HomeServiceApi 8 | import org.koin.androidx.viewmodel.dsl.viewModel 9 | import org.koin.dsl.module 10 | 11 | /** 12 | * 三者的关系是一层一层依赖,中间的查找在koin里面通过get()查找获取 -viewmodle依赖Respository --> Respository依赖remoteModule的ApiService 13 | */ 14 | 15 | 16 | //viewmodel注入管理类 17 | val viewModelModule = module { 18 | viewModel { HomeViewModel() } 19 | viewModel { HomeItemViewModel(get()) } 20 | } 21 | 22 | //远程请求数据类 23 | val remoteModule = module { 24 | //single 单列注入 25 | single { HomeServiceApi } 26 | } 27 | 28 | val homeModule = listOf(viewModelModule,remoteModule) 29 | 30 | -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/java/com/winwang/homemodule/http/HomeApi.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.homemodule.http 2 | 3 | import com.winwang.homemodule.model.HomeListModel 4 | import com.winwang.mvvm.http.BaseResponse 5 | import retrofit2.http.GET 6 | 7 | /** 8 | *Created by WinWang on 2021/5/17 9 | *Description-> 10 | */ 11 | interface HomeApi { 12 | 13 | /** 14 | * 最新更新 15 | */ 16 | @GET("/json/v1/home/update.json") 17 | suspend fun getHomeUpdate(): BaseResponse 18 | 19 | 20 | /** 21 | * 最新更新 22 | */ 23 | @GET("/json/v1/home/serial.json") 24 | suspend fun getHomeSeries(): BaseResponse 25 | 26 | 27 | /** 28 | * 热门评书 29 | */ 30 | @GET("/json/v1/home/ping.json") 31 | suspend fun getHomeHotBook(): BaseResponse 32 | 33 | 34 | /** 35 | * 热门有声 36 | */ 37 | @GET("/json/v1/home/story.json") 38 | suspend fun getHomeHotVoice(): BaseResponse 39 | 40 | } -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/java/com/winwang/homemodule/http/HttpServiceManager.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.homemodule.http 2 | 3 | import com.winwang.mvvm.http.RetrofitClient 4 | 5 | /** 6 | *Created by WinWang on 2021/5/17 7 | *Description-> 8 | */ 9 | 10 | 11 | /** 12 | * 首页API 13 | */ 14 | object HomeServiceApi : 15 | HomeApi by RetrofitClient.getRetrofitByUrl(HttpURL.BASE_HOME_URL) 16 | .create(HomeApi::class.java) -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/java/com/winwang/homemodule/http/HttpUrl.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.homemodule.http 2 | 3 | /** 4 | *Created by WinWang on 2021/5/17 5 | *Description-> 6 | */ 7 | object HttpURL { 8 | 9 | const val BASE_HOME_URL = "https://app.zzd3.com" 10 | 11 | /** 12 | * 图片加载基本连接 13 | */ 14 | const val BASE_IMAGE_URL = "https://img.jqkan.com/" 15 | 16 | 17 | } -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/java/com/winwang/homemodule/model/Book.api: -------------------------------------------------------------------------------- 1 | package com.winwang.homemodule.model 2 | 3 | import com.chad.library.adapter.base.entity.MultiItemEntity 4 | 5 | data class Book( 6 | var book_id: String = "", 7 | var click: String = "", 8 | var count: String = "", 9 | var name: String = "", 10 | var pic: String = "", 11 | var status: String = "", 12 | var synopsis: String = "", 13 | var teller: String = "", 14 | var time: String = "", 15 | var type: String = "", 16 | var viewType: Int = 0 17 | ) : MultiItemEntity { 18 | override var itemType: Int = 19 | viewType 20 | 21 | } -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/java/com/winwang/homemodule/model/HomeListModel.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.homemodule.model 2 | 3 | data class HomeListModel( 4 | val books: List, 5 | val top: List 6 | ) -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/java/com/winwang/homemodule/provider/HomeProvider.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.homemodule.provider 2 | 3 | import android.content.Context 4 | import androidx.fragment.app.Fragment 5 | import com.alibaba.android.arouter.facade.annotation.Route 6 | import com.winwang.commonapplib.common.ServiceConstant 7 | import com.winwang.commonapplib.provider.IHomeProvider 8 | import com.winwang.homemodule.business.ui.fragment.HomeFragment 9 | import com.winwang.homemodule.business.ui.fragment.TestFragment 10 | 11 | /** 12 | *Created by WinWang on 2021/5/13 13 | *Description-> 14 | */ 15 | 16 | @Route(path = ServiceConstant.HOME_MODULE_HOME_ROUTE, name = "首页服务") 17 | class HomeProvider : IHomeProvider { 18 | 19 | override fun getHomeFragment() = 20 | HomeFragment() 21 | 22 | override fun getTestFragment() = 23 | TestFragment() 24 | 25 | override fun getPagingFragment(): Fragment { 26 | TODO("Not yet implemented") 27 | } 28 | 29 | 30 | override fun init(context: Context?) { 31 | 32 | } 33 | } -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/java/debug/HomeApplication.kt: -------------------------------------------------------------------------------- 1 | package debug 2 | 3 | import com.winwang.homemodule.di.homeModule 4 | import com.winwang.mvvm.base.BaseApplication 5 | import org.koin.core.context.startKoin 6 | 7 | /** 8 | *Created by WinWang on 2021/5/15 9 | *Description-> 10 | */ 11 | class HomeApplication : BaseApplication() { 12 | 13 | override fun initMethod() { 14 | super.initMethod() 15 | startKoin { 16 | modules(homeModule) 17 | } 18 | } 19 | 20 | } -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/module/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 15 | 16 | 19 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 15 | 18 | 21 | 22 | 23 | 24 | 30 | -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 14 | -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/res/layout/fragment_home_item_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/res/layout/fragment_home_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 27 | 28 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/res/layout/fragment_home_paging_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/res/layout/home_module_item_home_section_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 16 | 17 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/res/layout/item_test_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/res/layout/layout_test_shimmer.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 15 | 16 | 22 | 23 | 28 | 29 | 34 | 35 | 40 | 41 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/res/layout/view_test_viewcomponent.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 17 | 18 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/homeModule/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/homeModule/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/homeModule/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/homeModule/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/homeModule/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/homeModule/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/homeModule/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/homeModule/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/homeModule/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/homeModule/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | 11 | 12 | #333 13 | #666 14 | #64666666 15 | #999 16 | 17 | -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 首页Module 3 | 4 | 5 | 最新更新 6 | 最新连载 7 | 热门评书 8 | 热门有声 9 | 10 | 11 | -------------------------------------------------------------------------------- /bizModule/homeModule/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /bizModule/mainModule/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /bizModule/mainModule/build.gradle: -------------------------------------------------------------------------------- 1 | if (isModule.toBoolean()) { 2 | apply plugin: 'com.android.application' 3 | } else { 4 | apply plugin: 'com.android.library' 5 | } 6 | apply plugin: 'kotlin-android' 7 | apply plugin: 'kotlin-kapt' 8 | 9 | kapt { 10 | // generateStubs = true 11 | arguments { 12 | // 路由框架译配置 13 | arg("AROUTER_MODULE_NAME", project.getName()) 14 | } 15 | } 16 | 17 | android { 18 | namespace 'com.winwang.main' 19 | compileSdkVersion rootProject.ext.android["compileSdkVersion"] 20 | 21 | defaultConfig { 22 | if (isModule.toBoolean()) { 23 | applicationId "com.winwang.mainmodule" 24 | } 25 | minSdkVersion rootProject.ext.android["minSdkVersion"] 26 | targetSdkVersion rootProject.ext.android["targetSdkVersion"] 27 | versionCode 1 28 | versionName "1.0" 29 | } 30 | 31 | buildTypes { 32 | release { 33 | minifyEnabled false 34 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 35 | } 36 | } 37 | 38 | compileOptions { 39 | sourceCompatibility JavaVersion.VERSION_17 40 | targetCompatibility JavaVersion.VERSION_17 41 | } 42 | 43 | kotlinOptions { 44 | jvmTarget = JavaVersion.VERSION_17 45 | } 46 | 47 | buildFeatures { 48 | dataBinding = true 49 | viewBinding = true 50 | buildConfig = true 51 | } 52 | } 53 | 54 | dependencies { 55 | implementation fileTree(dir: 'libs', include: ['*.jar']) 56 | api project(':commonAppLib') 57 | kapt rootProject.ext.dependencies["arouter-compiler"] 58 | // kapt rootProject.ext.dependencies["applifecycle-compiler"] 59 | } -------------------------------------------------------------------------------- /bizModule/mainModule/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 -------------------------------------------------------------------------------- /bizModule/mainModule/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 13 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /bizModule/mainModule/src/main/res/color/selector_bottom_navigation_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /bizModule/mainModule/src/main/res/color/selector_color_category_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /bizModule/mainModule/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 15 | 18 | 21 | 22 | 23 | 24 | 30 | -------------------------------------------------------------------------------- /bizModule/mainModule/src/main/res/drawable/ic_dashboard_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /bizModule/mainModule/src/main/res/drawable/ic_home_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /bizModule/mainModule/src/main/res/drawable/ic_live_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /bizModule/mainModule/src/main/res/drawable/ic_notifications_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /bizModule/mainModule/src/main/res/layout/activity_main_module.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | 18 | 19 | 36 | 37 | -------------------------------------------------------------------------------- /bizModule/mainModule/src/main/res/menu/bottom_nav_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 13 | 14 | 18 | 19 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /bizModule/mainModule/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /bizModule/mainModule/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /bizModule/mainModule/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/mainModule/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /bizModule/mainModule/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/mainModule/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /bizModule/mainModule/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/mainModule/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /bizModule/mainModule/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/mainModule/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /bizModule/mainModule/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/mainModule/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /bizModule/mainModule/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/mainModule/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /bizModule/mainModule/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/mainModule/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /bizModule/mainModule/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/mainModule/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /bizModule/mainModule/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/mainModule/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /bizModule/mainModule/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/bizModule/mainModule/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /bizModule/mainModule/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /bizModule/mainModule/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | 11 | #bb505d 12 | #bb505d 13 | #9297A2 14 | 15 | #333 16 | #666 17 | #999 18 | -------------------------------------------------------------------------------- /bizModule/mainModule/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | main 3 | 4 | 首页 5 | 分类 6 | 直播 7 | 我的 8 | 9 | 10 | -------------------------------------------------------------------------------- /bizModule/mainModule/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | 16 | 17 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /bizModule/mainModule/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | apply from: "conf.gradle" 4 | 5 | buildscript { 6 | ext.kotlin_version = '2.0.20' 7 | repositories { 8 | google() 9 | maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' } 10 | maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter' } 11 | maven { 12 | url 'https://dl.google.com/dl/android/maven2/' 13 | name 'Google' 14 | } 15 | maven { url 'https://www.jitpack.io' } 16 | mavenCentral() 17 | 18 | } 19 | dependencies { 20 | classpath 'com.android.tools.build:gradle:8.6.0' 21 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 22 | //加载插件applifecycle 23 | classpath 'com.github.hufeiyang.Android-AppLifecycleMgr:applifecycle-plugin:1.0.3' 24 | // classpath "com.alibaba:arouter-register:1.2.2" 25 | // classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version" 26 | 27 | // NOTE: Do not place your application dependencies here; they belong 28 | // in the individual module build.gradle files 29 | } 30 | } 31 | 32 | allprojects { 33 | repositories { 34 | google() 35 | maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' } 36 | maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter' } 37 | maven { 38 | url 'https://dl.google.com/dl/android/maven2/' 39 | name 'Google' 40 | } 41 | maven { url 'https://www.jitpack.io' } 42 | mavenCentral() 43 | } 44 | } 45 | 46 | task clean(type: Delete) { 47 | delete rootProject.buildDir 48 | } 49 | -------------------------------------------------------------------------------- /commonAppLib/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /commonAppLib/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply plugin: 'kotlin-android' 3 | apply plugin: 'kotlin-kapt' 4 | 5 | 6 | kapt { 7 | // generateStubs = true 8 | arguments { 9 | // 路由框架译配置 10 | arg("AROUTER_MODULE_NAME", project.getName()) 11 | 12 | } 13 | } 14 | 15 | android { 16 | namespace 'com.winwang.commonapplib' 17 | compileSdkVersion rootProject.ext.android["compileSdkVersion"] 18 | 19 | defaultConfig { 20 | minSdkVersion rootProject.ext.android["minSdkVersion"] 21 | targetSdkVersion rootProject.ext.android["targetSdkVersion"] 22 | kotlinOptions { 23 | jvmTarget = JavaVersion.VERSION_17 24 | } 25 | consumerProguardFiles 'consumer-rules.pro' 26 | } 27 | 28 | buildTypes { 29 | release { 30 | minifyEnabled false 31 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 32 | } 33 | } 34 | compileOptions { 35 | sourceCompatibility JavaVersion.VERSION_17 36 | targetCompatibility JavaVersion.VERSION_17 37 | } 38 | 39 | kotlinOptions { 40 | jvmTarget = JavaVersion.VERSION_17 41 | } 42 | 43 | 44 | } 45 | 46 | dependencies { 47 | // implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" 48 | api project(':commonBaseLib') 49 | kapt rootProject.ext.dependencies["arouter-compiler"] 50 | } -------------------------------------------------------------------------------- /commonAppLib/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/commonAppLib/consumer-rules.pro -------------------------------------------------------------------------------- /commonAppLib/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 -------------------------------------------------------------------------------- /commonAppLib/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /commonAppLib/src/main/java/com/winwang/commonapplib/common/Constant.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.commonapplib.common 2 | 3 | /** 4 | *Created by WinWang on 2021/5/18 5 | *Description-> 6 | */ 7 | 8 | object RouterConstant { 9 | 10 | /** 11 | * 首页模块 12 | */ 13 | object HOME { 14 | 15 | } 16 | 17 | /** 18 | * 分类模块 19 | */ 20 | object CATEGORY { 21 | const val CAT_MODULE_BOOK_TYPE_LIST_ROUTE = "/cat/booklist" 22 | } 23 | 24 | /** 25 | * 详情模块 26 | */ 27 | object DETAIL { 28 | const val DETAIL_MODULE_DETAIL_ROUTE = "/detail/main" 29 | } 30 | 31 | 32 | /** 33 | * 传参key 34 | */ 35 | object KEYS { 36 | const val INTENT_DATA = "intent_data" 37 | const val INTENT_NAME = "intent_NAME" 38 | } 39 | 40 | 41 | } 42 | 43 | 44 | /** 45 | *Created by WinWang on 2021/5/18 46 | *Description-> 47 | */ 48 | object ServiceConstant { 49 | const val HOME_MODULE_HOME_ROUTE = "/home/main" 50 | const val CAT_MODULE_CAT_ROUTE = "/cat/main" 51 | } -------------------------------------------------------------------------------- /commonAppLib/src/main/java/com/winwang/commonapplib/provider/ICatProvider.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.commonapplib.provider 2 | 3 | import androidx.fragment.app.Fragment 4 | import com.alibaba.android.arouter.facade.template.IProvider 5 | 6 | /** 7 | *Created by WinWang on 2021/5/13 8 | *Description-> 9 | */ 10 | interface ICatProvider : IProvider { 11 | 12 | fun getCatFragment(): Fragment 13 | 14 | } -------------------------------------------------------------------------------- /commonAppLib/src/main/java/com/winwang/commonapplib/provider/IHomeProvider.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.commonapplib.provider 2 | 3 | import androidx.fragment.app.Fragment 4 | import com.alibaba.android.arouter.facade.template.IProvider 5 | 6 | /** 7 | *Created by WinWang on 2021/5/13 8 | *Description-> 9 | */ 10 | interface IHomeProvider : IProvider { 11 | 12 | fun getHomeFragment(): Fragment 13 | 14 | /** 15 | * 获取测试Fragment 16 | */ 17 | fun getTestFragment(): Fragment 18 | 19 | 20 | /** 21 | * 获取Paging测试Fragment 22 | */ 23 | fun getPagingFragment(): Fragment 24 | 25 | } -------------------------------------------------------------------------------- /commonBaseLib/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /commonBaseLib/api.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply plugin: 'kotlin-android' 3 | apply from: '../../depends.gradle' 4 | 5 | dependencies { 6 | implementation project(path: ':commonAppLib') 7 | } -------------------------------------------------------------------------------- /commonBaseLib/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/commonBaseLib/consumer-rules.pro -------------------------------------------------------------------------------- /commonBaseLib/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/base/IApplication.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.base 2 | 3 | import android.content.Context 4 | 5 | /** 6 | * 7 | * @Desc - 8 | * @author WinWang 9 | * @date 2025/3/13 10 | * @version 11 | */ 12 | interface IApplication { 13 | fun onCreate(context: Context) 14 | } 15 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/base/IView.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.base 2 | 3 | interface IView { 4 | fun hideRefresh() { 5 | 6 | } 7 | } -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/base/activity/BaseDBActivity.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.base.activity 2 | 3 | import androidx.databinding.DataBindingUtil 4 | import androidx.databinding.ViewDataBinding 5 | import com.winwang.mvvm.base.IView 6 | 7 | /** 8 | *Created by WinWang on 2020/6/8 9 | *Description->使用了DataBinding的普通基类 10 | */ 11 | abstract class BaseDBActivity : BaseActivity() { 12 | 13 | lateinit var mDataBind: DB 14 | 15 | override fun setContentLayout() { 16 | mDataBind = DataBindingUtil.setContentView(this, getLayoutId()) 17 | } 18 | 19 | override fun onDestroy() { 20 | super.onDestroy() 21 | //判断延迟属性是否初始化了 22 | if (::mDataBind.isInitialized) { 23 | mDataBind.unbind() 24 | } 25 | } 26 | 27 | 28 | } -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/base/activity/BaseVBActivity.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.base.activity 2 | 3 | import android.view.LayoutInflater 4 | import androidx.viewbinding.ViewBinding 5 | import java.lang.reflect.ParameterizedType 6 | 7 | /** 8 | *Created by WinWang on 2020/6/8 9 | *Description->使用了DataBinding的普通基类 10 | */ 11 | abstract class BaseVBActivity : BaseActivity() { 12 | 13 | lateinit var mBinding: VB 14 | 15 | override fun setContentLayout() { 16 | val type = javaClass.genericSuperclass 17 | if (type is ParameterizedType) { 18 | val actualTypeArguments = type.actualTypeArguments 19 | val clazz = 20 | (if (actualTypeArguments.size > 1) actualTypeArguments[1] else actualTypeArguments[0]) as Class 21 | val method = clazz.getMethod("inflate", LayoutInflater::class.java) 22 | mBinding = method.invoke(null, layoutInflater) as VB 23 | setContentView(mBinding.root) 24 | } 25 | } 26 | 27 | 28 | override fun getLayoutId() = 1 29 | 30 | 31 | } -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/base/dialog/BaseDBDialog.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.base.dialog 2 | 3 | import android.view.LayoutInflater 4 | import android.view.ViewGroup 5 | import androidx.databinding.DataBindingUtil 6 | import androidx.databinding.ViewDataBinding 7 | import androidx.viewbinding.ViewBinding 8 | import java.lang.reflect.ParameterizedType 9 | 10 | /** 11 | *Created by WinWang on 2020/6/16 12 | *Description->使用Databing的Dialog基类 13 | */ 14 | abstract class BaseDBDialog : BaseDialog() { 15 | 16 | lateinit var mBinding: DB 17 | 18 | override fun generateView(inflater: LayoutInflater, container: ViewGroup?) { 19 | mBinding = DataBindingUtil.inflate(inflater, getLayoutId(), container, false) 20 | mRootView = mBinding.root 21 | } 22 | 23 | override fun onDestroyView() { 24 | super.onDestroyView() 25 | //判断延迟属性是否初始化了 26 | if (::mBinding.isInitialized) { 27 | mBinding.unbind() 28 | } 29 | } 30 | 31 | } -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/base/dialog/BaseVBDialog.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.base.dialog 2 | 3 | import android.view.LayoutInflater 4 | import android.view.ViewGroup 5 | import androidx.viewbinding.ViewBinding 6 | import java.lang.reflect.ParameterizedType 7 | 8 | /** 9 | *Created by WinWang on 2020/6/16 10 | *Description->通用的Dialog 11 | */ 12 | abstract class BaseVBDialog : BaseDialog() { 13 | 14 | lateinit var mBinding: VB 15 | 16 | override fun generateView(inflater: LayoutInflater, container: ViewGroup?) { 17 | val type = javaClass.genericSuperclass 18 | if (type is ParameterizedType) { 19 | val actualTypeArguments = type.actualTypeArguments 20 | val clazz = 21 | (if (actualTypeArguments.size > 1) actualTypeArguments[1] else actualTypeArguments[0]) as Class 22 | val method = clazz.getMethod("inflate", LayoutInflater::class.java) 23 | mBinding = method.invoke(null, layoutInflater) as VB 24 | } 25 | mRootView = mBinding.root 26 | } 27 | 28 | /** 29 | * 重写不需要子类复写 30 | */ 31 | override fun getLayoutId() = 1 32 | 33 | } -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/base/fragment/BaseDBFragment.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.base.fragment 2 | 3 | import android.view.LayoutInflater 4 | import android.view.ViewGroup 5 | import androidx.databinding.DataBindingUtil 6 | import androidx.databinding.ViewDataBinding 7 | 8 | /** 9 | *Created by WinWang on 2020/6/8 10 | *Description->具有databinding功能的Fragment的基类 11 | */ 12 | 13 | abstract class BaseDBFragment : BaseFragment() { 14 | 15 | lateinit var mBinding: DB 16 | 17 | override fun generateView(inflater: LayoutInflater, container: ViewGroup?) { 18 | mBinding = DataBindingUtil.inflate(inflater, getLayoutId(), container, false) 19 | mRootView = mBinding.root 20 | } 21 | 22 | override fun onDestroyView() { 23 | super.onDestroyView() 24 | //判断延迟属性是否初始化了 25 | if (::mBinding.isInitialized) { 26 | mBinding.unbind() 27 | } 28 | } 29 | 30 | } -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/base/fragment/BaseVBFragment.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.base.fragment 2 | 3 | import android.view.LayoutInflater 4 | import android.view.ViewGroup 5 | import androidx.databinding.DataBindingUtil 6 | import androidx.databinding.ViewDataBinding 7 | import androidx.viewbinding.ViewBinding 8 | import java.lang.reflect.ParameterizedType 9 | 10 | /** 11 | *Created by WinWang on 2020/6/8 12 | *Description->具有viewbinding功能的Fragment的基类 13 | */ 14 | 15 | abstract class BaseVBFragment : BaseFragment() { 16 | lateinit var mBinding: VB 17 | 18 | override fun generateView(inflater: LayoutInflater, container: ViewGroup?) { 19 | val type = javaClass.genericSuperclass 20 | if (type is ParameterizedType) { 21 | val actualTypeArguments = type.actualTypeArguments 22 | val clazz = 23 | (if (actualTypeArguments.size > 1) actualTypeArguments[1] else actualTypeArguments[0]) as Class 24 | val method = clazz.getMethod("inflate", LayoutInflater::class.java) 25 | mBinding = method.invoke(null, layoutInflater) as VB 26 | } 27 | mRootView = mBinding.root 28 | } 29 | 30 | /** 31 | * 重写不需要子类复写 32 | */ 33 | override fun getLayoutId() = 1 34 | 35 | 36 | } -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/base/lifecycle/MyLifecycleObserver.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.base.lifecycle 2 | 3 | import androidx.lifecycle.Lifecycle 4 | import androidx.lifecycle.LifecycleObserver 5 | import androidx.lifecycle.LifecycleOwner 6 | import androidx.lifecycle.OnLifecycleEvent 7 | 8 | /** 9 | *Created by WinWang on 2020/8/26 10 | *Description->让view获取监听生命周期的能力 11 | */ 12 | 13 | 14 | interface MyLifecycleObserver : LifecycleObserver { 15 | 16 | @OnLifecycleEvent(Lifecycle.Event.ON_CREATE) 17 | fun onCreate(source: LifecycleOwner) 18 | 19 | @OnLifecycleEvent(Lifecycle.Event.ON_PAUSE) 20 | fun onPause(source: LifecycleOwner) 21 | 22 | @OnLifecycleEvent(Lifecycle.Event.ON_RESUME) 23 | fun onResume(source: LifecycleOwner) 24 | 25 | @OnLifecycleEvent(Lifecycle.Event.ON_DESTROY) 26 | fun onDestroy(source: LifecycleOwner) 27 | 28 | } -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/common/ActivityLifecycleCallbacksAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.common 2 | 3 | import android.app.Activity 4 | import android.app.Application 5 | import android.os.Bundle 6 | 7 | /** 8 | *Created by WinWang on 2020/6/6 9 | *Description-> 10 | */ 11 | class ActivityLifecycleCallbacksAdapter( 12 | private var onActivityCreated: ((activity: Activity, savedInstanceState: Bundle?) -> Unit)? = null, 13 | private var onActivityStarted: ((activity: Activity) -> Unit)? = null, 14 | private var onActivityResumed: ((activity: Activity) -> Unit)? = null, 15 | private var onActivitySaveInstanceState: ((activity: Activity, outState: Bundle) -> Unit)? = null, 16 | private var onActivityPaused: ((activity: Activity) -> Unit)? = null, 17 | private var onActivityStopped: ((activity: Activity) -> Unit)? = null, 18 | private var onActivityDestroyed: ((activity: Activity) -> Unit)? = null 19 | ) :Application.ActivityLifecycleCallbacks{ 20 | override fun onActivityCreated(activity: Activity, savedInstanceState: Bundle?) { 21 | onActivityCreated?.invoke(activity, savedInstanceState) 22 | } 23 | 24 | override fun onActivityStarted(activity: Activity) { 25 | onActivityStarted?.invoke(activity) 26 | } 27 | 28 | override fun onActivityResumed(activity: Activity) { 29 | onActivityResumed?.invoke(activity) 30 | } 31 | 32 | override fun onActivitySaveInstanceState(activity: Activity, outState: Bundle) { 33 | onActivitySaveInstanceState?.invoke(activity, outState) 34 | } 35 | 36 | override fun onActivityPaused(activity: Activity) { 37 | onActivityPaused?.invoke(activity) 38 | } 39 | 40 | override fun onActivityStopped(activity: Activity) { 41 | onActivityStopped?.invoke(activity) 42 | } 43 | 44 | override fun onActivityDestroyed(activity: Activity) { 45 | onActivityDestroyed?.invoke(activity) 46 | } 47 | 48 | } -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/common/ActivityManager.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.common 2 | 3 | import android.app.Activity 4 | 5 | /** 6 | *Created by WinWang on 2020/6/6 7 | *Description-> 8 | */ 9 | object ActivityManager { 10 | val activityMap = mutableListOf() 11 | 12 | 13 | } -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/common/CrashHandler.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.common 2 | 3 | import android.app.AlertDialog 4 | import android.content.Context 5 | import android.content.DialogInterface 6 | import android.os.Looper 7 | import kotlin.system.exitProcess 8 | 9 | 10 | /** 11 | *Created by WinWang on 2020/12/28 12 | *Description->未捕获异常通用处理逻辑 13 | */ 14 | object CrashHandler : Thread.UncaughtExceptionHandler { 15 | 16 | private var mDefaultHandler: Thread.UncaughtExceptionHandler? = null 17 | 18 | fun init() { 19 | mDefaultHandler = Thread.getDefaultUncaughtExceptionHandler() 20 | Thread.setDefaultUncaughtExceptionHandler(this) 21 | } 22 | 23 | override fun uncaughtException(thread: Thread?, ex: Throwable) { 24 | exitProcess(0) 25 | } 26 | } -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/common/SimpleFragmentActivityPagerAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.common 2 | 3 | import androidx.fragment.app.Fragment 4 | import androidx.fragment.app.FragmentActivity 5 | import androidx.fragment.app.FragmentManager 6 | import androidx.fragment.app.FragmentPagerAdapter 7 | import androidx.viewpager2.adapter.FragmentStateAdapter 8 | 9 | open class SimpleFragmentActivityPagerAdapter( 10 | fragment: FragmentActivity, 11 | private val fragments: List 12 | ) : FragmentStateAdapter(fragment) { 13 | 14 | 15 | override fun getItemCount(): Int { 16 | return fragments.size 17 | } 18 | 19 | override fun createFragment(position: Int): Fragment { 20 | return fragments[position] 21 | } 22 | 23 | // override fun getItem(position: Int): Fragment = fragments[position] 24 | // 25 | // override fun getCount(): Int = fragments.size 26 | // 27 | // override fun getPageTitle(position: Int): CharSequence? = titles?.get(position) 28 | // 29 | // /** 30 | // * 默认为位置,子类需要覆盖默认,才能保证对应位置的fragment可以改变成其他的fragment, 31 | // * 不然同一位置一直都是最初添加的那个fragment,其他的添加不进去 32 | // * {@link FragmentStatePagerAdapter#getItem(int)} 33 | // */ 34 | // override fun getItemId(position: Int): Long { 35 | // return fragments[position].hashCode().toLong() 36 | // } 37 | } -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/common/SimpleFragmentPagerAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.common 2 | 3 | import androidx.fragment.app.Fragment 4 | import androidx.fragment.app.FragmentManager 5 | import androidx.fragment.app.FragmentPagerAdapter 6 | 7 | open class SimpleFragmentPagerAdapter( 8 | fm: FragmentManager, 9 | private val fragments: List, 10 | private val titles: List? = null 11 | ) : FragmentPagerAdapter(fm, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) { 12 | init { 13 | require(!(titles != null && titles.size != fragments.size)) { 14 | "Fragments and titles list size must match!" 15 | } 16 | } 17 | 18 | override fun getItem(position: Int): Fragment = fragments[position] 19 | 20 | override fun getCount(): Int = fragments.size 21 | 22 | override fun getPageTitle(position: Int): CharSequence? = titles?.get(position) 23 | 24 | /** 25 | * 默认为位置,子类需要覆盖默认,才能保证对应位置的fragment可以改变成其他的fragment, 26 | * 不然同一位置一直都是最初添加的那个fragment,其他的添加不进去 27 | * {@link FragmentStatePagerAdapter#getItem(int)} 28 | */ 29 | override fun getItemId(position: Int): Long { 30 | return fragments[position].hashCode().toLong() 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/common/UrlConfig.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.common 2 | 3 | /** 4 | *Created by WinWang on 2020/6/10 5 | *Description-> 6 | */ 7 | 8 | 9 | object UrlConfig { 10 | 11 | /** 12 | * 基本域名-电影网站 13 | */ 14 | const val BASE_MOVIE_URL: String = "http://www.27k.cc" 15 | 16 | const val BASE_HOST = "http://192.168.204.202:8080"; 17 | 18 | /** 19 | * 直播数据抓取地址 20 | */ 21 | const val BASE_LIVE_URL = "http://www.hao5.net"; 22 | 23 | const val TV_FLASH_URL = "http://g.alicdn.com/de/prismplayer-flash/1.2.16/PrismPlayer.swf?vurl=" 24 | const val TV_URL_END = "&autoPlay=true" 25 | 26 | 27 | } 28 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/enums/ViewStatusEnum.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.enums 2 | 3 | /** 4 | *Created by WinWang on 2020/6/9 5 | *Description->提取状态类型 6 | */ 7 | enum class ViewStatusEnum { 8 | SUCCESS, //成功 9 | ERROR, //解析错误 10 | NETWORKERROR, //网络错误 11 | EMPTY, //空数据 12 | } -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/ext/ContextExt.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.ext 2 | 3 | import android.content.ClipData 4 | import android.content.ClipboardManager 5 | import android.content.Context 6 | import android.widget.Toast 7 | import androidx.annotation.StringRes 8 | 9 | 10 | /** 11 | * 实现将特定文本复制到剪贴板的功能。 12 | * @param[label] User-visible label for the clip data. 13 | * @param[text] The actual text in the clip. 14 | */ 15 | fun Context.copyTextIntoClipboard(text: CharSequence?, label: String? = "") { 16 | if (text.isNullOrEmpty()) return 17 | val cbs = applicationContext.getSystemService(Context.CLIPBOARD_SERVICE) as? ClipboardManager 18 | ?: return 19 | cbs.setPrimaryClip(ClipData.newPlainText(label, text)) 20 | } 21 | 22 | fun Context.showToast(message: CharSequence) { 23 | Toast.makeText(this, message, Toast.LENGTH_SHORT).show() 24 | } 25 | 26 | fun Context.showToast(@StringRes message: Int) { 27 | Toast.makeText(this, message, Toast.LENGTH_SHORT).show() 28 | } -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/http/ApiException.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.http 2 | 3 | class ApiException(var code: Int, override var message: String) : RuntimeException() -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/http/ApiResult.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.http 2 | 3 | data class BaseResponse(val code: Int, val status: String, private val data: T) { 4 | fun resultData(): T { 5 | if (code == 200) { 6 | return data 7 | } else { 8 | throw ApiException(code, status) 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/http/HttpInterceptorLog.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.http 2 | 3 | import com.blankj.utilcode.util.LogUtils 4 | import com.winwang.mvvm.common.HttpJsonUtil 5 | import okhttp3.logging.HttpLoggingInterceptor 6 | 7 | /** 8 | *Created by WinWang on 2020/9/29 9 | *Description-> 10 | */ 11 | class HttpInterceptorLog : HttpLoggingInterceptor.Logger { 12 | 13 | var mMessage = StringBuilder() 14 | 15 | override fun log(message: String) { 16 | var messageTemp = message 17 | // 请求或者响应开始 18 | // 请求或者响应开始 19 | if (messageTemp.startsWith("--> POST")) { 20 | mMessage.setLength(0) 21 | } 22 | // 以{}或者[]形式的说明是响应结果的json数据,需要进行格式化 23 | // 以{}或者[]形式的说明是响应结果的json数据,需要进行格式化 24 | if (messageTemp.startsWith("{") && messageTemp.endsWith("}") 25 | || messageTemp.startsWith("[") && messageTemp.endsWith("]") 26 | ) { 27 | messageTemp = HttpJsonUtil.formatJson(messageTemp) 28 | } 29 | 30 | mMessage.append( 31 | """ 32 | $messageTemp 33 | 34 | """.trimIndent() 35 | ) 36 | // 请求或者响应结束,打印整条日志 37 | // 请求或者响应结束,打印整条日志 38 | if (message.startsWith("<-- END HTTP")) { 39 | LogUtils.d("网络日志>>>${mMessage.toString()}") 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/http/RetrofitClient.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.http 2 | 3 | import com.winwang.mvvm.BuildConfig 4 | import com.winwang.mvvm.common.UrlConfig 5 | import okhttp3.OkHttpClient 6 | import okhttp3.logging.HttpLoggingInterceptor 7 | import retrofit2.Retrofit 8 | import retrofit2.converter.gson.GsonConverterFactory 9 | import java.util.concurrent.TimeUnit 10 | 11 | object RetrofitClient { 12 | 13 | 14 | private val okHttpClient = OkHttpClient.Builder() 15 | .callTimeout(20, TimeUnit.SECONDS) 16 | .connectTimeout(20, TimeUnit.SECONDS) 17 | .readTimeout(10, TimeUnit.SECONDS) 18 | .writeTimeout(10, TimeUnit.SECONDS) 19 | .addNetworkInterceptor( 20 | HttpLoggingInterceptor(HttpInterceptorLog()) 21 | .setLevel(if (BuildConfig.DEBUG) HttpLoggingInterceptor.Level.BODY else HttpLoggingInterceptor.Level.NONE) 22 | ) 23 | .build() 24 | 25 | val retrofit = Retrofit.Builder() 26 | .client(okHttpClient) 27 | .baseUrl(UrlConfig.BASE_MOVIE_URL) 28 | .addConverterFactory(GsonConverterFactory.create()) 29 | .build() 30 | 31 | fun getRetrofitByUrl(url: String = UrlConfig.BASE_HOST): Retrofit = Retrofit.Builder() 32 | .client(okHttpClient) 33 | .baseUrl(url) 34 | .addConverterFactory(GsonConverterFactory.create()) 35 | .build() 36 | 37 | 38 | 39 | 40 | } -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/loadsir/AnimateCallback.java: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.loadsir; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | import android.view.animation.Animation; 6 | import android.view.animation.LinearInterpolator; 7 | import android.view.animation.RotateAnimation; 8 | import android.widget.Toast; 9 | 10 | import com.kingja.loadsir.callback.Callback; 11 | import com.winwang.mvvm.R; 12 | 13 | 14 | /** 15 | * Description:TODO 16 | * Create Time:2017/9/3 10:22 17 | * Author:KingJA 18 | * Email:kingjavip@gmail.com 19 | */ 20 | public class AnimateCallback extends Callback { 21 | 22 | private Context context; 23 | private View animateView; 24 | 25 | @Override 26 | protected int onCreateView() { 27 | return R.layout.layout_animate; 28 | } 29 | 30 | @Override 31 | protected void onViewCreate(Context context, View view) { 32 | super.onViewCreate(context, view); 33 | } 34 | 35 | @Override 36 | public void onAttach(Context context, View view) { 37 | this.context = context; 38 | animateView = view.findViewById(R.id.view_animate); 39 | Animation animation = new RotateAnimation(0, 359, Animation.RELATIVE_TO_SELF, 40 | 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); 41 | animation.setDuration(1000); 42 | animation.setRepeatCount(Integer.MAX_VALUE); 43 | animation.setFillAfter(true); 44 | animation.setInterpolator(new LinearInterpolator()); 45 | animateView.startAnimation(animation); 46 | Toast.makeText(context.getApplicationContext(), "start animation", Toast.LENGTH_SHORT).show(); 47 | } 48 | 49 | @Override 50 | public void onDetach() { 51 | super.onDetach(); 52 | if (animateView != null) { 53 | animateView.clearAnimation(); 54 | } 55 | Toast.makeText(context.getApplicationContext(), "stop animation", Toast.LENGTH_SHORT).show(); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/loadsir/CustomCallback.java: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.loadsir; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | import android.widget.Toast; 6 | 7 | import com.kingja.loadsir.callback.Callback; 8 | import com.winwang.mvvm.R; 9 | 10 | 11 | /** 12 | * Description:TODO 13 | * Create Time:2017/9/3 10:22 14 | * Author:KingJA 15 | * Email:kingjavip@gmail.com 16 | */ 17 | public class CustomCallback extends Callback { 18 | 19 | @Override 20 | protected int onCreateView() { 21 | return R.layout.layout_custom; 22 | } 23 | 24 | @Override 25 | protected boolean onReloadEvent(final Context context, View view) { 26 | Toast.makeText(context.getApplicationContext(), "Hello buddy, how r u! :p", Toast.LENGTH_SHORT).show(); 27 | (view.findViewById(R.id.iv_gift)).setOnClickListener(new View.OnClickListener() { 28 | @Override 29 | public void onClick(View v) { 30 | Toast.makeText(context.getApplicationContext(), "It's your gift! :p", Toast.LENGTH_SHORT).show(); 31 | } 32 | }); 33 | return true; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/loadsir/EmptyCallback.java: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.loadsir; 2 | 3 | import com.kingja.loadsir.callback.Callback; 4 | import com.winwang.mvvm.R; 5 | 6 | 7 | /** 8 | * Description:TODO 9 | * Create Time:2017/9/4 10:22 10 | * Author:KingJA 11 | * Email:kingjavip@gmail.com 12 | */ 13 | 14 | public class EmptyCallback extends Callback { 15 | 16 | @Override 17 | protected int onCreateView() { 18 | return R.layout.layout_empty; 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/loadsir/ErrorCallback.java: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.loadsir; 2 | 3 | 4 | import com.kingja.loadsir.callback.Callback; 5 | import com.winwang.mvvm.R; 6 | 7 | 8 | /** 9 | * Description:TODO 10 | * Create Time:2017/9/4 10:20 11 | * Author:KingJA 12 | * Email:kingjavip@gmail.com 13 | */ 14 | 15 | public class ErrorCallback extends Callback { 16 | @Override 17 | protected int onCreateView() { 18 | return R.layout.layout_error; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/loadsir/LoadingCallback.java: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.loadsir; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | 6 | import com.kingja.loadsir.callback.Callback; 7 | import com.winwang.mvvm.R; 8 | 9 | 10 | /** 11 | * Description:TODO 12 | * Create Time:2017/9/4 10:22 13 | * Author:KingJA 14 | * Email:kingjavip@gmail.com 15 | */ 16 | 17 | public class LoadingCallback extends Callback { 18 | 19 | @Override 20 | protected int onCreateView() { 21 | return R.layout.layout_loading; 22 | } 23 | 24 | @Override 25 | public boolean getSuccessVisible() { 26 | return super.getSuccessVisible(); 27 | } 28 | 29 | @Override 30 | protected boolean onReloadEvent(Context context, View view) { 31 | return true; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/loadsir/PlaceholderCallback.java: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.loadsir; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | 6 | import com.kingja.loadsir.callback.Callback; 7 | import com.winwang.mvvm.R; 8 | 9 | 10 | /** 11 | * Description:TODO 12 | * Create Time:2017/9/4 10:22 13 | * Author:KingJA 14 | * Email:kingjavip@gmail.com 15 | */ 16 | 17 | public class PlaceholderCallback extends Callback { 18 | 19 | @Override 20 | protected int onCreateView() { 21 | return R.layout.layout_placeholder; 22 | } 23 | 24 | @Override 25 | protected boolean onReloadEvent(Context context, View view) { 26 | return true; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/loadsir/ShimmerCallback.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.loadsir 2 | 3 | import android.content.Context 4 | import android.view.View 5 | import androidx.recyclerview.widget.LinearLayoutManager 6 | import androidx.recyclerview.widget.RecyclerView 7 | import com.kingja.loadsir.callback.Callback 8 | import com.winwang.mvvm.R 9 | import com.winwang.mvvm.loadsir.adapter.DefaultShimmerAdapter 10 | 11 | /** 12 | * Created by WinWang on 2022/11/10 13 | * Description:默认的骨架占位 14 | **/ 15 | class ShimmerCallback( 16 | var shimmerLayout: Int = R.layout.layout_default_item_shimmer_layout, //骨架屏填充的item 17 | var showList: Boolean = true, //是否是列表类骨架屏 18 | private var shimmerListSize: Int = 8 //骨架屏列表默认的长度 19 | ) : Callback() { 20 | 21 | override fun onCreateView(): Int { 22 | return if (showList) R.layout.layout_shimmer_layout else shimmerLayout 23 | } 24 | 25 | override fun onViewCreate(context: Context?, view: View?) { 26 | super.onViewCreate(context, view) 27 | } 28 | 29 | override fun onReloadEvent(context: Context?, view: View?): Boolean { 30 | //阻断通用设置重试点击按钮 31 | return false 32 | } 33 | 34 | override fun onAttach(context: Context?, view: View?) { 35 | super.onAttach(context, view) 36 | if (showList) { 37 | val recyclerView = view?.findViewById(R.id.rv_shimmer) 38 | val defaultShimmerAdapter = DefaultShimmerAdapter(shimmerLayout) 39 | val shimmerDataList = arrayListOf() 40 | for (index in 0 until shimmerListSize) { 41 | shimmerDataList.add(index) 42 | } 43 | defaultShimmerAdapter.setNewInstance(shimmerDataList) 44 | context?.let { 45 | recyclerView?.run { 46 | layoutManager = LinearLayoutManager(it) 47 | adapter = defaultShimmerAdapter 48 | } 49 | } 50 | } 51 | 52 | } 53 | 54 | 55 | } -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/loadsir/TimeoutCallback.java: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.loadsir; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | import android.widget.Toast; 6 | 7 | import com.kingja.loadsir.callback.Callback; 8 | import com.winwang.mvvm.R; 9 | 10 | 11 | /** 12 | * Description:TODO 13 | * Create Time:2017/9/2 16:17 14 | * Author:KingJA 15 | * Email:kingjavip@gmail.com 16 | */ 17 | 18 | public class TimeoutCallback extends Callback { 19 | 20 | @Override 21 | protected int onCreateView() { 22 | return R.layout.layout_timeout; 23 | } 24 | 25 | 26 | 27 | } 28 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/loadsir/adapter/DefaultShimmerAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.loadsir.adapter 2 | 3 | import com.chad.library.adapter.base.BaseQuickAdapter 4 | import com.chad.library.adapter.base.viewholder.BaseViewHolder 5 | import com.winwang.mvvm.R 6 | 7 | /** 8 | * Created by WinWang on 2022/11/10 9 | * Description: 10 | **/ 11 | class DefaultShimmerAdapter(layoutRes: Int? = R.layout.layout_default_item_shimmer_layout) : 12 | BaseQuickAdapter(layoutResId = layoutRes ?: R.layout.layout_default_item_shimmer_layout) { 13 | override fun convert(holder: BaseViewHolder, item: Int) { 14 | } 15 | } -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/widget/FakeStatusBar.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.widget 2 | 3 | import android.content.Context 4 | import android.util.AttributeSet 5 | import android.view.View 6 | import com.blankj.utilcode.util.BarUtils 7 | 8 | /** 9 | *Created by WinWang on 2021/5/18 10 | *Description-> 11 | */ 12 | class FakeStatusBar @JvmOverloads constructor( 13 | context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 14 | ) : View(context, attrs, defStyleAttr) { 15 | 16 | init { 17 | BarUtils.setStatusBarCustom(this) 18 | } 19 | 20 | } -------------------------------------------------------------------------------- /commonBaseLib/src/main/java/com/winwang/mvvm/widget/LoadDialog.kt: -------------------------------------------------------------------------------- 1 | package com.winwang.mvvm.widget 2 | 3 | import android.app.Dialog 4 | import android.content.Context 5 | import android.text.TextUtils 6 | import android.view.View 7 | import android.widget.TextView 8 | import com.winwang.mvvm.R 9 | import kotlin.jvm.Throws 10 | 11 | /** 12 | *Created by WinWang on 2020/10/9 13 | *Description-> 14 | */ 15 | class LoadDialog @JvmOverloads constructor(context: Context) { 16 | private var dialog: Dialog? = null 17 | private var textView: TextView? = null 18 | 19 | init { 20 | initDialog(context) 21 | } 22 | 23 | private fun initDialog(context: Context) { 24 | dialog = Dialog(context, R.style.Custom_Loading_Style) 25 | dialog?.setCancelable(true) 26 | dialog?.show() 27 | dialog?.setContentView(R.layout.custom_loading_view) 28 | dialog?.setCanceledOnTouchOutside(false) 29 | textView = dialog!!.findViewById(R.id.loading_text) 30 | } 31 | 32 | fun setCanceledOnTouchOutside(canceled: Boolean) { 33 | dialog!!.setCanceledOnTouchOutside(canceled) 34 | } 35 | 36 | @Throws(Exception::class) 37 | fun showLoading(message: String? = "") { 38 | if (TextUtils.isEmpty(message)) { 39 | textView?.visibility = View.GONE 40 | } else { 41 | textView?.visibility = View.VISIBLE 42 | textView?.text = message 43 | } 44 | if (dialog!!.isShowing) return 45 | dialog?.show() 46 | } 47 | 48 | fun hideLoading() { 49 | if (null != dialog && dialog!!.isShowing) dialog!!.dismiss() 50 | } 51 | 52 | fun showing(): Boolean { 53 | return null != dialog && dialog!!.isShowing 54 | } 55 | } -------------------------------------------------------------------------------- /commonBaseLib/src/main/res/drawable-xxhdpi/common_empty_img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/commonBaseLib/src/main/res/drawable-xxhdpi/common_empty_img.png -------------------------------------------------------------------------------- /commonBaseLib/src/main/res/drawable-xxhdpi/custom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/commonBaseLib/src/main/res/drawable-xxhdpi/custom.png -------------------------------------------------------------------------------- /commonBaseLib/src/main/res/drawable-xxhdpi/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/commonBaseLib/src/main/res/drawable-xxhdpi/error.png -------------------------------------------------------------------------------- /commonBaseLib/src/main/res/drawable-xxhdpi/timeout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/commonBaseLib/src/main/res/drawable-xxhdpi/timeout.png -------------------------------------------------------------------------------- /commonBaseLib/src/main/res/drawable/bg_dialog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/res/drawable/common_loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/commonBaseLib/src/main/res/drawable/common_loading.png -------------------------------------------------------------------------------- /commonBaseLib/src/main/res/drawable/common_loading_rotate.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/res/drawable/custom_loading_progress_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/res/drawable/custom_loading_view_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/res/drawable/placeholder.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/commonBaseLib/src/main/res/drawable/placeholder.9.png -------------------------------------------------------------------------------- /commonBaseLib/src/main/res/layout/custom_loading_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 25 | 26 | 39 | 40 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/res/layout/fragment_progress_dialog.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 17 | 18 | 26 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/res/layout/head_top_bar_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 11 | 16 | 17 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/res/layout/layout_animate.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/res/layout/layout_custom.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 15 | 16 | 24 | 25 | 31 | 32 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/res/layout/layout_custom_error.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 18 | 19 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/res/layout/layout_default_item_shimmer_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 17 | 18 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/res/layout/layout_empty.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 14 | 15 | 23 | 24 | 31 | 32 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/res/layout/layout_error.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 22 | 23 | 29 | 30 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/res/layout/layout_load_sir.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/res/layout/layout_loading.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 17 | 18 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/res/layout/layout_shimmer_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 12 | 13 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/res/layout/layout_timeout.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 16 | 17 | 23 | 24 | 30 | 31 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #bb505d 4 | #bb505d 5 | 6 | #1B1B1D 7 | #6B7178 8 | #9297A2 9 | 10 | #FFFFFF 11 | #8c000000 12 | #F8F8F8 13 | #E8E8E8 14 | 15 | #E2E2E2 16 | #FC1603 17 | 18 | #ffffff 19 | #000000 20 | #333 21 | #666 22 | #999 23 | 24 | 25 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 加载失败,请点击重试 4 | 没有更多了 5 | 正在加载中… 6 | 重新加载 7 | 网络似乎除了点问题… 8 | 没有相关数据 9 | 网络连接失败 10 | 网络请求超时 11 | 数据解析错误 12 | 网络请求线程异常 13 | 14 | 15 | 16 | 暂无数据 17 | 请检查你的网络连接 18 | 重试 19 | 没有更多了 20 | Activity(empty) 21 | Activity(placeholder) 22 | Activity with Convertor 23 | single Fragment(custom) 24 | multiple Fragment 25 | multiple Fragment+ViewPager 26 | View(timeout) 27 | Animat Callback 28 | keep title bar in Fragment 29 | LoadSir 30 | Success 31 | keep title bar 32 | 暂无数据展示 33 | 点我重试! 34 | best practices 35 | default LoadSir Callback 36 | keep title bar in Activity 37 | 38 | 首页 39 | 分类 40 | 直播 41 | 我的 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /commonBaseLib/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 15 | 16 | 17 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /depends.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'kotlin-android' 2 | apply plugin: 'kotlin-kapt' 3 | 4 | android { 5 | namespace 'com.winwang.readinggallery' 6 | compileSdkVersion rootProject.ext.android["compileSdkVersion"] 7 | 8 | defaultConfig { 9 | minSdkVersion rootProject.ext.android["minSdkVersion"] 10 | targetSdkVersion rootProject.ext.android["targetSdkVersion"] 11 | versionCode 1 12 | versionName "1.0" 13 | kotlinOptions { 14 | jvmTarget = JavaVersion.VERSION_17 15 | } 16 | consumerProguardFiles 'consumer-rules.pro' 17 | } 18 | 19 | dataBinding { 20 | enabled true 21 | } 22 | 23 | buildTypes { 24 | release { 25 | minifyEnabled false 26 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 27 | } 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/gradle.properties -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WinWang/ReadingGallery/db8f2ac699a7a45a0f831363a5d040754f642d7c/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Apr 27 21:03:22 CST 2021 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-8.7-all.zip 7 | --------------------------------------------------------------------------------