├── .gitignore
├── .idea
├── codeStyles
│ └── Project.xml
├── eclipseCodeFormatter.xml
├── inspectionProfiles
│ └── Project_Default.xml
├── misc.xml
└── runConfigurations.xml
├── README.md
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── drz
│ │ └── mvvmcomponent
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── alone
│ │ └── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── drz
│ │ │ └── mvvmcomponent
│ │ │ └── AppApplication.java
│ └── res
│ │ ├── drawable-v24
│ │ └── app_ic_launcher_foreground.xml
│ │ ├── drawable
│ │ └── app_ic_launcher_background.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── app_ic_launcher.xml
│ │ └── app_ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── app_ic_launcher.png
│ │ └── app_ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── app_ic_launcher.png
│ │ └── app_ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── app_ic_launcher.png
│ │ └── app_ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── app_ic_launcher.png
│ │ ├── app_ic_launcher_round.png
│ │ └── app_icon.jpg
│ │ ├── mipmap-xxxhdpi
│ │ ├── app_ic_launcher.png
│ │ └── app_ic_launcher_round.png
│ │ └── values
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── drz
│ └── mvvmcomponent
│ └── ExampleUnitTest.java
├── build.gradle
├── config.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── keystore.properties
├── library-base
├── .gitignore
├── build.gradle
├── consumer-rules.pro
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── drz
│ │ └── base
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── drz
│ │ │ └── base
│ │ │ ├── activity
│ │ │ ├── IBasePagingView.java
│ │ │ ├── IBaseView.java
│ │ │ └── MvvmBaseActivity.java
│ │ │ ├── base
│ │ │ ├── AppManager.java
│ │ │ └── BaseApplication.java
│ │ │ ├── fragment
│ │ │ ├── MvvmBaseFragment.java
│ │ │ └── MvvmLazyFragment.java
│ │ │ ├── livedatabus
│ │ │ ├── BusMutableLiveData.java
│ │ │ ├── LiveDatabus.java
│ │ │ └── ObserverWrapper.java
│ │ │ ├── loadsir
│ │ │ ├── EmptyCallback.java
│ │ │ ├── ErrorCallback.java
│ │ │ ├── LoadingCallback.java
│ │ │ ├── ShimmerCallback.java
│ │ │ └── TimeoutCallback.java
│ │ │ ├── model
│ │ │ ├── BaseModel.java
│ │ │ ├── BasePagingModel.java
│ │ │ ├── IBaseModelListener.java
│ │ │ ├── IModelListener.java
│ │ │ ├── IPagingModelListener.java
│ │ │ └── SuperBaseModel.java
│ │ │ ├── storage
│ │ │ ├── MmkvHelper.java
│ │ │ └── Remember.java
│ │ │ ├── utils
│ │ │ ├── GsonUtils.java
│ │ │ └── ToastUtil.java
│ │ │ └── viewmodel
│ │ │ ├── IMvvmBaseViewModel.java
│ │ │ └── MvmBaseViewModel.java
│ └── res
│ │ ├── drawable
│ │ ├── base_empty.png
│ │ ├── base_error.png
│ │ └── base_timeout.png
│ │ ├── layout
│ │ ├── base_layout_empty.xml
│ │ ├── base_layout_error.xml
│ │ ├── base_layout_loading.xml
│ │ ├── base_layout_placeholder.xml
│ │ └── base_layout_timeout.xml
│ │ ├── values
│ │ └── strings.xml
│ │ └── xml
│ │ └── base_network_security_config.xml
│ └── test
│ └── java
│ └── com
│ └── drz
│ └── base
│ └── ExampleUnitTest.java
├── library-common
├── .gitignore
├── build.gradle
├── consumer-rules.pro
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── drz
│ │ └── common
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── drz
│ │ │ └── common
│ │ │ ├── CommonModuleInit.java
│ │ │ ├── IModuleInit.java
│ │ │ ├── adapter
│ │ │ ├── CommonBindingAdapters.java
│ │ │ └── ScreenAutoAdapter.java
│ │ │ ├── config
│ │ │ ├── ModuleLifecycleConfig.java
│ │ │ └── ModuleLifecycleReflexs.java
│ │ │ ├── contract
│ │ │ ├── BaseCustomViewModel.java
│ │ │ ├── UserInfo.java
│ │ │ └── VideoHeaderBean.java
│ │ │ ├── global
│ │ │ └── GlobalKey.java
│ │ │ ├── interceptor
│ │ │ └── LoginInterceptor.java
│ │ │ ├── recyclerview
│ │ │ └── RecyclerItemDecoration.java
│ │ │ ├── router
│ │ │ ├── JsonServiceImpl.java
│ │ │ ├── RouterActivityPath.java
│ │ │ └── RouterFragmentPath.java
│ │ │ ├── services
│ │ │ ├── IAppInfoService.java
│ │ │ ├── IDeviceService.java
│ │ │ ├── ILoginService.java
│ │ │ ├── ISettingService.java
│ │ │ └── config
│ │ │ │ └── ServicesConfig.java
│ │ │ ├── utils
│ │ │ ├── Base64.java
│ │ │ ├── DateTimeUtils.java
│ │ │ ├── DensityUtils.java
│ │ │ ├── MD5.java
│ │ │ ├── StringUtils.java
│ │ │ └── Validator.java
│ │ │ └── views
│ │ │ └── CommonCustomTextView.java
│ └── res
│ │ ├── drawable
│ │ ├── common_action_right.png
│ │ ├── common_collection.png
│ │ ├── common_share.png
│ │ ├── common_title_right_icon.png
│ │ ├── common_tools_iv_bg.webp
│ │ └── common_tools_iv_bg2.webp
│ │ └── values
│ │ ├── common_colors.xml
│ │ └── strings.xml
│ └── test
│ └── java
│ └── com
│ └── drz
│ └── common
│ └── ExampleUnitTest.java
├── library-network
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── zhouyou
│ │ └── http
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── zhouyou
│ │ │ └── http
│ │ │ ├── EasyHttp.java
│ │ │ ├── api
│ │ │ └── ApiService.java
│ │ │ ├── body
│ │ │ ├── ProgressResponseCallBack.java
│ │ │ ├── RequestBodyUtils.java
│ │ │ ├── UIProgressResponseCallBack.java
│ │ │ └── UploadProgressRequestBody.java
│ │ │ ├── cache
│ │ │ ├── RxCache.java
│ │ │ ├── converter
│ │ │ │ ├── GsonDiskConverter.java
│ │ │ │ ├── IDiskConverter.java
│ │ │ │ └── SerializableDiskConverter.java
│ │ │ ├── core
│ │ │ │ ├── BaseCache.java
│ │ │ │ ├── CacheCore.java
│ │ │ │ ├── LruDiskCache.java
│ │ │ │ └── MemoryCache.java
│ │ │ ├── model
│ │ │ │ ├── CacheMode.java
│ │ │ │ └── CacheResult.java
│ │ │ └── stategy
│ │ │ │ ├── BaseStrategy.java
│ │ │ │ ├── CacheAndRemoteDistinctStrategy.java
│ │ │ │ ├── CacheAndRemoteStrategy.java
│ │ │ │ ├── FirstCacheStategy.java
│ │ │ │ ├── FirstRemoteStrategy.java
│ │ │ │ ├── IStrategy.java
│ │ │ │ ├── NoStrategy.java
│ │ │ │ ├── OnlyCacheStrategy.java
│ │ │ │ └── OnlyRemoteStrategy.java
│ │ │ ├── callback
│ │ │ ├── CallBack.java
│ │ │ ├── CallBackProxy.java
│ │ │ ├── CallClazzProxy.java
│ │ │ ├── DownloadProgressCallBack.java
│ │ │ ├── IType.java
│ │ │ ├── ProgressDialogCallBack.java
│ │ │ └── SimpleCallBack.java
│ │ │ ├── cookie
│ │ │ ├── CookieManger.java
│ │ │ ├── PersistentCookieStore.java
│ │ │ └── SerializableOkHttpCookies.java
│ │ │ ├── exception
│ │ │ ├── ApiException.java
│ │ │ └── ServerException.java
│ │ │ ├── func
│ │ │ ├── ApiResultFunc.java
│ │ │ ├── CacheResultFunc.java
│ │ │ ├── HandleFuc.java
│ │ │ ├── HttpResponseFunc.java
│ │ │ └── RetryExceptionFunc.java
│ │ │ ├── https
│ │ │ └── HttpsUtils.java
│ │ │ ├── interceptor
│ │ │ ├── BaseDynamicInterceptor.java
│ │ │ ├── BaseExpiredInterceptor.java
│ │ │ ├── CacheInterceptor.java
│ │ │ ├── CacheInterceptorOffline.java
│ │ │ ├── GzipRequestInterceptor.java
│ │ │ ├── HeadersInterceptor.java
│ │ │ ├── HttpLoggingInterceptor.java
│ │ │ └── NoCacheInterceptor.java
│ │ │ ├── model
│ │ │ ├── ApiResult.java
│ │ │ ├── HttpHeaders.java
│ │ │ ├── HttpParams.java
│ │ │ └── Optional.java
│ │ │ ├── request
│ │ │ ├── BaseBodyRequest.java
│ │ │ ├── BaseRequest.java
│ │ │ ├── CustomRequest.java
│ │ │ ├── DeleteRequest.java
│ │ │ ├── DownloadRequest.java
│ │ │ ├── GetRequest.java
│ │ │ ├── PostRequest.java
│ │ │ └── PutRequest.java
│ │ │ ├── subsciber
│ │ │ ├── BaseSubscriber.java
│ │ │ ├── CallBackSubsciber.java
│ │ │ ├── DownloadSubscriber.java
│ │ │ ├── IProgressDialog.java
│ │ │ ├── ProgressCancelListener.java
│ │ │ └── ProgressSubscriber.java
│ │ │ ├── transformer
│ │ │ └── HandleErrTransformer.java
│ │ │ └── utils
│ │ │ ├── HttpLog.java
│ │ │ ├── HttpUtil.java
│ │ │ ├── NetworkUtil.java
│ │ │ ├── RxUtil.java
│ │ │ └── Utils.java
│ └── res
│ │ └── values
│ │ └── strings.xml
│ └── test
│ └── java
│ └── com
│ └── zhouyou
│ └── http
│ └── ExampleUnitTest.java
├── library-servicemanager
├── .gitignore
├── build.gradle
├── proguard-rules.pro
├── project.properties
└── src
│ └── main
│ ├── AndroidManifest.xml
│ └── java
│ └── com
│ └── limpoxe
│ └── support
│ └── servicemanager
│ ├── MethodRouter.java
│ ├── ProcessBinder.java
│ ├── RemoteProxy.java
│ ├── ServiceManager.java
│ ├── ServiceProvider.java
│ ├── compat
│ ├── BundleCompat.java
│ └── ContentProviderCompat.java
│ ├── local
│ ├── ServiceFetcher.java
│ └── ServicePool.java
│ └── util
│ ├── ParamUtil.java
│ └── RefIectUtil.java
├── library-video
├── .gitignore
├── build.gradle
├── consumer-rules.pro
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── drz
│ │ └── video
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── drz
│ │ │ └── video
│ │ │ ├── helper
│ │ │ ├── ScrollCalculatorHelper.java
│ │ │ └── VideoPlayerHelper.java
│ │ │ └── views
│ │ │ └── CoverVideoPlayerView.java
│ └── res
│ │ ├── layout
│ │ └── video_layout_cover.xml
│ │ └── values
│ │ └── strings.xml
│ └── test
│ └── java
│ └── com
│ └── drz
│ └── video
│ └── ExampleUnitTest.java
├── module-community
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── drz
│ │ └── community
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── alone
│ │ └── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── drz
│ │ │ └── community
│ │ │ ├── CommunityFragment.java
│ │ │ ├── adapter
│ │ │ └── CommunityFragmentPageAdapter.java
│ │ │ ├── attention
│ │ │ ├── AttentionFragment.java
│ │ │ ├── AttentionModel.java
│ │ │ ├── AttentionViewModel.java
│ │ │ ├── IAttentionView.java
│ │ │ ├── adapter
│ │ │ │ └── AttentionRecyclerAdapter.java
│ │ │ └── bean
│ │ │ │ ├── AttentionCardBean.java
│ │ │ │ └── AttentionCardViewModel.java
│ │ │ └── recommend
│ │ │ ├── IRecommendView.java
│ │ │ ├── RecommendFragment.java
│ │ │ ├── RecommendModel.java
│ │ │ ├── RecommendViewModel.java
│ │ │ ├── adapter
│ │ │ ├── ProviderRecommendAdapter.java
│ │ │ ├── SquareCardAdapter.java
│ │ │ └── provider
│ │ │ │ ├── CommunityCardProvider.java
│ │ │ │ ├── IRecommendItemType.java
│ │ │ │ └── SquareCardProvider.java
│ │ │ └── bean
│ │ │ ├── CommunityColumnsCard.java
│ │ │ ├── HorizontalScrollCard.java
│ │ │ ├── SquareContentCard.java
│ │ │ └── viewmodel
│ │ │ └── CloumnsCardViewModel.java
│ └── res
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable
│ │ ├── community_search.png
│ │ └── ic_launcher_background.xml
│ │ ├── layout
│ │ ├── community_fragment_attention.xml
│ │ ├── community_fragment_community.xml
│ │ ├── community_fragment_recommend.xml
│ │ ├── community_item_attention_card_view.xml
│ │ ├── community_item_community_view.xml
│ │ ├── community_item_square_card_view.xml
│ │ └── community_item_square_item_card_view.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
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── drz
│ └── community
│ └── ExampleUnitTest.java
├── module-home
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── drz
│ │ └── home
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── alone
│ │ └── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── drz
│ │ │ └── home
│ │ │ ├── HomeFragment.java
│ │ │ ├── adapter
│ │ │ └── HomeFragmentPageAdapter.java
│ │ │ ├── daily
│ │ │ ├── DailyFragment.java
│ │ │ ├── DailyModel.java
│ │ │ ├── DailyViewModel.java
│ │ │ ├── IDailyView.java
│ │ │ └── adapter
│ │ │ │ └── ProviderDailyAdapter.java
│ │ │ ├── discover
│ │ │ ├── DisCoverFragment.java
│ │ │ ├── DisCoverModel.java
│ │ │ ├── DisCoverViewModel.java
│ │ │ ├── IDisCoverView.java
│ │ │ ├── adapter
│ │ │ │ ├── CategoryItemAdapter.java
│ │ │ │ ├── ProviderDisCoverAdapter.java
│ │ │ │ ├── SubjectItemAdapter.java
│ │ │ │ └── provider
│ │ │ │ │ ├── CategoryCardProvider.java
│ │ │ │ │ ├── ContentBannerProvider.java
│ │ │ │ │ ├── IDisCoverItemType.java
│ │ │ │ │ ├── SubjectCardProvider.java
│ │ │ │ │ ├── ThemeProvider.java
│ │ │ │ │ ├── TitleProvider.java
│ │ │ │ │ ├── TopBannerProvider.java
│ │ │ │ │ └── VideoCardProvider.java
│ │ │ └── bean
│ │ │ │ ├── BannerBean.java
│ │ │ │ ├── BriefCard.java
│ │ │ │ ├── CategoryCardBean.java
│ │ │ │ ├── SquareCard.java
│ │ │ │ ├── SubjectCardBean.java
│ │ │ │ ├── TextCardbean.java
│ │ │ │ ├── TopBannerBean.java
│ │ │ │ └── viewmodel
│ │ │ │ ├── BriefCardViewModel.java
│ │ │ │ ├── CategoryCardViewModel.java
│ │ │ │ ├── ContentBannerViewModel.java
│ │ │ │ └── TopBannerViewModel.java
│ │ │ └── nominate
│ │ │ ├── INominateView.java
│ │ │ ├── NominateFragment.java
│ │ │ ├── NominateModel.java
│ │ │ ├── NominateViewModel.java
│ │ │ ├── adapter
│ │ │ ├── BannerAdapter.java
│ │ │ ├── ProviderNominateAdapter.java
│ │ │ └── provider
│ │ │ │ ├── FollowCardProvider.java
│ │ │ │ ├── NetBannerProvider.java
│ │ │ │ ├── NominateItemType.java
│ │ │ │ ├── SingleTitleProvider.java
│ │ │ │ ├── TitleProvider.java
│ │ │ │ └── VideoCardProvider.java
│ │ │ └── bean
│ │ │ ├── Banner2Bean.java
│ │ │ ├── FollowCardBean.java
│ │ │ ├── NetData.java
│ │ │ ├── SquareCardCollectionBean.java
│ │ │ ├── TextCardBean.java
│ │ │ ├── VideoSmallCardBean.java
│ │ │ └── viewmodel
│ │ │ ├── BannerCardViewModel.java
│ │ │ ├── FollowCardViewModel.java
│ │ │ ├── SingleTitleViewModel.java
│ │ │ ├── TitleViewModel.java
│ │ │ └── VideoCardViewModel.java
│ └── res
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable
│ │ ├── home_candle.png
│ │ ├── home_search.png
│ │ ├── home_shape_border_btn_bg.xml
│ │ ├── home_shape_video_time_bg.xml
│ │ └── ic_launcher_background.xml
│ │ ├── layout
│ │ ├── home_fragment_daily.xml
│ │ ├── home_fragment_find_more.xml
│ │ ├── home_fragment_home.xml
│ │ ├── home_fragment_nominate.xml
│ │ ├── home_item_banner_item_view.xml
│ │ ├── home_item_banner_view.xml
│ │ ├── home_item_brief_card_view.xml
│ │ ├── home_item_category_card_view.xml
│ │ ├── home_item_category_item_card_view.xml
│ │ ├── home_item_category_item_subject_card_view.xml
│ │ ├── home_item_content_banner_view.xml
│ │ ├── home_item_follow_card_view.xml
│ │ ├── home_item_foote_view.xml
│ │ ├── home_item_single_title_view.xml
│ │ ├── home_item_subject_card_view.xml
│ │ ├── home_item_title_left_right_view.xml
│ │ ├── home_item_top_banner_view.xml
│ │ └── home_item_video_card_view.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
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── drz
│ └── home
│ └── ExampleUnitTest.java
├── module-main
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── drz
│ │ └── main
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── alone
│ │ └── AndroidManifest.xml
│ ├── assets
│ │ └── fonts
│ │ │ ├── FZLanTingHeiS-DB1-GB-Regular.TTF
│ │ │ ├── FZLanTingHeiS-L-GB-Regular.TTF
│ │ │ └── Lobster-1.4.otf
│ ├── java
│ │ └── com
│ │ │ └── drz
│ │ │ └── main
│ │ │ ├── adapter
│ │ │ └── MainPageAdapter.java
│ │ │ ├── application
│ │ │ └── MainModuleInit.java
│ │ │ ├── bean
│ │ │ └── CustomBean.kt
│ │ │ ├── behavior
│ │ │ ├── BottomNavigationBehavior.java
│ │ │ └── VerticalScrollingBehavior.java
│ │ │ ├── ui
│ │ │ ├── BaseDataActivity.kt
│ │ │ ├── GuideActivity.kt
│ │ │ ├── MainActivity.java
│ │ │ └── SplashActivity.java
│ │ │ ├── utils
│ │ │ └── ColorUtils.java
│ │ │ ├── viewholder
│ │ │ └── CustomPageViewHolder.java
│ │ │ └── views
│ │ │ └── CustomNoTouchViewPager.java
│ └── res
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable-xxhdpi
│ │ ├── guide0.jpg
│ │ ├── guide1.jpg
│ │ ├── guide2.jpg
│ │ └── main_splash_bg.webp
│ │ ├── drawable
│ │ ├── guide0.jpg
│ │ ├── guide1.jpg
│ │ ├── guide2.jpg
│ │ ├── ic_launcher_background.xml
│ │ ├── main_community.png
│ │ ├── main_home.png
│ │ ├── main_notify.png
│ │ ├── main_splash_bg.webp
│ │ ├── main_splash_start.xml
│ │ ├── main_start_bg.xml
│ │ └── main_user.png
│ │ ├── layout
│ │ ├── main_activity_guide.xml
│ │ ├── main_activity_main.xml
│ │ ├── main_activity_splash.xml
│ │ └── main_item_custom_view.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
│ │ └── splash_start.webp
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ └── values
│ │ ├── colors.xml
│ │ ├── main_dimes.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── drz
│ └── main
│ └── ExampleUnitTest.java
├── module-more
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── drz
│ │ └── more
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── alone
│ │ └── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── drz
│ │ │ └── more
│ │ │ ├── MoreFragment.java
│ │ │ ├── adapter
│ │ │ └── MoreFragmentPageAdapter.java
│ │ │ ├── message
│ │ │ ├── IMessageView.java
│ │ │ ├── MessageFragment.java
│ │ │ ├── MessageFragmentViewModel.java
│ │ │ ├── MessageModel.java
│ │ │ ├── adapter
│ │ │ │ └── MessageAdapter.java
│ │ │ └── bean
│ │ │ │ ├── Message.java
│ │ │ │ └── MessageViewModel.java
│ │ │ ├── themes
│ │ │ ├── IThemeView.java
│ │ │ ├── ThemeFragmentViewModel.java
│ │ │ ├── ThemeModel.java
│ │ │ ├── ThemesFragment.java
│ │ │ ├── adapter
│ │ │ │ └── ThemesFragmentPageAdapter.java
│ │ │ ├── bean
│ │ │ │ ├── TabInfo.java
│ │ │ │ └── Tabs.java
│ │ │ └── childpager
│ │ │ │ ├── IThemeContentView.java
│ │ │ │ ├── ThemesContentFragment.java
│ │ │ │ ├── ThemesContentModel.java
│ │ │ │ ├── ThemesContentViewModel.java
│ │ │ │ ├── adapter
│ │ │ │ └── ThemesContentAdapter.java
│ │ │ │ └── bean
│ │ │ │ ├── ThemesContent.java
│ │ │ │ └── ThemesItemViewModel.java
│ │ │ └── topic
│ │ │ ├── ITopicView.java
│ │ │ ├── TopicFragment.java
│ │ │ ├── TopicFragmentViewModel.java
│ │ │ ├── TopicModel.java
│ │ │ ├── adapter
│ │ │ └── TopicAdapter.java
│ │ │ └── bean
│ │ │ └── TopicBean.java
│ └── res
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable
│ │ ├── ic_launcher_background.xml
│ │ └── more_search.png
│ │ ├── layout
│ │ ├── more_fragment_message.xml
│ │ ├── more_fragment_more.xml
│ │ ├── more_fragment_themes.xml
│ │ ├── more_fragment_themes_content.xml
│ │ ├── more_fragment_topic.xml
│ │ ├── more_item_foote_view.xml
│ │ ├── more_item_message_view.xml
│ │ └── more_item_themes_view.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
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── drz
│ └── more
│ └── ExampleUnitTest.java
├── module-player
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── drz
│ │ └── player
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── alone
│ │ └── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── drz
│ │ │ └── player
│ │ │ ├── IVideoPlayerView.java
│ │ │ ├── VideoPlayerActivity.java
│ │ │ ├── VideoPlayerModel.java
│ │ │ ├── VideoPlayerViewModel.java
│ │ │ ├── adapter
│ │ │ ├── ProviderVideoPagerAdapter.java
│ │ │ └── provider
│ │ │ │ ├── IVideoItemType.java
│ │ │ │ ├── NominateViewProvider.java
│ │ │ │ ├── ReplyViewProvider.java
│ │ │ │ └── TitleViewProvider.java
│ │ │ └── bean
│ │ │ ├── LeftAlignTextHeader.java
│ │ │ ├── ReplyBean.java
│ │ │ ├── TextCard.java
│ │ │ ├── VideoSmallCard.java
│ │ │ └── viewmodel
│ │ │ ├── ReplyViewModel.java
│ │ │ ├── VideoCardViewModel.java
│ │ │ └── VideoTextViewModel.java
│ └── res
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable
│ │ ├── ic_launcher_background.xml
│ │ ├── player_action_go.png
│ │ ├── player_like.png
│ │ ├── player_shape_video_time_bg.xml
│ │ └── tools_player_bg.jpeg
│ │ ├── layout
│ │ ├── player_activity_video_player.xml
│ │ ├── player_item_footer_white_view.xml
│ │ ├── player_item_reply_view.xml
│ │ ├── player_item_title_white_view.xml
│ │ ├── player_item_video_card_white_view.xml
│ │ └── player_item_video_header_view.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
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── drz
│ └── player
│ └── ExampleUnitTest.java
├── module-user
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── drz
│ │ └── user
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── alone
│ │ └── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── drz
│ │ │ └── user
│ │ │ ├── AttentionActivity.java
│ │ │ ├── LoginActivity.java
│ │ │ ├── UserFragment.java
│ │ │ ├── UserModuleInit.java
│ │ │ ├── adapter
│ │ │ └── RecyclerAdapter.java
│ │ │ └── services
│ │ │ └── ILoginServiceImpl.java
│ └── res
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable-xxhdpi
│ │ ├── user_login_bg1.webp
│ │ ├── user_login_bg2.webp
│ │ ├── user_login_bg3.webp
│ │ └── user_login_bg4.webp
│ │ ├── drawable
│ │ ├── avatar.jpg
│ │ ├── ic_launcher_background.xml
│ │ ├── user_icon.jpg
│ │ ├── user_more.png
│ │ ├── user_shape_login_bg.xml
│ │ └── user_shape_login_bg2.xml
│ │ ├── layout
│ │ ├── user_activity_attention.xml
│ │ ├── user_activity_login.xml
│ │ ├── user_fragment_layout.xml
│ │ ├── user_item_footer_view.xml
│ │ └── user_item_view_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
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── drz
│ └── user
│ └── ExampleUnitTest.java
├── module.build.gradle
├── mvvm.jks
└── settings.gradle
/.idea/eclipseCodeFormatter.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/drz/mvvmcomponent/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.drz.mvvmcomponent;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.platform.app.InstrumentationRegistry;
6 | import androidx.test.ext.junit.runners.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24 |
25 | assertEquals("com.mvvm.mvvmcomponent", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/alone/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/java/com/drz/mvvmcomponent/AppApplication.java:
--------------------------------------------------------------------------------
1 | package com.drz.mvvmcomponent;
2 |
3 | import com.drz.base.base.BaseApplication;
4 | import com.drz.common.config.ModuleLifecycleConfig;
5 |
6 | /**
7 | * 应用模块: 宿主app
8 | *
9 | * 类描述: 宿主app的 application ,在这里通过common组件中定义的组件生命周期配置类进行相应初始化(通过反射调用各个组件的初始化器)
10 | *
11 | *
12 | * @author darryrzhoong
13 | * @since 2020-02-26
14 | */
15 | public class AppApplication extends BaseApplication
16 | {
17 |
18 | @Override
19 | public void onCreate()
20 | {
21 | super.onCreate();
22 | setsDebug(BuildConfig.DEBUG);
23 | // 初始化需要初始化的组件
24 | ModuleLifecycleConfig.getInstance().initModuleAhead(this);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/app_ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/app_ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/app_ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/app/src/main/res/mipmap-hdpi/app_ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/app_ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/app/src/main/res/mipmap-hdpi/app_ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/app_ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/app/src/main/res/mipmap-mdpi/app_ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/app_ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/app/src/main/res/mipmap-mdpi/app_ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/app_ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/app/src/main/res/mipmap-xhdpi/app_ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/app_ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/app/src/main/res/mipmap-xhdpi/app_ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/app_ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/app/src/main/res/mipmap-xxhdpi/app_ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/app_ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/app/src/main/res/mipmap-xxhdpi/app_ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/app_icon.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/app/src/main/res/mipmap-xxhdpi/app_icon.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/app_ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/app/src/main/res/mipmap-xxxhdpi/app_ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/app_ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/app/src/main/res/mipmap-xxxhdpi/app_ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Eyepetizer
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/test/java/com/drz/mvvmcomponent/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.drz.mvvmcomponent;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app's APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Automatically convert third-party libraries to use AndroidX
19 | android.enableJetifier=true
20 | #isBuildModule Ϊ true ʱ����ʹÿ�������������, false ����Խ�����������ɵ����� App ��
21 | isBuildModule=false
22 |
23 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Thu Mar 12 11:15:04 CST 2020
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
7 |
--------------------------------------------------------------------------------
/keystore.properties:
--------------------------------------------------------------------------------
1 | storePassword=mvvm123
2 | keyPassword=mvvm123
3 | keyAlias=key0
4 | storeFile=../mvvm.jks
--------------------------------------------------------------------------------
/library-base/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/library-base/consumer-rules.pro:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/library-base/consumer-rules.pro
--------------------------------------------------------------------------------
/library-base/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 |
--------------------------------------------------------------------------------
/library-base/src/androidTest/java/com/drz/base/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.drz.base;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.platform.app.InstrumentationRegistry;
6 | import androidx.test.ext.junit.runners.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24 |
25 | assertEquals("com.mvvm.library_base.test", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/library-base/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/library-base/src/main/java/com/drz/base/activity/IBasePagingView.java:
--------------------------------------------------------------------------------
1 | package com.drz.base.activity;
2 |
3 | /**
4 | * 应用模块:
5 | *
6 | * 类描述:
7 | *
8 | *
9 | * @author darryrzhoong
10 | * @since 2020-01-27
11 | */
12 | public interface IBasePagingView extends IBaseView {
13 | /**
14 | * 加载更多失败
15 | * */
16 | void onLoadMoreFailure(String message);
17 |
18 | /**
19 | * 没有更多了
20 | * */
21 | void onLoadMoreEmpty();
22 | }
23 |
--------------------------------------------------------------------------------
/library-base/src/main/java/com/drz/base/activity/IBaseView.java:
--------------------------------------------------------------------------------
1 | package com.drz.base.activity;
2 |
3 | /**
4 | * 应用模块: activity
5 | *
6 | * 类描述: 界面UI显示切换
7 | *
8 | *
9 | * @author darryrzhoong
10 | * @since 2020-01-27
11 | */
12 | public interface IBaseView {
13 | /**
14 | * 显示内容
15 | */
16 | void showContent();
17 |
18 | /**
19 | * 显示加载提示
20 | */
21 | void showLoading();
22 |
23 | /**
24 | * 显示空页面
25 | */
26 | void showEmpty();
27 |
28 | /**
29 | * 刷新失败
30 | */
31 | void showFailure(String message);
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/library-base/src/main/java/com/drz/base/livedatabus/ObserverWrapper.java:
--------------------------------------------------------------------------------
1 | package com.drz.base.livedatabus;
2 |
3 | import androidx.lifecycle.Observer;
4 |
5 | /**
6 | * 应用模块: liveData
7 | *
8 | * 类描述: Observer 包装类
9 | *
10 | *
11 | * @author darryrzhoong
12 | * @since 2020-02-07
13 | */
14 | public class ObserverWrapper implements Observer {
15 |
16 | private Observer observer;
17 |
18 | public ObserverWrapper(Observer observer) {
19 | this.observer = observer;
20 | }
21 |
22 | @Override
23 | public void onChanged(T t) {
24 | if (observer != null){
25 | if (isCallOnObserve()){
26 | return;
27 | }
28 | observer.onChanged(t);
29 | }
30 | }
31 |
32 | private boolean isCallOnObserve() {
33 | StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
34 | if (stackTrace != null && stackTrace.length > 0) {
35 | for (StackTraceElement element : stackTrace) {
36 | if ("android.arch.lifecycle.LiveData".equals(element.getClassName()) &&
37 | "observeForever".equals(element.getMethodName())) {
38 | return true;
39 | }
40 | }
41 | }
42 | return false;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/library-base/src/main/java/com/drz/base/loadsir/EmptyCallback.java:
--------------------------------------------------------------------------------
1 | package com.drz.base.loadsir;
2 |
3 | import com.kingja.loadsir.callback.Callback;
4 | import com.drz.base.R;
5 |
6 | /**
7 | * 应用模块: loadSir
8 | *
9 | * 类描述: 空页面
10 | *
11 | *
12 | * @author darryrzhoong
13 | * @since 2020-01-27
14 | */
15 | public class EmptyCallback extends Callback
16 | {
17 | @Override
18 | protected int onCreateView()
19 | {
20 | return R.layout.base_layout_empty;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/library-base/src/main/java/com/drz/base/loadsir/ErrorCallback.java:
--------------------------------------------------------------------------------
1 | package com.drz.base.loadsir;
2 |
3 | import com.kingja.loadsir.callback.Callback;
4 | import com.drz.base.R;
5 |
6 | /**
7 | * 应用模块:
8 | *
9 | * 类描述: 错误页面
10 | *
11 | *
12 | * @author darryrzhoong
13 | * @since 2020-01-27
14 | */
15 | public class ErrorCallback extends Callback
16 | {
17 | @Override
18 | protected int onCreateView()
19 | {
20 | return R.layout.base_layout_error;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/library-base/src/main/java/com/drz/base/loadsir/LoadingCallback.java:
--------------------------------------------------------------------------------
1 | package com.drz.base.loadsir;
2 |
3 | import android.content.Context;
4 | import android.view.View;
5 |
6 | import com.kingja.loadsir.callback.Callback;
7 | import com.drz.base.R;
8 |
9 | /**
10 | * 应用模块:
11 | *
12 | * 类描述: 等待加载
13 | *
14 | *
15 | * @author darryrzhoong
16 | * @since 2020-01-27
17 | */
18 | public class LoadingCallback extends Callback
19 | {
20 | @Override
21 | protected int onCreateView()
22 | {
23 | return R.layout.base_layout_loading;
24 | }
25 |
26 | @Override
27 | public boolean getSuccessVisible()
28 | {
29 | return super.getSuccessVisible();
30 | }
31 |
32 | @Override
33 | protected boolean onReloadEvent(Context context, View view)
34 | {
35 | return true;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/library-base/src/main/java/com/drz/base/loadsir/ShimmerCallback.java:
--------------------------------------------------------------------------------
1 | package com.drz.base.loadsir;
2 |
3 | import android.content.Context;
4 | import android.view.View;
5 |
6 | import com.kingja.loadsir.callback.Callback;
7 | import com.drz.base.R;
8 |
9 | /**
10 | * 应用模块:
11 | *
12 | * 类描述: 骨架屏
13 | *
14 | *
15 | * @author darryrzhoong
16 | * @since 2020-01-27
17 | */
18 | public class ShimmerCallback extends Callback
19 | {
20 | @Override
21 | protected int onCreateView()
22 | {
23 | return R.layout.base_layout_placeholder;
24 | }
25 |
26 | @Override
27 | protected boolean onReloadEvent(Context context, View view)
28 | {
29 | return true;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/library-base/src/main/java/com/drz/base/loadsir/TimeoutCallback.java:
--------------------------------------------------------------------------------
1 | package com.drz.base.loadsir;
2 |
3 | import com.kingja.loadsir.callback.Callback;
4 | import com.drz.base.R;
5 |
6 | /**
7 | * 应用模块:
8 | *
9 | * 类描述: 网络超时
10 | *
11 | *
12 | * @author darryrzhoong
13 | * @since 2020-01-27
14 | */
15 | public class TimeoutCallback extends Callback
16 | {
17 | @Override
18 | protected int onCreateView()
19 | {
20 | return R.layout.base_layout_timeout;
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/library-base/src/main/java/com/drz/base/model/IBaseModelListener.java:
--------------------------------------------------------------------------------
1 | package com.drz.base.model;
2 |
3 | /**
4 | * 应用模块: model
5 | *
6 | * 类描述: model业务类型监听器,根据不同的model创建不同的业务model监听器
7 | *
8 | *
9 | * @author darryrzhoong
10 | * @since 2020-01-27
11 | */
12 | public interface IBaseModelListener
13 | {
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/library-base/src/main/java/com/drz/base/model/IModelListener.java:
--------------------------------------------------------------------------------
1 | package com.drz.base.model;
2 |
3 | /**
4 | * 应用模块: model
5 | *
6 | * 类描述: 通用model
7 | *
8 | *
9 | * @author darryrzhoong
10 | * @since 2020-01-27
11 | */
12 | public interface IModelListener extends IBaseModelListener
13 | {
14 | /**
15 | * 数据加载完成
16 | *
17 | * @param model model
18 | * @param data 数据
19 | */
20 | void onLoadFinish(BaseModel model, T data);
21 |
22 | /**
23 | * 数据加载失败
24 | *
25 | * @param model model
26 | * @param prompt 错误
27 | */
28 | void onLoadFail(BaseModel model, String prompt);
29 | }
30 |
--------------------------------------------------------------------------------
/library-base/src/main/java/com/drz/base/model/IPagingModelListener.java:
--------------------------------------------------------------------------------
1 | package com.drz.base.model;
2 |
3 | /**
4 | * 应用模块:
5 | *
6 | * 类描述:
7 | *
8 | *
9 | * @author darryrzhoong
10 | * @since 2020-01-27
11 | */
12 | public interface IPagingModelListener extends IBaseModelListener
13 | {
14 | /**
15 | * 数据加载完成
16 | *
17 | * @param model model
18 | * @param data 数据
19 | * @param isEmpty 数据是否为空
20 | * @param isFirstPage 是否是第一页
21 | * @param hasNextPage 是否还有下一页
22 | */
23 | void onLoadFinish(BasePagingModel model, T data, boolean isEmpty, boolean isFirstPage);
24 |
25 | /**
26 | * 数据加载失败
27 | *
28 | * @param model model
29 | * @param prompt 错误
30 | * @param isFirstPage 是否是第一页
31 | */
32 | void onLoadFail(BasePagingModel model, String prompt, boolean isFirstPage);
33 | }
34 |
--------------------------------------------------------------------------------
/library-base/src/main/java/com/drz/base/utils/ToastUtil.java:
--------------------------------------------------------------------------------
1 | package com.drz.base.utils;
2 |
3 | import android.content.Context;
4 | import android.text.TextUtils;
5 | import android.widget.Toast;
6 |
7 | /**
8 | * 应用模块: utils
9 | *
10 | * 类描述: toast显示工具类
11 | *
12 | *
13 | * @author darryrzhoong
14 | * @since 2020-01-27
15 | */
16 | public class ToastUtil
17 | {
18 |
19 | private static Toast mToast;
20 |
21 | public static void show(Context context, String msg)
22 | {
23 | try
24 | {
25 | if (null != context && !TextUtils.isEmpty(msg))
26 | {
27 | if (null != mToast)
28 | {
29 | mToast.cancel();
30 | }
31 | mToast = Toast.makeText(context, "", Toast.LENGTH_LONG);
32 | mToast.setText(msg);
33 | mToast.show();
34 | }
35 | }
36 | catch (Exception e)
37 | {
38 | e.printStackTrace();
39 | }
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/library-base/src/main/java/com/drz/base/viewmodel/IMvvmBaseViewModel.java:
--------------------------------------------------------------------------------
1 | package com.drz.base.viewmodel;
2 |
3 | /**
4 | * 应用模块: viewModel
5 | *
6 | * 类描述: 定义viewModel与 V 的关联
7 | *
8 | *
9 | * @author darryrzhoong
10 | * @since 2020-01-27
11 | */
12 | public interface IMvvmBaseViewModel {
13 | /**
14 | * 关联View
15 | * */
16 | void attachUi(V view);
17 |
18 | /**
19 | * 获取View
20 | * */
21 | V getPageView();
22 |
23 | /**
24 | * 是否已经关联View
25 | * */
26 | boolean isUiAttach();
27 |
28 | /**
29 | * 解除关联
30 | * */
31 | void detachUi();
32 | }
33 |
--------------------------------------------------------------------------------
/library-base/src/main/res/drawable/base_empty.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/library-base/src/main/res/drawable/base_empty.png
--------------------------------------------------------------------------------
/library-base/src/main/res/drawable/base_error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/library-base/src/main/res/drawable/base_error.png
--------------------------------------------------------------------------------
/library-base/src/main/res/drawable/base_timeout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/library-base/src/main/res/drawable/base_timeout.png
--------------------------------------------------------------------------------
/library-base/src/main/res/layout/base_layout_empty.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
14 |
21 |
22 |
26 |
27 |
--------------------------------------------------------------------------------
/library-base/src/main/res/layout/base_layout_error.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
21 |
25 |
26 |
--------------------------------------------------------------------------------
/library-base/src/main/res/layout/base_layout_loading.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/library-base/src/main/res/layout/base_layout_timeout.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
21 |
22 |
26 |
27 |
--------------------------------------------------------------------------------
/library-base/src/main/res/xml/base_network_security_config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/library-base/src/test/java/com/drz/base/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.drz.base;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/library-common/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/library-common/consumer-rules.pro:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/library-common/consumer-rules.pro
--------------------------------------------------------------------------------
/library-common/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/library-common/src/androidTest/java/com/drz/common/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.drz.common;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.platform.app.InstrumentationRegistry;
6 | import androidx.test.ext.junit.runners.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24 |
25 | assertEquals("com.mvvm.library_commen.test", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/library-common/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
--------------------------------------------------------------------------------
/library-common/src/main/java/com/drz/common/CommonModuleInit.java:
--------------------------------------------------------------------------------
1 | package com.drz.common;
2 |
3 |
4 | import androidx.annotation.Nullable;
5 |
6 | import com.alibaba.android.arouter.launcher.ARouter;
7 | import com.drz.base.base.BaseApplication;
8 | import com.limpoxe.support.servicemanager.ServiceManager;
9 | import com.orhanobut.logger.AndroidLogAdapter;
10 | import com.orhanobut.logger.Logger;
11 | import com.tencent.mmkv.MMKV;
12 |
13 | /**
14 | * 应用模块:
15 | *
16 | * 类描述: 通用库 & 基础库 自身初始化操作
17 | *
18 | *
19 | * @author darryrzhoong
20 | * @since 2020-02-25
21 | */
22 | public class CommonModuleInit implements IModuleInit
23 | {
24 | @Override
25 | public boolean onInitAhead(BaseApplication application)
26 | {
27 | // 初始化日志
28 | Logger.addLogAdapter(new AndroidLogAdapter()
29 | {
30 | @Override
31 | public boolean isLoggable(int priority, @Nullable String tag)
32 | {
33 | return application.issDebug();
34 | }
35 | });
36 | if (application.issDebug())
37 | {
38 | ARouter.openLog(); // 开启日志
39 | ARouter.openDebug(); // 使用InstantRun的时候,需要打开该开关,上线之后关闭,否则有安全风险
40 | }
41 | ARouter.init(application);
42 | MMKV.initialize(application);
43 | Logger.i("基础层初始化完毕 -- onInitAhead");
44 |
45 | return false;
46 | }
47 |
48 | @Override
49 | public boolean onInitLow(BaseApplication application)
50 | {
51 | return false;
52 | }
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/library-common/src/main/java/com/drz/common/IModuleInit.java:
--------------------------------------------------------------------------------
1 | package com.drz.common;
2 |
3 | import com.drz.base.base.BaseApplication;
4 |
5 | /**
6 | * 应用模块: base
7 | *
8 | * 类描述: 动态配置组件Application,有需要初始化的组件实现该接口,统一在宿主app 的Application进行初始化
9 | *
10 | *
11 | * @author darryrzhoong
12 | * @since 2020-02-25
13 | */
14 | public interface IModuleInit
15 | {
16 | /** 需要优先初始化的 */
17 | boolean onInitAhead(BaseApplication application);
18 |
19 | /** 可以后初始化的 */
20 | boolean onInitLow(BaseApplication application);
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/library-common/src/main/java/com/drz/common/config/ModuleLifecycleReflexs.java:
--------------------------------------------------------------------------------
1 | package com.drz.common.config;
2 |
3 | /**
4 | * 应用模块: common
5 | *
6 | * 类描述: 组件生命周期初始化类的类目管理者,在这里注册需要初始化的组件,通过反射动态调用各个组件的初始化方法
7 | *
8 | *
9 | * @author darryrzhoong
10 | * @since 2020-02-25
11 | */
12 | public class ModuleLifecycleReflexs
13 | {
14 | /** 基础库 */
15 | private static final String BaseInit = "com.drz.common.CommonModuleInit";
16 |
17 | /** main组件库 */
18 | private static final String MainInit =
19 | "com.drz.main.application.MainModuleInit";
20 |
21 | /**用户组件初始化*/
22 | private static final String UserInit = "com.drz.user.UserModuleInit";
23 |
24 | public static String[] initModuleNames = {BaseInit, MainInit,UserInit};
25 | }
26 |
--------------------------------------------------------------------------------
/library-common/src/main/java/com/drz/common/contract/BaseCustomViewModel.java:
--------------------------------------------------------------------------------
1 | package com.drz.common.contract;
2 |
3 | import java.io.Serializable;
4 |
5 | /**
6 | * 应用模块: common
7 | *
8 | * 类描述: 用于各个组件之间公用的 契约类,需要共同遵守相关规定
9 | *
10 | *
11 | * @author darryrzhoong
12 | * @since 2020-01-27
13 | */
14 | public class BaseCustomViewModel implements Serializable
15 | {
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/library-common/src/main/java/com/drz/common/global/GlobalKey.java:
--------------------------------------------------------------------------------
1 | package com.drz.common.global;
2 |
3 | /**
4 | * 应用模块: 全局配置
5 | *
6 | * 类描述: 全局的存储key,单个组件的可以单个组件自行在各自的组件中定义
7 | *
8 | *
9 | * @author darryrzhoong
10 | * @since 2020-02-25
11 | */
12 | public class GlobalKey
13 | {
14 | /** 用户信息 */
15 | public static final String USER_INFO = "user_info";
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/library-common/src/main/java/com/drz/common/router/JsonServiceImpl.java:
--------------------------------------------------------------------------------
1 | package com.drz.common.router;
2 |
3 | import android.content.Context;
4 |
5 | import com.alibaba.android.arouter.facade.annotation.Route;
6 | import com.alibaba.android.arouter.facade.service.SerializationService;
7 | import com.drz.base.utils.GsonUtils;
8 |
9 | import java.lang.reflect.Type;
10 |
11 | /**
12 | * 应用模块:
13 | *
14 | * 类描述: 如果需要传递自定义对象,新建一个类(并非自定义对象类),然后实现
15 | * SerializationService,并使用@Route注解标注(方便用户自行选择序列化方式)
16 | *
17 | *
18 | * @author darryrzhoong
19 | * @since 2020-02-27
20 | */
21 | @Route(path = "/video/json")
22 | public class JsonServiceImpl implements SerializationService
23 | {
24 |
25 | @Override
26 | public T json2Object(String input, Class clazz) {
27 | return GsonUtils.fromLocalJson(input,clazz);
28 | }
29 |
30 | @Override
31 | public String object2Json(Object instance) {
32 | return GsonUtils.toJson(instance);
33 | }
34 |
35 | @Override
36 | public T parseObject(String input, Type clazz) {
37 | return GsonUtils.fromLocalJson(input,clazz);
38 | }
39 |
40 | @Override
41 | public void init(Context context) {
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/library-common/src/main/java/com/drz/common/router/RouterActivityPath.java:
--------------------------------------------------------------------------------
1 | package com.drz.common.router;
2 |
3 | import com.drz.common.services.config.ServicesConfig;
4 |
5 | /**
6 | * 应用模块: 组件化路由
7 | *
8 | * 类描述: 用于在组件化开发中,利用ARouter 进行Activity跳转的统一路径注册, 注册时请写好注释、标注界面功能业务
9 | *
10 | *
11 | * @author darryrzhoong
12 | * @since 2020-02-25
13 | */
14 | public class RouterActivityPath
15 | {
16 | /**
17 | * main组件
18 | */
19 | public static class Main
20 | {
21 | private static final String MAIN = "/main";
22 |
23 | /** 主页面 */
24 | public static final String PAGER_MAIN = MAIN + "/Main";
25 | }
26 |
27 | /**
28 | * 视频播放(video)组件
29 | */
30 | public static class Video
31 | {
32 | private static final String VIDEO = "/video";
33 |
34 | /* 视频播放界面 */
35 | public static final String PAGER_VIDEO = VIDEO + "/Video";
36 |
37 | }
38 |
39 | public static class User
40 | {
41 | private static final String USER = "/user";
42 |
43 | /** 登录界面 */
44 | public static final String PAGER_LOGIN = USER + "/Login";
45 |
46 | /** 关注页面 */
47 | public static final String PAGER_ATTENTION = USER + "/attention";
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/library-common/src/main/java/com/drz/common/router/RouterFragmentPath.java:
--------------------------------------------------------------------------------
1 | package com.drz.common.router;
2 |
3 | /**
4 | * 应用模块: 组件化路由
5 | *
6 | * 类描述: 用于组件化开发中,ARouter Fragment路径统一注册, 注册的路径请写好注释、标注业务功能
7 | *
8 | *
9 | * @author darryrzhoong
10 | * @since 2020-02-25
11 | */
12 | public class RouterFragmentPath
13 | {
14 |
15 | /** 首页组件 */
16 | public static class Home
17 | {
18 | private static final String HOME = "/home";
19 |
20 | /** 首页 */
21 | public static final String PAGER_HOME = HOME + "/Home";
22 |
23 | }
24 |
25 | /** 社区组件 */
26 | public static class Community
27 | {
28 | private static final String COMMUNITY = "/community";
29 |
30 | /** 社区页 */
31 | public static final String PAGER_COMMUNITY = COMMUNITY + "/Community";
32 | }
33 |
34 | /** 更多组件 */
35 | public static class More
36 | {
37 | private static final String MORE = "/more";
38 |
39 | /** 更多页面 */
40 | public static final String PAGER_MORE = MORE + "/More";
41 | }
42 |
43 | public static class User
44 | {
45 | private static final String USER = "/user";
46 |
47 | /** 个人中心 */
48 | public static final String PAGER_USER = USER + "/User";
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/library-common/src/main/java/com/drz/common/services/IAppInfoService.java:
--------------------------------------------------------------------------------
1 | package com.drz.common.services;
2 |
3 | import com.alibaba.android.arouter.facade.template.IProvider;
4 |
5 | /**
6 | * 应用模块: services
7 | *
8 | * 类描述: app相关信息
9 | *
10 | *
11 | * @author darryrzhoong
12 | * @since 2020-01-27
13 | */
14 | public interface IAppInfoService extends IProvider
15 | {
16 | String APP_INFO_SERVICE_NAME = "app_info_service";
17 |
18 | String getApplicationName();
19 |
20 | String getApplicationVersionName();
21 |
22 | String getApplicationVersionCode();
23 |
24 | boolean getApplicationDebug();
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/library-common/src/main/java/com/drz/common/services/ILoginService.java:
--------------------------------------------------------------------------------
1 | package com.drz.common.services;
2 |
3 | import com.alibaba.android.arouter.facade.template.IProvider;
4 | import com.drz.common.contract.UserInfo;
5 |
6 | /**
7 | * 应用模块:
8 | *
9 | * 类描述: app登陆相关信息
10 | *
11 | *
12 | * @author darryrzhoong
13 | * @since 2020-01-27
14 | */
15 | public interface ILoginService extends IProvider {
16 |
17 | String LOGIN_SERVICE_NAME = "login_service";
18 |
19 | /**
20 | * 保存登录状态
21 | *
22 | * @param status 登录状态
23 | * @return 返回当前登录状态
24 | */
25 | boolean saveStatus(boolean status);
26 |
27 | /**
28 | * 是否登录
29 | * @return 是否登录
30 | * */
31 | boolean isLogin();
32 |
33 | /**
34 | * 获取Token
35 | * @return token
36 | * */
37 | String getToken();
38 |
39 | /**
40 | * 获取uuid
41 | * @return uuid
42 | * */
43 | String getUUID();
44 |
45 | /**
46 | * 刷新用户信息
47 | * */
48 | void refreshUserDetailInfo();
49 |
50 | /**
51 | * 登录
52 | * */
53 | void login();
54 |
55 | /**
56 | * 是否以管理员身份登录
57 | * */
58 | void login(boolean isMainAccountLogin);
59 |
60 | /**
61 | * 退出登录
62 | * */
63 | void logout();
64 |
65 | /**
66 | * 获取用户信息
67 | * @return 用户信息
68 | * */
69 | UserInfo getUserInfo();
70 |
71 | /**
72 | * 取消登录
73 | * */
74 | void onLoginCancel();
75 |
76 | /**
77 | * token过期处理
78 | * */
79 | void onTokenExpire();
80 |
81 | }
82 |
--------------------------------------------------------------------------------
/library-common/src/main/java/com/drz/common/services/ISettingService.java:
--------------------------------------------------------------------------------
1 | package com.drz.common.services;
2 |
3 | import com.alibaba.android.arouter.facade.template.IProvider;
4 |
5 | /**
6 | * 应用模块:
7 | *
8 | * 类描述: 与app设置相关
9 | *
10 | *
11 | * @author darryrzhoong
12 | * @since 2020-01-27
13 | */
14 | public interface ISettingService extends IProvider {
15 | String SETTINGS_SERVICE_NAME = "settings_service";
16 |
17 | /**
18 | * 语言
19 | **/
20 | public static final int CODE_LANGUAGE = 1;
21 |
22 | /**
23 | * 主题
24 | */
25 | public static final int CODE_THEME = 2;
26 |
27 | /**
28 | * 字体
29 | */
30 | public static final int CODE_FONT_SCHEME = 3;
31 |
32 | /***
33 | * 获取主题
34 | * @return 0:暗色 1.亮色 2.纯黑
35 | */
36 | public int getThemeValue();
37 |
38 | public void setThemeValue(String theme);
39 |
40 |
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/library-common/src/main/java/com/drz/common/services/config/ServicesConfig.java:
--------------------------------------------------------------------------------
1 | package com.drz.common.services.config;
2 |
3 | /**
4 | * 应用模块:
5 | *
6 | * 类描述: 各个组件需要暴露给外部的service名称 配置
7 | *
8 | *
9 | * @author darryrzhoong
10 | * @since 2020-02-29
11 | */
12 | public class ServicesConfig
13 | {
14 | private static final String SERVICE = "/service";
15 |
16 | /** 用户模块 */
17 | public static class User
18 | {
19 | /** 用户登录状态 */
20 | public static final String LONGING_SERVICE = SERVICE + "/login";
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/library-common/src/main/res/drawable/common_action_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/library-common/src/main/res/drawable/common_action_right.png
--------------------------------------------------------------------------------
/library-common/src/main/res/drawable/common_collection.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/library-common/src/main/res/drawable/common_collection.png
--------------------------------------------------------------------------------
/library-common/src/main/res/drawable/common_share.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/library-common/src/main/res/drawable/common_share.png
--------------------------------------------------------------------------------
/library-common/src/main/res/drawable/common_title_right_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/library-common/src/main/res/drawable/common_title_right_icon.png
--------------------------------------------------------------------------------
/library-common/src/main/res/drawable/common_tools_iv_bg.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/library-common/src/main/res/drawable/common_tools_iv_bg.webp
--------------------------------------------------------------------------------
/library-common/src/main/res/drawable/common_tools_iv_bg2.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/library-common/src/main/res/drawable/common_tools_iv_bg2.webp
--------------------------------------------------------------------------------
/library-common/src/main/res/values/common_colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #9d9f9f
4 | #fafafa
5 | #888888
6 | #5790da
7 | #656565
8 | #FFFFFF
9 | #363636
10 |
--------------------------------------------------------------------------------
/library-common/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | library-commen
3 |
4 |
--------------------------------------------------------------------------------
/library-common/src/test/java/com/drz/common/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.drz.common;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/library-network/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/library-network/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:\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 |
--------------------------------------------------------------------------------
/library-network/src/androidTest/java/com/zhouyou/http/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.zhouyou.http;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.assertEquals;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.zhouyou.http.test", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/library-network/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/library-network/src/main/java/com/zhouyou/http/body/ProgressResponseCallBack.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 zhouyou(478319399@qq.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.zhouyou.http.body;
18 |
19 | /**
20 | *
描述:上传进度回调接口
21 | * 作者: zhouyou
22 | * 日期: 2017/5/10 16:34
23 | * 版本: v1.0
24 | */
25 | public interface ProgressResponseCallBack {
26 | /**
27 | * 回调进度
28 | *
29 | * @param bytesWritten 当前读取响应体字节长度
30 | * @param contentLength 总长度
31 | * @param done 是否读取完成
32 | */
33 | void onResponseProgress(long bytesWritten, long contentLength, boolean done);
34 | }
35 |
--------------------------------------------------------------------------------
/library-network/src/main/java/com/zhouyou/http/cache/stategy/OnlyCacheStrategy.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 zhouyou(478319399@qq.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.zhouyou.http.cache.stategy;
18 |
19 |
20 | import com.zhouyou.http.cache.RxCache;
21 | import com.zhouyou.http.cache.model.CacheResult;
22 |
23 | import java.lang.reflect.Type;
24 |
25 | import io.reactivex.Observable;
26 |
27 | /**
28 | * 描述:只读缓存
29 | *<-------此类加载用的是反射 所以类名是灰色的 没有直接引用 不要误删---------------->
30 | * 作者: zhouyou
31 | * 日期: 2016/12/24 10:35
32 | * 版本: v2.0
33 | */
34 | public final class OnlyCacheStrategy extends BaseStrategy{
35 | @Override
36 | public Observable> execute(RxCache rxCache, String key, long time, Observable source, Type type) {
37 | return loadCache(rxCache,type,key,time,false);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/library-network/src/main/java/com/zhouyou/http/cache/stategy/OnlyRemoteStrategy.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 zhouyou(478319399@qq.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.zhouyou.http.cache.stategy;
18 |
19 |
20 | import com.zhouyou.http.cache.RxCache;
21 | import com.zhouyou.http.cache.model.CacheResult;
22 |
23 | import java.lang.reflect.Type;
24 |
25 | import io.reactivex.Observable;
26 |
27 | /**
28 | * 描述:只请求网络
29 | *<-------此类加载用的是反射 所以类名是灰色的 没有直接引用 不要误删---------------->
30 | * 作者: zhouyou
31 | * 日期: 2016/12/24 10:35
32 | * 版本: v2.0
33 | */
34 | public final class OnlyRemoteStrategy extends BaseStrategy{
35 | @Override
36 | public Observable> execute(RxCache rxCache, String key, long time, Observable source, Type type) {
37 | return loadRemote(rxCache,key, source,false);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/library-network/src/main/java/com/zhouyou/http/callback/CallBack.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 zhouyou(478319399@qq.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.zhouyou.http.callback;
18 |
19 |
20 | import com.zhouyou.http.exception.ApiException;
21 | import com.zhouyou.http.utils.Utils;
22 |
23 | import java.lang.reflect.Type;
24 |
25 | /**
26 | * 描述:网络请求回调
27 | * 作者: zhouyou
28 | * 日期: 2016/12/28 16:54
29 | * 版本: v2.0
30 | */
31 | public abstract class CallBack implements IType {
32 | public abstract void onStart();
33 |
34 | public abstract void onCompleted();
35 |
36 | public abstract void onError(ApiException e);
37 |
38 | public abstract void onSuccess(T t);
39 |
40 | @Override
41 | public Type getType() {//获取需要解析的泛型T类型
42 | return Utils.findNeedClass(getClass());
43 | }
44 |
45 | public Type getRawType() {//获取需要解析的泛型T raw类型
46 | return Utils.findRawType(getClass());
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/library-network/src/main/java/com/zhouyou/http/callback/DownloadProgressCallBack.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 zhouyou(478319399@qq.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.zhouyou.http.callback;
18 |
19 | /**
20 | * 描述:下载进度回调(主线程,可以直接操作UI)
21 | * 作者: zhouyou
22 | * 日期: 2017/4/28 16:28
23 | * 版本: v1.0
24 | */
25 | public abstract class DownloadProgressCallBack extends CallBack {
26 | public DownloadProgressCallBack() {
27 | }
28 |
29 | @Override
30 | public void onSuccess(T response) {
31 |
32 | }
33 |
34 | public abstract void update(long bytesRead, long contentLength, boolean done);
35 |
36 | public abstract void onComplete(String path);
37 |
38 | @Override
39 | public void onCompleted() {
40 |
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/library-network/src/main/java/com/zhouyou/http/callback/IType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 zhouyou(478319399@qq.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.zhouyou.http.callback;
18 |
19 | import java.lang.reflect.Type;
20 |
21 | /**
22 | * 描述:获取类型接口
23 | * 作者: zhouyou
24 | * 日期: 2017/5/31 14:46
25 | * 版本: v1.0
26 | */
27 | public interface IType {
28 | Type getType();
29 | }
30 |
--------------------------------------------------------------------------------
/library-network/src/main/java/com/zhouyou/http/callback/SimpleCallBack.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 zhouyou(478319399@qq.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.zhouyou.http.callback;
18 |
19 | /**
20 | * 描述:简单的回调,默认可以使用该回调,不用关注其他回调方法
21 | * 使用该回调默认只需要处理onError,onSuccess两个方法既成功失败
22 | * 作者: zhouyou
23 | * 日期: 2016/12/29 10:06
24 | * 版本: v2.0
25 | */
26 | public abstract class SimpleCallBack extends CallBack {
27 |
28 | @Override
29 | public void onStart() {
30 | }
31 |
32 | @Override
33 | public void onCompleted() {
34 |
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/library-network/src/main/java/com/zhouyou/http/exception/ServerException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 zhouyou(478319399@qq.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.zhouyou.http.exception;
18 |
19 | /**
20 | * 描述:处理服务器异常
21 | * 作者: zhouyou
22 | * 日期: 2016/9/15 16:51
23 | * 版本: v1.0
24 | */
25 | public class ServerException extends RuntimeException {
26 | private int errCode;
27 | private String message;
28 |
29 | public ServerException(int errCode, String msg) {
30 | super(msg);
31 | this.errCode = errCode;
32 | this.message = msg;
33 | }
34 |
35 | public int getErrCode() {
36 | return errCode;
37 | }
38 |
39 | @Override
40 | public String getMessage() {
41 | return message;
42 | }
43 | }
--------------------------------------------------------------------------------
/library-network/src/main/java/com/zhouyou/http/func/CacheResultFunc.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 zhouyou(478319399@qq.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.zhouyou.http.func;
18 |
19 |
20 | import com.zhouyou.http.cache.model.CacheResult;
21 |
22 | import io.reactivex.annotations.NonNull;
23 | import io.reactivex.functions.Function;
24 |
25 | /**
26 | * 描述:缓存结果转换
27 | * 作者: zhouyou
28 | * 日期: 2017/4/21 10:53
29 | * 版本: v1.0
30 | */
31 | public class CacheResultFunc implements Function, T> {
32 | @Override
33 | public T apply(@NonNull CacheResult tCacheResult) throws Exception {
34 | return tCacheResult.data;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/library-network/src/main/java/com/zhouyou/http/func/HttpResponseFunc.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 zhouyou(478319399@qq.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.zhouyou.http.func;
18 |
19 |
20 | import com.zhouyou.http.exception.ApiException;
21 |
22 | import io.reactivex.Observable;
23 | import io.reactivex.annotations.NonNull;
24 | import io.reactivex.functions.Function;
25 |
26 | /**
27 | * 描述:异常转换处理
28 | * 作者: zhouyou
29 | * 日期: 2017/5/15 16:55
30 | * 版本: v1.0
31 | */
32 | public class HttpResponseFunc implements Function> {
33 | @Override
34 | public Observable apply(@NonNull Throwable throwable) throws Exception {
35 | return Observable.error(ApiException.handleException(throwable));
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/library-network/src/main/java/com/zhouyou/http/model/Optional.java:
--------------------------------------------------------------------------------
1 | package com.zhouyou.http.model;
2 |
3 | import io.reactivex.Observable;
4 |
5 | /**
6 | * 描述:为了使Rxjava2 onNext 返回null,使用了此包装类,进行过渡
7 | * 作者: zhouyou
8 | * 日期: 2018/7/6 14:33
9 | * 版本: v1.0
10 | */
11 | public class Optional {
12 | Observable obs;
13 | public Optional(Observable obs) {
14 | this.obs = obs;
15 | }
16 | public static Optional of(T value) {
17 | if (value == null) {
18 | throw new NullPointerException();
19 | } else {
20 | return new Optional(Observable.just(value));
21 | }
22 | }
23 |
24 | public static Optional ofNullable(T value) {
25 | if (value == null) {
26 | return new Optional(Observable.empty());
27 | } else {
28 | return new Optional(Observable.just(value));
29 | }
30 | }
31 |
32 | public T get() {
33 | return obs.blockingSingle();
34 | }
35 |
36 | public T orElse(T defaultValue) {
37 | return obs.defaultIfEmpty(defaultValue).blockingSingle();
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/library-network/src/main/java/com/zhouyou/http/subsciber/IProgressDialog.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 zhouyou(478319399@qq.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.zhouyou.http.subsciber;
18 |
19 | import android.app.Dialog;
20 |
21 | /**
22 | * 描述:自定义对话框的dialog
23 | * 作者: zhouyou
24 | * 日期: 2017/4/19 14:37
25 | * 版本: v1.0
26 | */
27 | public interface IProgressDialog {
28 | Dialog getDialog();
29 | }
30 |
--------------------------------------------------------------------------------
/library-network/src/main/java/com/zhouyou/http/subsciber/ProgressCancelListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 zhouyou(478319399@qq.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.zhouyou.http.subsciber;
18 |
19 | /**
20 | * 描述:进度框取消监听
21 | * 作者: zhouyou
22 | * 日期: 2017/5/15 17:09
23 | * 版本: v1.0
24 | */
25 | public interface ProgressCancelListener {
26 | void onCancelProgress();
27 | }
28 |
--------------------------------------------------------------------------------
/library-network/src/main/java/com/zhouyou/http/transformer/HandleErrTransformer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 zhouyou(478319399@qq.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.zhouyou.http.transformer;
18 |
19 |
20 | import com.zhouyou.http.func.HttpResponseFunc;
21 |
22 | import io.reactivex.Observable;
23 | import io.reactivex.ObservableSource;
24 | import io.reactivex.ObservableTransformer;
25 | import io.reactivex.annotations.NonNull;
26 |
27 | /**
28 | * 描述:错误转换Transformer
29 | * 作者: zhouyou
30 | * 日期: 2017/5/15 17:09
31 | * 版本: v1.0
32 | */
33 | public class HandleErrTransformer implements ObservableTransformer {
34 | @Override
35 | public ObservableSource apply(@NonNull Observable upstream) {
36 | return upstream.onErrorResumeNext(new HttpResponseFunc());
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/library-network/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | rxeasyhttp
3 |
4 |
--------------------------------------------------------------------------------
/library-network/src/test/java/com/zhouyou/http/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.zhouyou.http;
2 |
3 |
4 | import org.junit.Test;
5 |
6 | import static org.junit.Assert.assertEquals;
7 |
8 | /**
9 | * Example local unit test, which will execute on the development machine (host).
10 | *
11 | * @see Testing documentation
12 | */
13 | public class ExampleUnitTest {
14 | @Test
15 | public void addition_isCorrect() throws Exception {
16 | assertEquals(4, 2 + 2);
17 | }
18 | }
--------------------------------------------------------------------------------
/library-servicemanager/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | local.properties
3 | /*.iml
--------------------------------------------------------------------------------
/library-servicemanager/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion rootProject.ext.android.compileSdkVersion
5 | buildToolsVersion rootProject.ext.android.buildToolsVersion
6 |
7 | defaultConfig {
8 | minSdkVersion rootProject.ext.android.minSdkVersion
9 | targetSdkVersion rootProject.ext.android.targetSdkVersion
10 | versionCode 1
11 | versionName "1.0"
12 | consumerProguardFiles 'consumer-rules.pro'
13 | }
14 |
15 | buildTypes {
16 | release {
17 | minifyEnabled false
18 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
19 | }
20 | }
21 | compileOptions {
22 | sourceCompatibility = 1.8
23 | targetCompatibility = 1.8
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/library-servicemanager/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/cailiming/Library/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 |
--------------------------------------------------------------------------------
/library-servicemanager/project.properties:
--------------------------------------------------------------------------------
1 | project.name=Android-ServiceManager
2 | project.groupId=com.limpoxe.support
3 | project.artifactId=android-servicemanager
4 | project.packaging=aar
5 | project.siteUrl=https://github.com/limpoxe/Android-ServiceManager
6 | project.gitUrl=https://github.com/limpoxe/Android-ServiceManager.git
7 |
8 | #developer
9 | developer.id=limpoxe
10 | developer.name=limpoxe
11 | developer.email=fixerror@163.com
12 |
13 | #javadoc
14 | javadoc.name=Android-ServiceManager
--------------------------------------------------------------------------------
/library-servicemanager/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/library-servicemanager/src/main/java/com/limpoxe/support/servicemanager/local/ServiceFetcher.java:
--------------------------------------------------------------------------------
1 | package com.limpoxe.support.servicemanager.local;
2 |
3 | /**
4 | * Created by cailiming on 16/1/1.
5 | */
6 | public abstract class ServiceFetcher {
7 | int mServiceId;
8 | String mGroupId;
9 | private Object mCachedInstance;
10 |
11 | public final Object getService() {
12 | synchronized (ServiceFetcher.this) {
13 | Object service = mCachedInstance;
14 | if (service != null) {
15 | return service;
16 | }
17 | return mCachedInstance = createService(mServiceId);
18 | }
19 | }
20 |
21 | public abstract Object createService(int serviceId);
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/library-video/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/library-video/consumer-rules.pro:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/library-video/consumer-rules.pro
--------------------------------------------------------------------------------
/library-video/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/library-video/src/androidTest/java/com/drz/video/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.drz.video;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.platform.app.InstrumentationRegistry;
6 | import androidx.test.ext.junit.runners.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24 |
25 | assertEquals("com.drz.video.test", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/library-video/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
--------------------------------------------------------------------------------
/library-video/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Library-video
3 |
4 |
--------------------------------------------------------------------------------
/library-video/src/test/java/com/drz/video/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.drz.video;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/module-community/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/module-community/build.gradle:
--------------------------------------------------------------------------------
1 | apply from: "../module.build.gradle"
2 | android {
3 | defaultConfig {
4 | if (isBuildModule.toBoolean()){
5 | applicationId "com.drz.community"
6 | }
7 | }
8 | //统一资源前缀,规范资源引用
9 | resourcePrefix "community_"
10 | }
11 |
12 | dependencies {
13 | testImplementation rootProject.ext.androidx["junit"]
14 | androidTestImplementation rootProject.ext.androidx["androidx.test.ext-junit"]
15 | androidTestImplementation rootProject.ext.androidx["androidx.test.espresso:espresso-core"]
16 | //组件中依赖阿里路由编译框架
17 | annotationProcessor rootProject.ext.dependencies["arouter-compiler"]
18 | annotationProcessor rootProject.ext.dependencies["glide-compiler"]
19 | //组件依赖基础库
20 | api project(':library-common')
21 | api project(':library-video')
22 | }
23 |
--------------------------------------------------------------------------------
/module-community/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 |
--------------------------------------------------------------------------------
/module-community/src/androidTest/java/com/drz/community/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.drz.community;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.platform.app.InstrumentationRegistry;
6 | import androidx.test.ext.junit.runners.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24 |
25 | assertEquals("com.drz.community", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/module-community/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
--------------------------------------------------------------------------------
/module-community/src/main/alone/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/module-community/src/main/java/com/drz/community/attention/IAttentionView.java:
--------------------------------------------------------------------------------
1 | package com.drz.community.attention;
2 |
3 | import com.drz.base.activity.IBasePagingView;
4 | import com.drz.common.contract.BaseCustomViewModel;
5 |
6 | import java.util.ArrayList;
7 |
8 |
9 | /**
10 | * 应用模块:
11 | *
12 | * 类描述:
13 | *
14 | *
15 | * @author darryrzhoong
16 | * @since 2020-02-19
17 | */
18 | public interface IAttentionView extends IBasePagingView {
19 |
20 | /**
21 | * 数据加载完成
22 | *
23 | * @param viewModels data
24 | */
25 | void onDataLoadFinish(ArrayList viewModels,
26 | boolean isFirstPage);
27 | }
28 |
--------------------------------------------------------------------------------
/module-community/src/main/java/com/drz/community/attention/bean/AttentionCardViewModel.java:
--------------------------------------------------------------------------------
1 | package com.drz.community.attention.bean;
2 |
3 |
4 | import com.drz.common.contract.BaseCustomViewModel;
5 |
6 | /**
7 | * 应用模块:
8 | *
9 | * 类描述:
10 | *
11 | *
12 | * @author darryrzhoong
13 | * @since 2020-02-19
14 | */
15 | public class AttentionCardViewModel extends BaseCustomViewModel
16 | {
17 | public String avatarUrl;
18 |
19 | public String issuerName;
20 |
21 | public long releaseTime;
22 |
23 | public String title;
24 |
25 | public String description;
26 |
27 | public String coverUrl;
28 |
29 | public String blurredUrl;
30 |
31 | public String playUrl;
32 |
33 | public String category;
34 |
35 | public String authorDescription;
36 |
37 | public int videoId ;
38 |
39 | // 点赞
40 | public int collectionCount;
41 |
42 | // 分享
43 | public int shareCount;
44 |
45 | // 评论
46 | public int replyCount;
47 |
48 | // 收藏
49 | public int realCollectionCount;
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/module-community/src/main/java/com/drz/community/recommend/IRecommendView.java:
--------------------------------------------------------------------------------
1 | package com.drz.community.recommend;
2 |
3 | import java.util.ArrayList;
4 |
5 | import com.drz.base.activity.IBasePagingView;
6 | import com.drz.common.contract.BaseCustomViewModel;
7 |
8 | /**
9 | * 应用模块:
10 | *
11 | * 类描述:
12 | *
13 | *
14 | * @author darryrzhoong
15 | * @since 2020-02-16
16 | */
17 | public interface IRecommendView extends IBasePagingView {
18 |
19 | /**
20 | * 数据加载完成
21 | *
22 | * @param viewModels data
23 | */
24 | void onDataLoadFinish(ArrayList viewModels,
25 | boolean isFirstPage);
26 | }
27 |
--------------------------------------------------------------------------------
/module-community/src/main/java/com/drz/community/recommend/adapter/SquareCardAdapter.java:
--------------------------------------------------------------------------------
1 | package com.drz.community.recommend.adapter;
2 |
3 | import org.jetbrains.annotations.NotNull;
4 | import org.jetbrains.annotations.Nullable;
5 |
6 | import com.chad.library.adapter.base.BaseQuickAdapter;
7 | import com.chad.library.adapter.base.viewholder.BaseViewHolder;
8 | import com.drz.community.databinding.CommunityItemSquareItemCardViewBinding;
9 | import com.drz.community.recommend.bean.SquareContentCard;
10 | import androidx.databinding.DataBindingUtil;
11 |
12 | /**
13 | * 应用模块:
14 | *
15 | * 类描述:
16 | *
17 | *
18 | * @author darryrzhoong
19 | * @since 2020-02-17
20 | */
21 | public class SquareCardAdapter extends BaseQuickAdapter {
22 | public SquareCardAdapter(int layoutResId) {
23 | super(layoutResId);
24 | }
25 |
26 | @Override
27 | protected void onItemViewHolderCreated(@NotNull BaseViewHolder viewHolder, int viewType) {
28 | DataBindingUtil.bind(viewHolder.itemView);
29 | }
30 | @Override
31 | protected void convert(@NotNull BaseViewHolder baseViewHolder, @Nullable SquareContentCard squareContentCard) {
32 | if (squareContentCard == null){
33 | return;
34 | }
35 | CommunityItemSquareItemCardViewBinding binding = baseViewHolder.getBinding();
36 | if (binding != null){
37 | binding.setViewModel(squareContentCard);
38 | binding.executePendingBindings();
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/module-community/src/main/java/com/drz/community/recommend/adapter/provider/IRecommendItemType.java:
--------------------------------------------------------------------------------
1 | package com.drz.community.recommend.adapter.provider;
2 |
3 | /**
4 | * 应用模块:
5 | *
6 | * 类描述: item类型
7 | *
8 | *
9 | * @author darryrzhoong
10 | * @since 2020-02-17
11 | */
12 | public interface IRecommendItemType {
13 | /**
14 | * 话题卡片
15 | * */
16 | int SQUARE_CARD_VIEW = 1;
17 |
18 | /**
19 | * 社区推荐
20 | * */
21 | int COMMUNITY_CARD_VIEW = 2;
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/module-community/src/main/java/com/drz/community/recommend/bean/viewmodel/CloumnsCardViewModel.java:
--------------------------------------------------------------------------------
1 | package com.drz.community.recommend.bean.viewmodel;
2 |
3 | import com.drz.common.contract.BaseCustomViewModel;
4 |
5 | /**
6 | * 应用模块:
7 | *
8 | * 类描述:
9 | *
10 | *
11 | * @author darryrzhoong
12 | * @since 2020-02-17
13 | */
14 | public class CloumnsCardViewModel extends BaseCustomViewModel {
15 | public String coverUrl;
16 | public String description;
17 | public String avatarUrl;
18 | public String nickName;
19 | public int collectionCount;
20 | public int imgWidth;
21 | public int imgHeight;
22 | }
23 |
--------------------------------------------------------------------------------
/module-community/src/main/res/drawable/community_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-community/src/main/res/drawable/community_search.png
--------------------------------------------------------------------------------
/module-community/src/main/res/layout/community_fragment_attention.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
16 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/module-community/src/main/res/layout/community_fragment_recommend.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
11 |
15 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/module-community/src/main/res/layout/community_item_square_card_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
12 |
13 |
21 |
22 |
--------------------------------------------------------------------------------
/module-community/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/module-community/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/module-community/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-community/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/module-community/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-community/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/module-community/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-community/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/module-community/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-community/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/module-community/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-community/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/module-community/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-community/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/module-community/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-community/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/module-community/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-community/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/module-community/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-community/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/module-community/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-community/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/module-community/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 |
7 |
--------------------------------------------------------------------------------
/module-community/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | module-community
3 |
4 |
--------------------------------------------------------------------------------
/module-community/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/module-community/src/test/java/com/drz/community/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.drz.community;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/module-home/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/module-home/build.gradle:
--------------------------------------------------------------------------------
1 | apply from: "../module.build.gradle"
2 | android {
3 | defaultConfig {
4 | if (isBuildModule.toBoolean()){
5 | applicationId "com.drz.home"
6 | }
7 | }
8 | //统一资源前缀,规范资源引用
9 | resourcePrefix "home_"
10 | }
11 |
12 | dependencies {
13 | testImplementation rootProject.ext.androidx["junit"]
14 | androidTestImplementation rootProject.ext.androidx["androidx.test.ext-junit"]
15 | androidTestImplementation rootProject.ext.androidx["androidx.test.espresso:espresso-core"]
16 | //组件中依赖阿里路由编译框架
17 | annotationProcessor rootProject.ext.dependencies["arouter-compiler"]
18 | annotationProcessor rootProject.ext.dependencies["glide-compiler"]
19 | //组件依赖基础库
20 | api project(':library-common')
21 | }
22 |
--------------------------------------------------------------------------------
/module-home/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 |
--------------------------------------------------------------------------------
/module-home/src/androidTest/java/com/drz/home/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.drz.home;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.platform.app.InstrumentationRegistry;
6 | import androidx.test.ext.junit.runners.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24 |
25 | assertEquals("com.mvvm.module_home", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/module-home/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
--------------------------------------------------------------------------------
/module-home/src/main/alone/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/module-home/src/main/java/com/drz/home/daily/IDailyView.java:
--------------------------------------------------------------------------------
1 | package com.drz.home.daily;
2 |
3 | import com.drz.base.activity.IBasePagingView;
4 | import com.drz.common.contract.BaseCustomViewModel;
5 |
6 | import java.util.ArrayList;
7 |
8 |
9 | /**
10 | * 应用模块: daily
11 | *
12 | * 类描述: UI 更新
13 | *
14 | *
15 | * @author darryrzhoong
16 | * @since 2020-02-14
17 | */
18 | public interface IDailyView extends IBasePagingView {
19 |
20 | /**
21 | * 数据加载完成
22 | *
23 | * @param viewModels data
24 | */
25 | void onDataLoadFinish(ArrayList viewModels,
26 | boolean isFirstPage);
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/module-home/src/main/java/com/drz/home/discover/IDisCoverView.java:
--------------------------------------------------------------------------------
1 | package com.drz.home.discover;
2 |
3 | import com.drz.base.activity.IBaseView;
4 | import com.drz.common.contract.BaseCustomViewModel;
5 |
6 | import java.util.ArrayList;
7 |
8 |
9 | /**
10 | * 应用模块:
11 | *
12 | * 类描述:
13 | *
14 | *
15 | * @author darryrzhoong
16 | * @since 2020-02-15
17 | */
18 | public interface IDisCoverView extends IBaseView
19 | {
20 |
21 | /**
22 | * 数据加载完成
23 | *
24 | * @param viewModels data
25 | */
26 | void onDataLoadFinish(ArrayList viewModels,
27 | boolean isEmpty);
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/module-home/src/main/java/com/drz/home/discover/adapter/provider/IDisCoverItemType.java:
--------------------------------------------------------------------------------
1 | package com.drz.home.discover.adapter.provider;
2 |
3 | /**
4 | * 应用模块:
5 | *
6 | * 类描述: itemType 类型
7 | *
8 | *
9 | * @author darryrzhoong
10 | * @since 2020-02-15
11 | */
12 | public interface IDisCoverItemType
13 | {
14 | /**
15 | * 顶部banner
16 | */
17 | int TOP_BANNER_VIEW = 1;
18 |
19 | /**
20 | * 热门分类
21 | */
22 | int CATEGORY_CARD_VIEW = 2;
23 |
24 | /**
25 | * 专题策划
26 | */
27 | int SUBJECT_CARD_VIEW = 3;
28 |
29 | /**
30 | * 标题栏
31 | */
32 | int TITLE_VIEW = 4;
33 |
34 | /**
35 | * 内容banner
36 | */
37 | int CONTENT_BANNER_VIEW = 5;
38 |
39 | /**
40 | * 本周视频榜单
41 | */
42 | int VIDEO_CARD_VIEW = 6;
43 |
44 | /**
45 | * 推荐主题
46 | */
47 | int THEME_CARD_VIEW = 7;
48 | }
49 |
--------------------------------------------------------------------------------
/module-home/src/main/java/com/drz/home/discover/bean/SquareCard.java:
--------------------------------------------------------------------------------
1 | package com.drz.home.discover.bean;
2 |
3 | import java.io.Serializable;
4 |
5 | /**
6 | * 应用模块:
7 | *
8 | * 类描述:
9 | *
10 | *
11 | * @author darryrzhoong
12 | * @since 2020-02-15
13 | */
14 | public class SquareCard implements Serializable {
15 |
16 | public SquareCard(String title, String image, String actionUrl) {
17 | this.title = title;
18 | this.image = image;
19 | this.actionUrl = actionUrl;
20 | }
21 |
22 | /**
23 | * dataType : SquareCard
24 | * id : 14
25 | * title : #广告
26 | * image : http://img.kaiyanapp.com/57472e13fd2b6c9655c8a600597daf4d.png?imageMogr2/quality/60/format/jpg
27 | * actionUrl : eyepetizer://tag/16/?title=%E5%B9%BF%E5%91%8A
28 | * shade : true
29 | * adTrack : null
30 | * description : null
31 | */
32 |
33 |
34 |
35 | private String title;
36 | private String image;
37 | private String actionUrl;
38 |
39 | public String getTitle() {
40 | return title;
41 | }
42 |
43 | public void setTitle(String title) {
44 | this.title = title;
45 | }
46 |
47 | public String getImage() {
48 | return image;
49 | }
50 |
51 | public void setImage(String image) {
52 | this.image = image;
53 | }
54 |
55 | public String getActionUrl() {
56 | return actionUrl;
57 | }
58 |
59 | public void setActionUrl(String actionUrl) {
60 | this.actionUrl = actionUrl;
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/module-home/src/main/java/com/drz/home/discover/bean/viewmodel/BriefCardViewModel.java:
--------------------------------------------------------------------------------
1 | package com.drz.home.discover.bean.viewmodel;
2 |
3 |
4 | import com.drz.common.contract.BaseCustomViewModel;
5 |
6 | /**
7 | * 应用模块:
8 | *
9 | * 类描述:
10 | *
11 | *
12 | * @author darryrzhoong
13 | * @since 2020-02-15
14 | */
15 | public class BriefCardViewModel extends BaseCustomViewModel
16 | {
17 | public String coverUrl;
18 |
19 | public String title;
20 |
21 | public String description;
22 | }
23 |
--------------------------------------------------------------------------------
/module-home/src/main/java/com/drz/home/discover/bean/viewmodel/CategoryCardViewModel.java:
--------------------------------------------------------------------------------
1 | package com.drz.home.discover.bean.viewmodel;
2 |
3 |
4 | import com.drz.common.contract.BaseCustomViewModel;
5 |
6 | /**
7 | * 应用模块:
8 | *
9 | * 类描述:
10 | *
11 | *
12 | * @author darryrzhoong
13 | * @since 2020-02-15
14 | */
15 | public class CategoryCardViewModel extends BaseCustomViewModel
16 | {
17 | public String title;
18 |
19 | public String actionTitle;
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/module-home/src/main/java/com/drz/home/discover/bean/viewmodel/ContentBannerViewModel.java:
--------------------------------------------------------------------------------
1 | package com.drz.home.discover.bean.viewmodel;
2 |
3 |
4 | import com.drz.common.contract.BaseCustomViewModel;
5 |
6 | /**
7 | * 应用模块:
8 | *
9 | * 类描述:
10 | *
11 | *
12 | * @author darryrzhoong
13 | * @since 2020-02-15
14 | */
15 | public class ContentBannerViewModel extends BaseCustomViewModel
16 | {
17 | public String bannerUrl;
18 | }
19 |
--------------------------------------------------------------------------------
/module-home/src/main/java/com/drz/home/discover/bean/viewmodel/TopBannerViewModel.java:
--------------------------------------------------------------------------------
1 | package com.drz.home.discover.bean.viewmodel;
2 |
3 |
4 | import com.drz.common.contract.BaseCustomViewModel;
5 |
6 | /**
7 | * 应用模块:
8 | *
9 | * 类描述:
10 | *
11 | *
12 | * @author darryrzhoong
13 | * @since 2020-02-15
14 | */
15 | public class TopBannerViewModel extends BaseCustomViewModel
16 | {
17 | public String bannerUrl;
18 | }
19 |
--------------------------------------------------------------------------------
/module-home/src/main/java/com/drz/home/nominate/INominateView.java:
--------------------------------------------------------------------------------
1 | package com.drz.home.nominate;
2 |
3 | import java.util.ArrayList;
4 |
5 | import com.drz.base.activity.IBasePagingView;
6 | import com.drz.common.contract.BaseCustomViewModel;
7 |
8 | /**
9 | * 应用模块: 首页
10 | *
11 | * 类描述: 定制界面 Ui 刷新行为
12 | *
13 | *
14 | * @author darryrzhoong
15 | * @since 2020-02-11
16 | */
17 | public interface INominateView extends IBasePagingView
18 | {
19 |
20 | /**
21 | * 数据加载完成
22 | *
23 | * @param viewModels data
24 | */
25 | void onDataLoadFinish(ArrayList viewModels,
26 | boolean isFirstPage);
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/module-home/src/main/java/com/drz/home/nominate/adapter/BannerAdapter.java:
--------------------------------------------------------------------------------
1 | package com.drz.home.nominate.adapter;
2 |
3 | import java.util.ArrayList;
4 |
5 | import androidx.databinding.BindingAdapter;
6 |
7 | import com.drz.home.nominate.adapter.provider.NetBannerProvider;
8 | import com.zhpan.bannerview.BannerViewPager;
9 | import com.zhpan.bannerview.constants.PageStyle;
10 |
11 | /**
12 | * 应用模块:
13 | *
14 | * 类描述:
15 | *
16 | *
17 | * @author darryrzhoong
18 | * @since 2020-02-13
19 | */
20 | public class BannerAdapter
21 | {
22 | @BindingAdapter("initBannerView")
23 | public static void initBannerView(BannerViewPager bannerViewPager,
24 | ArrayList list)
25 | {
26 | ArrayList list1 = new ArrayList<>();
27 | list1.add(
28 | "http://img.kaiyanapp.com/b5b00c67dfc759a02c8b457e104b3ec6.png?imageMogr2/quality/60/format/jpg");
29 | list1.add(
30 | "http://img.kaiyanapp.com/b5b00c67dfc759a02c8b457e104b3ec6.png?imageMogr2/quality/60/format/jpg");
31 | list1.add(
32 | "http://img.kaiyanapp.com/1eaf8827688ea3b910b7b6b6cb192a5f.png?imageMogr2/quality/60/format/jpg");
33 | list1.add(
34 | "http://img.kaiyanapp.com/1eaf8827688ea3b910b7b6b6cb192a5f.png?imageMogr2/quality/60/format/jpg");
35 |
36 | bannerViewPager.setHolderCreator(NetBannerProvider::new)
37 | .setPageStyle(PageStyle.MULTI_PAGE_OVERLAP)
38 | .create(list1);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/module-home/src/main/java/com/drz/home/nominate/adapter/provider/NetBannerProvider.java:
--------------------------------------------------------------------------------
1 | package com.drz.home.nominate.adapter.provider;
2 |
3 | import com.drz.common.adapter.CommonBindingAdapters;
4 | import com.drz.home.R;
5 | import com.zhpan.bannerview.holder.ViewHolder;
6 |
7 | import android.view.View;
8 | import android.widget.ImageView;
9 |
10 | /**
11 | * 应用模块:
12 | *
13 | * 类描述:
14 | *
15 | *
16 | * @author darryrzhoong
17 | * @since 2020-02-13
18 | */
19 | public class NetBannerProvider implements ViewHolder
20 | {
21 | @Override
22 | public int getLayoutId()
23 | {
24 | return R.layout.home_item_banner_item_view;
25 | }
26 |
27 | @Override
28 | public void onBind(View itemView, String data, int position, int size)
29 | {
30 | ImageView imageView = itemView.findViewById(R.id.banner_bg);
31 | CommonBindingAdapters.loadImage(imageView, data);
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/module-home/src/main/java/com/drz/home/nominate/adapter/provider/NominateItemType.java:
--------------------------------------------------------------------------------
1 | package com.drz.home.nominate.adapter.provider;
2 |
3 | /**
4 | * 应用模块:
5 | *
6 | * 类描述:
7 | *
8 | *
9 | * @author darryrzhoong
10 | * @since 2020-02-14
11 | */
12 | public interface NominateItemType
13 | {
14 | int BANNER_VIEW = 1;
15 |
16 | int TITLE_VIEW = 2;
17 |
18 | int FOLLOW_CARD_VIEW = 3;
19 |
20 | int SINGLE_TITLE_VIEW = 4;
21 |
22 | int VIDEO_CARD_VIEW = 5;
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/module-home/src/main/java/com/drz/home/nominate/bean/NetData.java:
--------------------------------------------------------------------------------
1 | package com.drz.home.nominate.bean;
2 |
3 | /**
4 | * 应用模块:
5 | *
6 | * 类描述:
7 | *
8 | *
9 | * @author darryrzhoong
10 | * @since 2020-02-13
11 | */
12 | public class NetData {
13 | private String imageUrl;
14 |
15 | public NetData(String imageUrl) {
16 | this.imageUrl = imageUrl;
17 | }
18 |
19 | public String getImageUrl() {
20 | return imageUrl;
21 | }
22 |
23 | public void setImageUrl(String imageUrl) {
24 | this.imageUrl = imageUrl;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/module-home/src/main/java/com/drz/home/nominate/bean/viewmodel/BannerCardViewModel.java:
--------------------------------------------------------------------------------
1 | package com.drz.home.nominate.bean.viewmodel;
2 |
3 | import com.drz.common.contract.BaseCustomViewModel;
4 |
5 | import java.util.ArrayList;
6 |
7 |
8 | /**
9 | * 应用模块:
10 | *
11 | * 类描述:
12 | *
13 | *
14 | * @author darryrzhoong
15 | * @since 2020-02-12
16 | */
17 | public class BannerCardViewModel extends BaseCustomViewModel
18 | {
19 | public ArrayList banners;
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/module-home/src/main/java/com/drz/home/nominate/bean/viewmodel/FollowCardViewModel.java:
--------------------------------------------------------------------------------
1 | package com.drz.home.nominate.bean.viewmodel;
2 |
3 |
4 | import com.drz.common.contract.BaseCustomViewModel;
5 |
6 | /**
7 | * 应用模块:
8 | *
9 | * 类描述:
10 | *
11 | *
12 | * @author darryrzhoong
13 | * @since 2020-02-12
14 | */
15 | public class FollowCardViewModel extends BaseCustomViewModel
16 | {
17 |
18 | public String coverUrl;
19 |
20 | public int videoTime;
21 |
22 | public String authorUrl;
23 |
24 | public String description;
25 |
26 | public String title;
27 |
28 | public String video_description;
29 |
30 | public String userDescription;
31 |
32 | public String nickName;
33 |
34 | public String playerUrl;
35 |
36 | public String blurredUrl;
37 |
38 | public int videoId;
39 |
40 | // 点赞
41 | public int collectionCount;
42 |
43 | // 分享
44 | public int shareCount;
45 |
46 |
47 |
48 |
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/module-home/src/main/java/com/drz/home/nominate/bean/viewmodel/SingleTitleViewModel.java:
--------------------------------------------------------------------------------
1 | package com.drz.home.nominate.bean.viewmodel;
2 |
3 |
4 | import com.drz.common.contract.BaseCustomViewModel;
5 |
6 | /**
7 | * 应用模块:
8 | *
9 | * 类描述:
10 | *
11 | *
12 | * @author darryrzhoong
13 | * @since 2020-02-12
14 | */
15 | public class SingleTitleViewModel extends BaseCustomViewModel
16 | {
17 | public String title;
18 | }
19 |
--------------------------------------------------------------------------------
/module-home/src/main/java/com/drz/home/nominate/bean/viewmodel/TitleViewModel.java:
--------------------------------------------------------------------------------
1 | package com.drz.home.nominate.bean.viewmodel;
2 |
3 |
4 | import com.drz.common.contract.BaseCustomViewModel;
5 |
6 | /**
7 | * 应用模块:
8 | *
9 | * 类描述:
10 | *
11 | *
12 | * @author darryrzhoong
13 | * @since 2020-02-12
14 | */
15 | public class TitleViewModel extends BaseCustomViewModel
16 | {
17 | public String title;
18 |
19 | public String actionTitle;
20 | }
21 |
--------------------------------------------------------------------------------
/module-home/src/main/java/com/drz/home/nominate/bean/viewmodel/VideoCardViewModel.java:
--------------------------------------------------------------------------------
1 | package com.drz.home.nominate.bean.viewmodel;
2 |
3 |
4 | import com.drz.common.contract.BaseCustomViewModel;
5 |
6 | /**
7 | * 应用模块:
8 | *
9 | * 类描述:
10 | *
11 | *
12 | * @author darryrzhoong
13 | * @since 2020-02-12
14 | */
15 | public class VideoCardViewModel extends BaseCustomViewModel
16 | {
17 | public String coverUrl;
18 |
19 | public int videoTime;
20 |
21 | public String title;
22 |
23 | public String description;
24 |
25 | public String authorUrl;
26 |
27 | public String video_description;
28 |
29 | public String userDescription;
30 |
31 | public String nickName;
32 |
33 | public String playerUrl;
34 |
35 | public String blurredUrl;
36 |
37 | public int videoId;
38 |
39 | // 点赞
40 | public int collectionCount;
41 |
42 | // 分享
43 | public int shareCount;
44 |
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/module-home/src/main/res/drawable/home_candle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-home/src/main/res/drawable/home_candle.png
--------------------------------------------------------------------------------
/module-home/src/main/res/drawable/home_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-home/src/main/res/drawable/home_search.png
--------------------------------------------------------------------------------
/module-home/src/main/res/drawable/home_shape_border_btn_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/module-home/src/main/res/drawable/home_shape_video_time_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/module-home/src/main/res/layout/home_fragment_daily.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
16 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/module-home/src/main/res/layout/home_fragment_find_more.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
13 |
17 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/module-home/src/main/res/layout/home_fragment_nominate.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
14 |
18 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/module-home/src/main/res/layout/home_item_banner_item_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
--------------------------------------------------------------------------------
/module-home/src/main/res/layout/home_item_banner_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
9 |
10 |
11 |
21 |
--------------------------------------------------------------------------------
/module-home/src/main/res/layout/home_item_content_banner_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
9 |
10 |
11 |
15 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/module-home/src/main/res/layout/home_item_foote_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
--------------------------------------------------------------------------------
/module-home/src/main/res/layout/home_item_top_banner_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
10 |
11 |
12 |
15 |
16 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/module-home/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/module-home/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/module-home/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-home/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/module-home/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-home/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/module-home/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-home/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/module-home/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-home/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/module-home/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-home/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/module-home/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-home/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/module-home/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-home/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/module-home/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-home/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/module-home/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-home/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/module-home/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-home/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/module-home/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 |
7 |
--------------------------------------------------------------------------------
/module-home/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | module-home
3 |
4 |
--------------------------------------------------------------------------------
/module-home/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/module-home/src/test/java/com/drz/home/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.drz.home;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/module-main/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/module-main/build.gradle:
--------------------------------------------------------------------------------
1 | apply from: "../module.build.gradle"
2 | apply plugin: 'kotlin-android'
3 | apply plugin: 'kotlin-android-extensions'
4 |
5 | android {
6 | defaultConfig {
7 | if (isBuildModule.toBoolean()){
8 | applicationId "com.drz.main"
9 | }
10 | }
11 | //统一资源前缀,规范资源引用
12 | resourcePrefix "main_"
13 | }
14 |
15 | dependencies {
16 | testImplementation rootProject.ext.androidx["junit"]
17 | androidTestImplementation rootProject.ext.androidx["androidx.test.ext-junit"]
18 | androidTestImplementation rootProject.ext.androidx["androidx.test.espresso:espresso-core"]
19 | //组件中依赖阿里路由编译框架
20 | annotationProcessor rootProject.ext.dependencies["arouter-compiler"]
21 | annotationProcessor rootProject.ext.dependencies["glide-compiler"]
22 | //组件依赖基础库
23 | api project(':library-common')
24 | api 'me.majiajie:pager-bottom-tab-strip:2.3.0X'
25 | api "androidx.core:core-ktx:+"
26 | api "androidx.lifecycle:lifecycle-viewmodel-ktx:2.1.0"
27 | api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
28 | }
29 | repositories {
30 | mavenCentral()
31 | }
32 |
--------------------------------------------------------------------------------
/module-main/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/module-main/src/androidTest/java/com/drz/main/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.drz.main;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.platform.app.InstrumentationRegistry;
6 | import androidx.test.ext.junit.runners.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24 |
25 | assertEquals("com.drz.main", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/module-main/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/module-main/src/main/alone/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/module-main/src/main/assets/fonts/FZLanTingHeiS-DB1-GB-Regular.TTF:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-main/src/main/assets/fonts/FZLanTingHeiS-DB1-GB-Regular.TTF
--------------------------------------------------------------------------------
/module-main/src/main/assets/fonts/FZLanTingHeiS-L-GB-Regular.TTF:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-main/src/main/assets/fonts/FZLanTingHeiS-L-GB-Regular.TTF
--------------------------------------------------------------------------------
/module-main/src/main/assets/fonts/Lobster-1.4.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-main/src/main/assets/fonts/Lobster-1.4.otf
--------------------------------------------------------------------------------
/module-main/src/main/java/com/drz/main/adapter/MainPageAdapter.java:
--------------------------------------------------------------------------------
1 | package com.drz.main.adapter;
2 |
3 | import androidx.annotation.NonNull;
4 | import androidx.fragment.app.Fragment;
5 | import androidx.fragment.app.FragmentManager;
6 | import androidx.fragment.app.FragmentPagerAdapter;
7 |
8 | import java.util.ArrayList;
9 | import java.util.List;
10 |
11 | /**
12 | * 应用模块:
13 | *
14 | * 类描述:
15 | *
16 | *
17 | * @author darryrzhoong
18 | * @since 2020-02-26
19 | */
20 | public class MainPageAdapter extends FragmentPagerAdapter {
21 | private List fragments ;
22 | public MainPageAdapter(@NonNull FragmentManager fm, int behavior) {
23 | super(fm, behavior);
24 | }
25 |
26 | public void setData(List data){
27 | if (fragments == null){
28 | fragments = new ArrayList<>();
29 | }
30 | fragments.addAll(data);
31 | notifyDataSetChanged();
32 | }
33 | @NonNull
34 | @Override
35 | public Fragment getItem(int position) {
36 | if (fragments != null && fragments.size() > 0){
37 | return fragments.get(position);
38 | }
39 | return null;
40 | }
41 |
42 | @Override
43 | public int getCount() {
44 | if (fragments != null && fragments.size() > 0){
45 | return fragments.size();
46 | }
47 | return 0;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/module-main/src/main/java/com/drz/main/bean/CustomBean.kt:
--------------------------------------------------------------------------------
1 | package com.drz.main.bean
2 |
3 | /**
4 | * 应用模块:
5 | *
6 | * 类描述:
7 | *
8 | *
9 | * @author darryrzhoong
10 | * @since 2020-02-28
11 | */
12 | class CustomBean {
13 | var imageRes: Int = 0
14 |
15 | var imageDescription: String? = null
16 |
17 | var imgUrl: String? = null
18 | }
--------------------------------------------------------------------------------
/module-main/src/main/java/com/drz/main/ui/BaseDataActivity.kt:
--------------------------------------------------------------------------------
1 | package com.drz.main.ui
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 |
5 | import android.os.Bundle
6 |
7 | import java.util.ArrayList
8 |
9 | abstract class BaseDataActivity : AppCompatActivity() {
10 |
11 | protected var mDrawableList: MutableList = ArrayList()
12 |
13 | override fun onCreate(savedInstanceState: Bundle?) {
14 | super.onCreate(savedInstanceState)
15 | initData()
16 | }
17 |
18 | private fun initData() {
19 | for (i in 0..2) {
20 | val drawable = resources.getIdentifier("guide$i", "drawable", packageName)
21 | mDrawableList.add(drawable)
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/module-main/src/main/java/com/drz/main/utils/ColorUtils.java:
--------------------------------------------------------------------------------
1 | package com.drz.main.utils;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.core.content.ContextCompat;
6 |
7 | /**
8 | * 应用模块:
9 | *
10 | * 类描述:
11 | *
12 | *
13 | * @author darryrzhoong
14 | * @since 2020-02-26
15 | */
16 | public class ColorUtils {
17 | public static int getColor(Context context,int colorId){
18 | return ContextCompat.getColor(context,colorId);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/module-main/src/main/java/com/drz/main/viewholder/CustomPageViewHolder.java:
--------------------------------------------------------------------------------
1 | package com.drz.main.viewholder;
2 |
3 | import android.animation.ObjectAnimator;
4 | import android.view.View;
5 | import android.widget.ImageView;
6 |
7 | import com.drz.main.R;
8 | import com.drz.main.bean.CustomBean;
9 | import com.zhpan.bannerview.holder.ViewHolder;
10 |
11 | /**
12 | * 应用模块:
13 | *
14 | * 类描述:
15 | *
16 | *
17 | * @author darryrzhoong
18 | * @since 2020-02-28
19 | */
20 | public class CustomPageViewHolder implements ViewHolder {
21 | private OnSubViewClickListener mOnSubViewClickListener;
22 |
23 | @Override
24 | public int getLayoutId() {
25 | return R.layout.main_item_custom_view;
26 | }
27 |
28 | @Override
29 | public void onBind(View itemView, CustomBean data, int position, int size) {
30 | ImageView mImageView = itemView.findViewById(R.id.banner_image);
31 |
32 | mImageView.setImageResource(data.getImageRes());
33 | ObjectAnimator alphaAnimator = ObjectAnimator.ofFloat(mImageView, "alpha", 0, 1);
34 | alphaAnimator.setDuration(1500);
35 | alphaAnimator.start();
36 | }
37 |
38 | public void setOnSubViewClickListener(OnSubViewClickListener subViewClickListener) {
39 | mOnSubViewClickListener = subViewClickListener;
40 | }
41 |
42 | public interface OnSubViewClickListener {
43 | void onViewClick(View view, int position);
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/module-main/src/main/java/com/drz/main/views/CustomNoTouchViewPager.java:
--------------------------------------------------------------------------------
1 | package com.drz.main.views;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.view.MotionEvent;
6 |
7 | import androidx.annotation.NonNull;
8 | import androidx.annotation.Nullable;
9 | import androidx.viewpager.widget.ViewPager;
10 |
11 | /**
12 | * 应用模块:
13 | *
14 | * 类描述:
15 | *
16 | *
17 | * @author darryrzhoong
18 | * @since 2020-02-26
19 | */
20 | public class CustomNoTouchViewPager extends ViewPager {
21 | public CustomNoTouchViewPager(@NonNull Context context) {
22 | super(context);
23 | }
24 |
25 | public CustomNoTouchViewPager(@NonNull Context context, @Nullable AttributeSet attrs) {
26 | super(context, attrs);
27 | }
28 |
29 | @Override
30 | public boolean onInterceptTouchEvent(MotionEvent ev) {
31 | return false;
32 | }
33 |
34 | @Override
35 | public boolean onTouchEvent(MotionEvent ev) {
36 | return false;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/module-main/src/main/res/drawable-xxhdpi/guide0.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-main/src/main/res/drawable-xxhdpi/guide0.jpg
--------------------------------------------------------------------------------
/module-main/src/main/res/drawable-xxhdpi/guide1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-main/src/main/res/drawable-xxhdpi/guide1.jpg
--------------------------------------------------------------------------------
/module-main/src/main/res/drawable-xxhdpi/guide2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-main/src/main/res/drawable-xxhdpi/guide2.jpg
--------------------------------------------------------------------------------
/module-main/src/main/res/drawable-xxhdpi/main_splash_bg.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-main/src/main/res/drawable-xxhdpi/main_splash_bg.webp
--------------------------------------------------------------------------------
/module-main/src/main/res/drawable/guide0.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-main/src/main/res/drawable/guide0.jpg
--------------------------------------------------------------------------------
/module-main/src/main/res/drawable/guide1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-main/src/main/res/drawable/guide1.jpg
--------------------------------------------------------------------------------
/module-main/src/main/res/drawable/guide2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-main/src/main/res/drawable/guide2.jpg
--------------------------------------------------------------------------------
/module-main/src/main/res/drawable/main_community.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-main/src/main/res/drawable/main_community.png
--------------------------------------------------------------------------------
/module-main/src/main/res/drawable/main_home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-main/src/main/res/drawable/main_home.png
--------------------------------------------------------------------------------
/module-main/src/main/res/drawable/main_notify.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-main/src/main/res/drawable/main_notify.png
--------------------------------------------------------------------------------
/module-main/src/main/res/drawable/main_splash_bg.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-main/src/main/res/drawable/main_splash_bg.webp
--------------------------------------------------------------------------------
/module-main/src/main/res/drawable/main_splash_start.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | -
7 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/module-main/src/main/res/drawable/main_start_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
10 |
11 |
12 |
13 |
18 |
19 |
23 |
24 |
--------------------------------------------------------------------------------
/module-main/src/main/res/drawable/main_user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-main/src/main/res/drawable/main_user.png
--------------------------------------------------------------------------------
/module-main/src/main/res/layout/main_activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
16 |
17 |
23 |
24 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/module-main/src/main/res/layout/main_item_custom_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/module-main/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/module-main/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/module-main/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-main/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/module-main/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-main/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/module-main/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-main/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/module-main/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-main/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/module-main/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-main/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/module-main/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-main/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/module-main/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-main/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/module-main/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-main/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/module-main/src/main/res/mipmap-xxhdpi/splash_start.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-main/src/main/res/mipmap-xxhdpi/splash_start.webp
--------------------------------------------------------------------------------
/module-main/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-main/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/module-main/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-main/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/module-main/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 | #fafafa
7 | #ff000000
8 | #656565
9 | #BFFFFFFF
10 |
11 |
--------------------------------------------------------------------------------
/module-main/src/main/res/values/main_dimes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 100dp
4 | 10dp
5 | 3dp
6 | 4.50dp
7 |
--------------------------------------------------------------------------------
/module-main/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | module-main
3 |
4 |
--------------------------------------------------------------------------------
/module-main/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
--------------------------------------------------------------------------------
/module-main/src/test/java/com/drz/main/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.drz.main;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/module-more/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/module-more/build.gradle:
--------------------------------------------------------------------------------
1 | apply from: "../module.build.gradle"
2 | android {
3 | defaultConfig {
4 | if (isBuildModule.toBoolean()){
5 | applicationId "com.drz.more"
6 | }
7 | }
8 | //统一资源前缀,规范资源引用
9 | resourcePrefix "more_"
10 | }
11 |
12 | dependencies {
13 | testImplementation rootProject.ext.androidx["junit"]
14 | androidTestImplementation rootProject.ext.androidx["androidx.test.ext-junit"]
15 | androidTestImplementation rootProject.ext.androidx["androidx.test.espresso:espresso-core"]
16 | //组件中依赖阿里路由编译框架
17 | annotationProcessor rootProject.ext.dependencies["arouter-compiler"]
18 | annotationProcessor rootProject.ext.dependencies["glide-compiler"]
19 | //组件依赖基础库
20 | api project(':library-common')
21 | }
22 |
--------------------------------------------------------------------------------
/module-more/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 |
--------------------------------------------------------------------------------
/module-more/src/androidTest/java/com/drz/more/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.drz.more;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.platform.app.InstrumentationRegistry;
6 | import androidx.test.ext.junit.runners.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24 |
25 | assertEquals("com.drz.more", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/module-more/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
--------------------------------------------------------------------------------
/module-more/src/main/alone/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/module-more/src/main/java/com/drz/more/adapter/MoreFragmentPageAdapter.java:
--------------------------------------------------------------------------------
1 | package com.drz.more.adapter;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | import androidx.annotation.NonNull;
7 | import androidx.annotation.Nullable;
8 | import androidx.fragment.app.Fragment;
9 | import androidx.fragment.app.FragmentManager;
10 | import androidx.fragment.app.FragmentPagerAdapter;
11 |
12 | /**
13 | * 应用模块:
14 | *
15 | * 类描述:
16 | *
17 | *
18 | * @author darryrzhoong
19 | * @since 2020-02-16
20 | */
21 | public class MoreFragmentPageAdapter extends FragmentPagerAdapter {
22 | private String[] tables = {"主题","推送","互动"};
23 | private List fragments;
24 |
25 | public MoreFragmentPageAdapter(@NonNull FragmentManager fm, int behavior) {
26 | super(fm, behavior);
27 | }
28 |
29 | public void setData(List data){
30 | if (fragments == null){
31 | fragments = new ArrayList<>();
32 | }
33 | fragments.addAll(data);
34 | notifyDataSetChanged();
35 | }
36 | @NonNull
37 | @Override
38 | public Fragment getItem(int position) {
39 | return fragments.get(position);
40 | }
41 |
42 | @Override
43 | public int getCount() {
44 | if (fragments != null && fragments.size() >0){
45 | return fragments.size();
46 | }
47 | return 0;
48 | }
49 |
50 | @Nullable
51 | @Override
52 | public CharSequence getPageTitle(int position) {
53 | return tables[position];
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/module-more/src/main/java/com/drz/more/message/IMessageView.java:
--------------------------------------------------------------------------------
1 | package com.drz.more.message;
2 |
3 | import java.util.List;
4 |
5 | import com.drz.base.activity.IBasePagingView;
6 | import com.drz.common.contract.BaseCustomViewModel;
7 |
8 | /**
9 | * 应用模块:
10 | *
11 | * 类描述:
12 | *
13 | *
14 | * @author darryrzhoong
15 | * @since 2020-02-23
16 | */
17 | public interface IMessageView extends IBasePagingView {
18 | /**
19 | * @param data 数据
20 | * @param isFirstPage 是否是第一页
21 | * */
22 | void onDataLoaded(List data, boolean isFirstPage);
23 | }
24 |
--------------------------------------------------------------------------------
/module-more/src/main/java/com/drz/more/message/bean/MessageViewModel.java:
--------------------------------------------------------------------------------
1 | package com.drz.more.message.bean;
2 |
3 | import com.drz.common.contract.BaseCustomViewModel;
4 |
5 | /**
6 | * 应用模块:
7 | *
8 | * 类描述:
9 | *
10 | *
11 | * @author darryrzhoong
12 | * @since 2020-02-23
13 | */
14 | public class MessageViewModel extends BaseCustomViewModel {
15 | public String coverUrl;
16 | public String messageDate;
17 | public String title;
18 | public String comtent;
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/module-more/src/main/java/com/drz/more/themes/IThemeView.java:
--------------------------------------------------------------------------------
1 | package com.drz.more.themes;
2 |
3 | import java.util.ArrayList;
4 |
5 | import com.drz.base.activity.IBaseView;
6 | import com.drz.more.themes.bean.Tabs;
7 |
8 | /**
9 | * 应用模块:
10 | *
11 | * 类描述:
12 | *
13 | *
14 | * @author darryrzhoong
15 | * @since 2020-02-22
16 | */
17 | public interface IThemeView extends IBaseView {
18 |
19 | /**
20 | * 数据加载完成
21 | * @param tabs tabs
22 | * */
23 | void onDataLoaded(ArrayList tabs);
24 | }
25 |
--------------------------------------------------------------------------------
/module-more/src/main/java/com/drz/more/themes/childpager/IThemeContentView.java:
--------------------------------------------------------------------------------
1 | package com.drz.more.themes.childpager;
2 |
3 | import java.util.ArrayList;
4 |
5 | import com.drz.base.activity.IBasePagingView;
6 | import com.drz.common.contract.BaseCustomViewModel;
7 |
8 | /**
9 | * 应用模块:
10 | *
11 | * 类描述:
12 | *
13 | *
14 | * @author darryrzhoong
15 | * @since 2020-02-23
16 | */
17 | public interface IThemeContentView extends IBasePagingView {
18 | /**
19 | * 数据加载完成
20 | * @param viewModels data
21 | * @param isFirstPage 是否是第一页数据
22 | * */
23 | void onDataLoaded(ArrayList viewModels, boolean isFirstPage);
24 | }
25 |
--------------------------------------------------------------------------------
/module-more/src/main/java/com/drz/more/themes/childpager/bean/ThemesItemViewModel.java:
--------------------------------------------------------------------------------
1 | package com.drz.more.themes.childpager.bean;
2 |
3 | import com.drz.common.contract.BaseCustomViewModel;
4 |
5 | /**
6 | * 应用模块:
7 | *
8 | * 类描述:
9 | *
10 | *
11 | * @author darryrzhoong
12 | * @since 2020-02-23
13 | */
14 | public class ThemesItemViewModel extends BaseCustomViewModel
15 | {
16 | public String coverUrl;
17 |
18 | public String title;
19 |
20 | public String description;
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/module-more/src/main/java/com/drz/more/topic/ITopicView.java:
--------------------------------------------------------------------------------
1 | package com.drz.more.topic;
2 |
3 | import java.util.List;
4 |
5 | import com.drz.base.activity.IBasePagingView;
6 | import com.drz.common.contract.BaseCustomViewModel;
7 |
8 | /**
9 | * 应用模块:
10 | *
11 | * 类描述:
12 | *
13 | *
14 | * @author darryrzhoong
15 | * @since 2020-02-23
16 | */
17 | public interface ITopicView extends IBasePagingView {
18 |
19 | /**
20 | * @param data 数据
21 | * @param isFirstPage 是否是第一页
22 | * */
23 | void onDataLoaded(List data, boolean isFirstPage);
24 | }
25 |
--------------------------------------------------------------------------------
/module-more/src/main/res/drawable/more_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-more/src/main/res/drawable/more_search.png
--------------------------------------------------------------------------------
/module-more/src/main/res/layout/more_fragment_message.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
16 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/module-more/src/main/res/layout/more_fragment_themes_content.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
13 |
17 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/module-more/src/main/res/layout/more_fragment_topic.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
12 |
13 |
17 |
18 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/module-more/src/main/res/layout/more_item_foote_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
--------------------------------------------------------------------------------
/module-more/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/module-more/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/module-more/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-more/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/module-more/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-more/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/module-more/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-more/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/module-more/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-more/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/module-more/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-more/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/module-more/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-more/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/module-more/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-more/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/module-more/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-more/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/module-more/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-more/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/module-more/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-more/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/module-more/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 |
7 |
--------------------------------------------------------------------------------
/module-more/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Library-more
3 |
4 |
--------------------------------------------------------------------------------
/module-more/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/module-more/src/test/java/com/drz/more/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.drz.more;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/module-player/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/module-player/build.gradle:
--------------------------------------------------------------------------------
1 | apply from: "../module.build.gradle"
2 | android {
3 | defaultConfig {
4 | if (isBuildModule.toBoolean()){
5 | applicationId "com.drz.player"
6 | }
7 | }
8 | //统一资源前缀,规范资源引用
9 | resourcePrefix "player_"
10 | }
11 |
12 |
13 | dependencies {
14 | testImplementation rootProject.ext.androidx["junit"]
15 | androidTestImplementation rootProject.ext.androidx["androidx.test.ext-junit"]
16 | androidTestImplementation rootProject.ext.androidx["androidx.test.espresso:espresso-core"]
17 | //组件中依赖阿里路由编译框架
18 | annotationProcessor rootProject.ext.dependencies["arouter-compiler"]
19 | annotationProcessor rootProject.ext.dependencies["glide-compiler"]
20 | api project(':library-common')
21 | api project(':library-video')
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/module-player/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 |
--------------------------------------------------------------------------------
/module-player/src/androidTest/java/com/drz/player/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.drz.player;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.platform.app.InstrumentationRegistry;
6 | import androidx.test.ext.junit.runners.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24 |
25 | assertEquals("com.drz.player", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/module-player/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/module-player/src/main/alone/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/module-player/src/main/java/com/drz/player/IVideoPlayerView.java:
--------------------------------------------------------------------------------
1 | package com.drz.player;
2 |
3 | import java.util.ArrayList;
4 |
5 | import com.drz.base.activity.IBaseView;
6 | import com.drz.common.contract.BaseCustomViewModel;
7 |
8 | /**
9 | * 应用模块:
10 | *
11 | * 类描述:
12 | *
13 | *
14 | * @author darryrzhoong
15 | * @since 2020-02-20
16 | */
17 | public interface IVideoPlayerView extends IBaseView {
18 | /**
19 | * 数据加载完成
20 | *
21 | * @param viewModels data
22 | */
23 | void onDataLoadFinish(ArrayList viewModels);
24 | }
25 |
--------------------------------------------------------------------------------
/module-player/src/main/java/com/drz/player/adapter/provider/IVideoItemType.java:
--------------------------------------------------------------------------------
1 | package com.drz.player.adapter.provider;
2 |
3 | /**
4 | * 应用模块:
5 | *
6 | * 类描述:
7 | *
8 | *
9 | * @author darryrzhoong
10 | * @since 2020-02-21
11 | */
12 | public interface IVideoItemType {
13 | /**
14 | * 标题类别
15 | * */
16 | int TITLE_VIEW = 1;
17 |
18 | /**
19 | * 相关推荐
20 | * */
21 | int NOMINATE_VIEW = 2;
22 |
23 | /**
24 | * 评论
25 | * */
26 | int REPLY_VIEW = 3;
27 | }
28 |
--------------------------------------------------------------------------------
/module-player/src/main/java/com/drz/player/bean/viewmodel/ReplyViewModel.java:
--------------------------------------------------------------------------------
1 | package com.drz.player.bean.viewmodel;
2 |
3 | import com.drz.common.contract.BaseCustomViewModel;
4 |
5 | /**
6 | * 应用模块:
7 | *
8 | * 类描述:
9 | *
10 | *
11 | * @author darryrzhoong
12 | * @since 2020-02-21
13 | */
14 | public class ReplyViewModel extends BaseCustomViewModel
15 | {
16 | public String avatar;
17 |
18 | public String nickName;
19 |
20 | public String replyMessage;
21 |
22 | public long releaseTime;
23 |
24 | public int likeCount;
25 | }
26 |
--------------------------------------------------------------------------------
/module-player/src/main/java/com/drz/player/bean/viewmodel/VideoCardViewModel.java:
--------------------------------------------------------------------------------
1 | package com.drz.player.bean.viewmodel;
2 |
3 | import com.drz.common.contract.BaseCustomViewModel;
4 |
5 | /**
6 | * 应用模块:
7 | *
8 | * 类描述:
9 | *
10 | *
11 | * @author darryrzhoong
12 | * @since 2020-02-12
13 | */
14 | public class VideoCardViewModel extends BaseCustomViewModel
15 | {
16 | public String coverUrl;
17 |
18 | public int videoTime;
19 |
20 | public String title;
21 |
22 | public String description;
23 |
24 | public String authorUrl;
25 |
26 | public String video_description;
27 |
28 | public String userDescription;
29 |
30 | public String nickName;
31 |
32 | public String playerUrl;
33 |
34 | public String blurredUrl;
35 |
36 | public int videoId;
37 |
38 | // 点赞
39 | public int collectionCount;
40 |
41 | // 分享
42 | public int shareCount;
43 |
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/module-player/src/main/java/com/drz/player/bean/viewmodel/VideoTextViewModel.java:
--------------------------------------------------------------------------------
1 | package com.drz.player.bean.viewmodel;
2 |
3 |
4 | import com.drz.common.contract.BaseCustomViewModel;
5 |
6 | /**
7 | * 应用模块:
8 | *
9 | * 类描述:
10 | *
11 | *
12 | * @author darryrzhoong
13 | * @since 2020-02-21
14 | */
15 | public class VideoTextViewModel extends BaseCustomViewModel {
16 | public String textTitle;
17 | }
18 |
--------------------------------------------------------------------------------
/module-player/src/main/res/drawable/player_action_go.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-player/src/main/res/drawable/player_action_go.png
--------------------------------------------------------------------------------
/module-player/src/main/res/drawable/player_like.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-player/src/main/res/drawable/player_like.png
--------------------------------------------------------------------------------
/module-player/src/main/res/drawable/player_shape_video_time_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/module-player/src/main/res/drawable/tools_player_bg.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-player/src/main/res/drawable/tools_player_bg.jpeg
--------------------------------------------------------------------------------
/module-player/src/main/res/layout/player_item_footer_white_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
16 |
--------------------------------------------------------------------------------
/module-player/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/module-player/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/module-player/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-player/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/module-player/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-player/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/module-player/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-player/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/module-player/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-player/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/module-player/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-player/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/module-player/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-player/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/module-player/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-player/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/module-player/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-player/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/module-player/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-player/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/module-player/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-player/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/module-player/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 |
7 |
--------------------------------------------------------------------------------
/module-player/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Module-player
3 |
4 |
--------------------------------------------------------------------------------
/module-player/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/module-player/src/test/java/com/drz/player/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.drz.player;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/module-user/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/module-user/build.gradle:
--------------------------------------------------------------------------------
1 | apply from: "../module.build.gradle"
2 | android {
3 | defaultConfig {
4 | if (isBuildModule.toBoolean()){
5 | applicationId "com.drz.user"
6 | }
7 | }
8 | //统一资源前缀,规范资源引用
9 | resourcePrefix "user_"
10 | }
11 |
12 |
13 | dependencies {
14 | testImplementation rootProject.ext.androidx["junit"]
15 | androidTestImplementation rootProject.ext.androidx["androidx.test.ext-junit"]
16 | androidTestImplementation rootProject.ext.androidx["androidx.test.espresso:espresso-core"]
17 | //组件中依赖阿里路由编译框架
18 | annotationProcessor rootProject.ext.dependencies["arouter-compiler"]
19 | annotationProcessor rootProject.ext.dependencies["glide-compiler"]
20 | api project(':library-common')
21 | }
22 |
--------------------------------------------------------------------------------
/module-user/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/module-user/src/androidTest/java/com/drz/user/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.drz.user;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.platform.app.InstrumentationRegistry;
6 | import androidx.test.ext.junit.runners.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24 |
25 | assertEquals("com.drz.user", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/module-user/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/module-user/src/main/alone/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/module-user/src/main/java/com/drz/user/AttentionActivity.java:
--------------------------------------------------------------------------------
1 | package com.drz.user;
2 |
3 | import android.os.Bundle;
4 |
5 | import androidx.annotation.Nullable;
6 | import androidx.appcompat.app.AppCompatActivity;
7 |
8 | import com.alibaba.android.arouter.facade.annotation.Route;
9 | import com.drz.common.router.RouterActivityPath;
10 |
11 | /**
12 | * 应用模块:
13 | *
14 | * 类描述: 关注页面
15 | *
16 | *
17 | * @author darryrzhoong
18 | * @since 2020-02-29
19 | */
20 | @Route(path = RouterActivityPath.User.PAGER_ATTENTION)
21 | public class AttentionActivity extends AppCompatActivity {
22 | @Override
23 | protected void onCreate(@Nullable Bundle savedInstanceState) {
24 | super.onCreate(savedInstanceState);
25 | setContentView(R.layout.user_activity_attention);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/module-user/src/main/java/com/drz/user/UserModuleInit.java:
--------------------------------------------------------------------------------
1 | package com.drz.user;
2 |
3 | import com.drz.base.base.BaseApplication;
4 | import com.drz.common.IModuleInit;
5 |
6 | /**
7 | * 应用模块:
8 | *
9 | * 类描述:
10 | *
11 | *
12 | * @author darryrzhoong
13 | * @since 2020-02-29
14 | */
15 | public class UserModuleInit implements IModuleInit {
16 | @Override
17 | public boolean onInitAhead(BaseApplication application) {
18 | return false;
19 | }
20 |
21 | @Override
22 | public boolean onInitLow(BaseApplication application) {
23 | return false;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/module-user/src/main/java/com/drz/user/adapter/RecyclerAdapter.java:
--------------------------------------------------------------------------------
1 | package com.drz.user.adapter;
2 |
3 | import android.widget.ImageView;
4 |
5 | import com.bumptech.glide.Glide;
6 | import com.bumptech.glide.load.resource.bitmap.CircleCrop;
7 | import com.bumptech.glide.request.RequestOptions;
8 | import com.chad.library.adapter.base.BaseQuickAdapter;
9 | import com.chad.library.adapter.base.viewholder.BaseViewHolder;
10 | import com.drz.user.R;
11 |
12 | import org.jetbrains.annotations.NotNull;
13 | import org.jetbrains.annotations.Nullable;
14 |
15 | /**
16 | * 应用模块:
17 | *
18 | * 类描述:
19 | *
20 | *
21 | * @author darryrzhoong
22 | * @since 2020-02-28
23 | */
24 | public class RecyclerAdapter extends BaseQuickAdapter {
25 |
26 | public RecyclerAdapter() {
27 | super(R.layout.user_item_view_layout);
28 | }
29 |
30 | @Override
31 | protected void convert(@NotNull BaseViewHolder baseViewHolder, @Nullable String s) {
32 | baseViewHolder.setText(R.id.tv_item,s);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/module-user/src/main/res/drawable-xxhdpi/user_login_bg1.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-user/src/main/res/drawable-xxhdpi/user_login_bg1.webp
--------------------------------------------------------------------------------
/module-user/src/main/res/drawable-xxhdpi/user_login_bg2.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-user/src/main/res/drawable-xxhdpi/user_login_bg2.webp
--------------------------------------------------------------------------------
/module-user/src/main/res/drawable-xxhdpi/user_login_bg3.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-user/src/main/res/drawable-xxhdpi/user_login_bg3.webp
--------------------------------------------------------------------------------
/module-user/src/main/res/drawable-xxhdpi/user_login_bg4.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-user/src/main/res/drawable-xxhdpi/user_login_bg4.webp
--------------------------------------------------------------------------------
/module-user/src/main/res/drawable/avatar.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-user/src/main/res/drawable/avatar.jpg
--------------------------------------------------------------------------------
/module-user/src/main/res/drawable/user_icon.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-user/src/main/res/drawable/user_icon.jpg
--------------------------------------------------------------------------------
/module-user/src/main/res/drawable/user_more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-user/src/main/res/drawable/user_more.png
--------------------------------------------------------------------------------
/module-user/src/main/res/drawable/user_shape_login_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/module-user/src/main/res/drawable/user_shape_login_bg2.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/module-user/src/main/res/layout/user_activity_attention.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/module-user/src/main/res/layout/user_item_footer_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
14 |
23 |
--------------------------------------------------------------------------------
/module-user/src/main/res/layout/user_item_view_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
17 |
--------------------------------------------------------------------------------
/module-user/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/module-user/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/module-user/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-user/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/module-user/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-user/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/module-user/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-user/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/module-user/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-user/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/module-user/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-user/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/module-user/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-user/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/module-user/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-user/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/module-user/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-user/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/module-user/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-user/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/module-user/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/module-user/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/module-user/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 | #ff9f9c96
7 | #4d9e7b
8 | #d4d3d0
9 |
10 |
--------------------------------------------------------------------------------
/module-user/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Module-user
3 |
4 |
--------------------------------------------------------------------------------
/module-user/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/module-user/src/test/java/com/drz/user/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.drz.user;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/mvvm.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darryrzhong/Android-MvvmComponent-App/2ff7cddd5a402668bf2b847d7499f80d5f0bd493/mvvm.jks
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':library-base', ':library-common',':library-servicemanager', ':library-network', ':module-main', ':module-home', ':module-community', ':library-video', ':module-more', ':module-player', ':module-user'
2 | rootProject.name='MvvmComponent'
3 |
--------------------------------------------------------------------------------