├── .gitignore ├── .idea ├── codeStyles │ ├── Project.xml │ └── codeStyleConfig.xml ├── compiler.xml ├── copyright │ ├── cody.xml │ └── profiles_settings.xml ├── encodings.xml ├── gradle.xml ├── inspectionProfiles │ └── Project_Default.xml ├── jarRepositories.xml ├── markdown-navigator-enh.xml ├── markdown-navigator.xml ├── misc.xml ├── runConfigurations.xml ├── scopes │ └── code.xml └── vcs.xml ├── LICENSE ├── README.md ├── app-core ├── .gitignore ├── README.md ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── cody │ │ └── component │ │ └── app │ │ ├── BaseApplication.java │ │ ├── IBaseListView.java │ │ ├── IBasePageListView.java │ │ ├── activity │ │ ├── AbsBindActivity.java │ │ ├── AbsListActivity.java │ │ ├── AbsPageListActivity.java │ │ ├── BaseActionbarActivity.java │ │ ├── BaseActivity.java │ │ ├── BaseBindActivity.java │ │ ├── BaseFragmentContainerActivity.java │ │ ├── FragmentContainerActivity.java │ │ ├── FragmentContainerWithButtonActivity.java │ │ ├── FragmentContainerWithCloseActivity.java │ │ ├── FragmentContainerWithFabActivity.java │ │ ├── FriendlyBindActivity.java │ │ └── StaticActivity.java │ │ ├── fragment │ │ ├── AbsBindFragment.java │ │ ├── AbsListFragment.java │ │ ├── AbsPageListFragment.java │ │ ├── BaseBindFragment.java │ │ ├── BaseFragment.java │ │ ├── BaseLazyFragment.java │ │ ├── FriendlyBindFragment.java │ │ ├── ListFragment.java │ │ ├── PageListFragment.java │ │ └── StaticFragment.java │ │ ├── local │ │ ├── BaseLocalKey.java │ │ ├── LocalProfile.java │ │ └── Repository.java │ │ └── widget │ │ ├── LoadingDialog.java │ │ ├── friendly │ │ ├── FriendlyLayout.java │ │ └── IFriendlyView.java │ │ └── swipebacklayout │ │ ├── BGAKeyboardUtil.java │ │ ├── BGASwipeBackHelper.java │ │ ├── BGASwipeBackLayout.java │ │ ├── BGASwipeBackManager.java │ │ ├── BGASwipeBackShadowView.java │ │ └── UIUtil.java │ └── res │ ├── anim │ ├── ani_backward_enter.xml │ ├── ani_backward_exit.xml │ ├── ani_forward_enter.xml │ ├── ani_forward_exit.xml │ ├── ani_swipeback_enter.xml │ └── ani_swipeback_exit.xml │ ├── drawable │ ├── bg_shadow_line.9.png │ └── swipeback_shadow.9.png │ ├── layout │ ├── activity_fragment_container.xml │ ├── activity_fragment_container_with_button.xml │ ├── activity_fragment_container_with_close.xml │ ├── activity_fragment_container_with_fab.xml │ ├── fragment_list.xml │ ├── friendly_empty_view.xml │ ├── friendly_error_view.xml │ ├── friendly_init_view.xml │ └── loading_dialog.xml │ └── values │ ├── strings.xml │ └── styles.xml ├── app-demo ├── .gitignore ├── README.md ├── build.gradle ├── keystore.jks ├── proguard-rules.pro ├── signing.properties └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── cody │ │ └── component │ │ └── demo │ │ ├── DemoApplication.java │ │ ├── LiveEventBus.java │ │ ├── banner │ │ └── MainActivity.java │ │ ├── bean │ │ ├── TestBean.java │ │ └── TestDataBean.java │ │ ├── bus │ │ ├── AppDemo.java │ │ └── BusDemoActivity.java │ │ ├── data │ │ ├── CatApiOpen.java │ │ └── CatHttpBin.java │ │ ├── friendly │ │ └── FriendlyActivity.java │ │ ├── list │ │ ├── ItemTestViewData.java │ │ ├── ListTestActivity.java │ │ ├── PageListTestFragment.java │ │ └── TestPageListViewModel.java │ │ └── repository │ │ ├── Account.java │ │ ├── AccountDataSource.java │ │ ├── AccountRepository.java │ │ ├── IAccountDataSource.java │ │ ├── NewsPack.java │ │ ├── QrCode.java │ │ └── Weather.java │ └── res │ ├── drawable-v24 │ └── ic_launcher_foreground.xml │ ├── drawable │ ├── ic_launcher_background.xml │ ├── ic_shape_red_round_button.xml │ └── img_update_top.png │ ├── layout │ ├── activity_bus_demo.xml │ ├── activity_friendly.xml │ ├── activity_main_banner.xml │ ├── content_scrolling.xml │ ├── item_test_list.xml │ └── update_dialog.xml │ ├── menu │ └── menu_demo.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 │ ├── strings.xml │ └── styles.xml ├── banner-core ├── .gitignore ├── README.md ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── cody │ │ └── component │ │ └── banner │ │ ├── BindingBanner.java │ │ ├── ScrollSpeedLinearLayoutManger.java │ │ ├── adapter │ │ └── BindingBannerAdapter.java │ │ └── data │ │ └── BannerViewData.java │ └── res │ ├── layout │ └── default_binding_banner.xml │ └── values │ └── atrrs.xml ├── bind-core ├── .gitignore ├── README.md ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── cody │ │ └── component │ │ └── bind │ │ ├── CoreBR.java │ │ ├── IBinding.java │ │ └── adapter │ │ ├── AlphaTransformation.java │ │ ├── DataBindingAdapterDefines.java │ │ └── list │ │ ├── BindingItemDiffCallback.java │ │ ├── BindingListAdapter.java │ │ ├── BindingPageListAdapter.java │ │ ├── BindingViewHolder.java │ │ ├── IBindingAdapter.java │ │ ├── MultiBindingListAdapter.java │ │ ├── MultiBindingPageListAdapter.java │ │ └── OnBindingItemClickListener.java │ └── res │ └── layout │ └── item_load_more.xml ├── blues-core ├── .gitignore ├── README.md ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── com │ └── cody │ └── component │ └── blues │ ├── Blues.java │ ├── BluesCallBack.java │ ├── BluesConfig.java │ ├── BluesHandler.java │ ├── BluesQuitException.java │ └── CrashUtil.java ├── build.gradle ├── cat-core ├── .gitignore ├── README.md ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── cat_ic_launcher-web.png │ ├── java │ └── com │ │ └── cody │ │ └── component │ │ └── cat │ │ ├── HttpCat.java │ │ ├── db │ │ ├── HttpCatDao.java │ │ ├── HttpCatDatabase.java │ │ └── data │ │ │ ├── HttpHeader.java │ │ │ └── ItemHttpData.java │ │ ├── exception │ │ └── NoCatCreatedException.java │ │ ├── interceptor │ │ └── HttpCatInterceptor.java │ │ ├── notification │ │ └── NotificationManagement.java │ │ ├── service │ │ └── CatClearService.java │ │ ├── ui │ │ ├── CatDetailsActivity.java │ │ ├── CatMainActivity.java │ │ ├── CatOverviewFragment.java │ │ └── CatPayloadFragment.java │ │ ├── utils │ │ ├── Converters.java │ │ ├── FormatUtils.java │ │ └── LauncherUtil.java │ │ └── viewmodel │ │ └── CatViewModel.java │ └── res │ ├── drawable │ ├── cat_ic_clear.xml │ ├── cat_ic_https.xml │ ├── cat_ic_https_selector_for_text_view.xml │ ├── cat_ic_launcher_background.xml │ ├── cat_ic_share.xml │ └── ic_arrow_upward.xml │ ├── layout │ ├── cat_activity_details.xml │ ├── cat_activity_main.xml │ ├── cat_fragment_overview.xml │ ├── cat_fragment_payload.xml │ └── cat_item_main.xml │ ├── menu │ ├── cat_menu_main.xml │ └── cat_menu_share.xml │ ├── mipmap-anydpi-v26 │ └── cat_ic_launcher.xml │ ├── mipmap-hdpi │ ├── cat_ic_launcher.png │ └── cat_ic_launcher_foreground.png │ ├── mipmap-mdpi │ ├── cat_ic_launcher.png │ └── cat_ic_launcher_foreground.png │ ├── mipmap-xhdpi │ ├── cat_ic_launcher.png │ └── cat_ic_launcher_foreground.png │ ├── mipmap-xxhdpi │ ├── cat_ic_launcher.png │ └── cat_ic_launcher_foreground.png │ ├── mipmap-xxxhdpi │ ├── cat_ic_launcher.png │ └── cat_ic_launcher_foreground.png │ └── values │ ├── colors.xml │ ├── strings.xml │ └── styles.xml ├── compiler ├── .gitignore ├── README.md └── build.gradle ├── config-aar.gradle ├── config-compiler.gradle ├── config-define.gradle ├── config-doc.gradle ├── config-lib.gradle ├── config-local-maven.gradle ├── config-versions.gradle ├── core ├── .gitignore ├── README.md ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ └── AndroidManifest.xml ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── handler-core ├── .gitignore ├── README.md ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── com │ └── cody │ └── component │ └── handler │ ├── RequestStatusUtil.java │ ├── UnImplementException.java │ ├── data │ ├── FriendlyViewData.java │ ├── IViewData.java │ ├── ItemFooterOrHeaderData.java │ ├── ItemViewDataHolder.java │ └── ViewData.java │ ├── define │ ├── Operation.java │ ├── PageInfo.java │ ├── RequestStatus.java │ ├── Status.java │ └── ViewAction.java │ ├── factory │ └── PageListDataSourceFactory.java │ ├── interfaces │ ├── OnFriendlyListener.java │ ├── OnInitListener.java │ ├── OnRequestListener.java │ ├── OnRequestPageListener.java │ ├── OnRetryListener.java │ ├── PageResultCallBack.java │ ├── Refreshable.java │ ├── ResultCallBack.java │ └── Scrollable.java │ ├── livedata │ ├── BooleanLiveData.java │ ├── FloatLiveData.java │ ├── IntegerLiveData.java │ ├── LongLiveData.java │ ├── SafeMutableLiveData.java │ └── StringLiveData.java │ ├── mapper │ ├── DataMapper.java │ └── PageDataMapper.java │ ├── source │ └── PageListKeyedDataSource.java │ ├── view │ └── IBaseView.java │ └── viewmodel │ ├── AbsPageListViewModel.java │ ├── BaseViewModel.java │ ├── FriendlyViewModel.java │ ├── IViewModel.java │ ├── ListViewModel.java │ ├── PageListViewModel.java │ └── SingleViewModel.java ├── http-compiler ├── .gitignore ├── README.md ├── build.gradle └── src │ └── main │ └── java │ └── com │ └── cody │ └── component │ └── http │ └── compiler │ ├── RemoteDataSourceProcessor.java │ ├── Util.java │ └── bean │ ├── DataSourceInfoBean.java │ ├── DomainBean.java │ ├── MethodBean.java │ └── ParameterBean.java ├── http-core ├── .gitignore ├── README.md ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── com │ └── cody │ └── component │ └── http │ ├── BaseRemoteDataSource.java │ ├── BaseSubscriber.java │ ├── GZIPUtil.java │ ├── HttpCore.java │ ├── IDataSource.java │ ├── RetrofitManagement.java │ ├── callback │ ├── RequestCallback.java │ ├── RequestFriendlyCallback.java │ └── RequestMultiplyCallback.java │ ├── db │ ├── Converters.java │ ├── HttpCacheDao.java │ ├── HttpCacheDatabase.java │ └── data │ │ └── ItemCacheData.java │ ├── holder │ └── ToastHolder.java │ ├── interceptor │ ├── HeaderInterceptor.java │ └── HttpCacheInterceptor.java │ └── repository │ └── BaseRepository.java ├── http-lib ├── .gitignore ├── README.md ├── build.gradle └── src │ └── main │ └── java │ └── com │ └── cody │ └── component │ └── http │ └── lib │ ├── annotation │ └── Domain.java │ ├── config │ ├── HttpCode.java │ └── HttpConfig.java │ └── exception │ ├── AccountInvalidHttpException.java │ ├── ConnectionHttpException.java │ ├── DomainInvalidHttpException.java │ ├── ForbiddenHttpException.java │ ├── GenerateDataSourceHttpException.java │ ├── InvalidDefineHttpException.java │ ├── ParameterInvalidHttpException.java │ ├── ResultInvalidHttpException.java │ ├── ServerResultHttpException.java │ ├── TokenInvalidHttpException.java │ └── base │ └── BaseHttpException.java ├── hybrid-core ├── .gitignore ├── README.md ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── assets │ ├── JsBridge.js │ └── hybrid_test.html │ ├── java │ └── com │ │ └── cody │ │ └── component │ │ └── hybrid │ │ ├── H5Exception.java │ │ ├── HtmlViewModel.java │ │ ├── JsBridge.java │ │ ├── OnCreateOptionsListener.java │ │ ├── OnShareListener.java │ │ ├── OnUrlListener.java │ │ ├── activity │ │ └── HtmlActivity.java │ │ ├── core │ │ ├── JsCallback.java │ │ ├── JsCode.java │ │ ├── JsHandler.java │ │ ├── JsHandlerFactory.java │ │ ├── JsInteract.java │ │ ├── JsLifeCycle.java │ │ ├── JsWebChromeClient.java │ │ ├── JsWebViewClient.java │ │ ├── UrlUtil.java │ │ └── async │ │ │ ├── AsyncTaskExecutor.java │ │ │ └── AsyncTaskThreadFactory.java │ │ ├── data │ │ ├── HtmlConfig.java │ │ └── HtmlViewData.java │ │ ├── fragment │ │ └── HtmlFragment.java │ │ └── handler │ │ └── JsHandlerCommonImpl.java │ └── res │ ├── drawable │ └── ic_html_progress.xml │ ├── layout │ ├── fragment_html.xml │ ├── hybrid_friendly_error_view.xml │ └── hybrid_friendly_init_view.xml │ ├── menu │ └── html_menu.xml │ └── values │ └── strings.xml ├── image-core ├── .gitignore ├── README.md ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── cody │ │ └── component │ │ └── image │ │ ├── IImageViewListener.java │ │ ├── ImagePicker.java │ │ ├── ImageViewDelegate.java │ │ ├── OnImageViewListener.java │ │ ├── RatioImageView.java │ │ ├── certificate │ │ ├── camera │ │ │ ├── AutoFocusManager.java │ │ │ ├── CameraActivity.java │ │ │ ├── CameraPreview.java │ │ │ ├── CameraUtils.java │ │ │ └── SensorController.java │ │ ├── cropper │ │ │ ├── CropImageView.java │ │ │ ├── CropListener.java │ │ │ ├── CropOverlayView.java │ │ │ └── CropPosition.java │ │ └── global │ │ │ └── Constant.java │ │ ├── preview │ │ └── ImageActivity.java │ │ └── scan │ │ └── ScanActivity.java │ └── res │ ├── drawable │ ├── ic_cancel.xml │ ├── ic_choose.xml │ ├── ic_flashlight_off.xml │ ├── ic_flashlight_on.xml │ ├── ic_gallery.xml │ ├── ic_rotate.xml │ └── ic_shoot.xml │ ├── layout-land │ └── activity_camera.xml │ ├── layout │ ├── activity_camera.xml │ ├── activity_image.xml │ ├── activity_scan.xml │ └── crop_image_view.xml │ ├── mipmap-xxhdpi │ ├── camera_company.png │ ├── camera_company_landscape.png │ ├── camera_idcard_back.png │ └── camera_idcard_front.png │ └── values │ ├── atrrs.xml │ └── strings.xml ├── lib-core ├── .gitignore ├── README.md ├── build.gradle └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── com │ └── cody │ └── component │ └── lib │ ├── bean │ ├── ListBean.java │ └── Result.java │ ├── exception │ ├── BaseCode.java │ ├── BaseException.java │ └── NotInitializedException.java │ └── view │ └── IView.java ├── marquee-core ├── .gitignore ├── README.md ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── cody │ │ └── component │ │ └── marquee │ │ ├── MarqueeFactory.java │ │ └── MarqueeView.java │ └── res │ └── anim │ ├── core_anim_marquee_in.xml │ └── core_anim_marquee_out.xml ├── settings.gradle ├── structure ├── APP-structure.xmind └── module_structure.png ├── ui-core ├── .gitignore ├── README.md ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ └── res │ ├── drawable-v21 │ ├── bg_primary_rectangle_touch_selector.xml │ ├── bg_primary_round_touch_selector.xml │ ├── bg_secondary_no_boundary_touch_selector.xml │ ├── bg_secondary_rectangle_touch_selector.xml │ ├── bg_secondary_round_touch_selector.xml │ ├── bg_secondary_touch_selector.xml │ ├── bg_third_touch_selector.xml │ ├── bg_transparent_no_boundary_touch_selector.xml │ └── bg_transparent_round_touch_selector.xml │ ├── drawable │ ├── bg_primary_rectangle_touch_selector.xml │ ├── bg_primary_round_touch_selector.xml │ ├── bg_secondary_no_boundary_touch_selector.xml │ ├── bg_secondary_rectangle_touch_selector.xml │ ├── bg_secondary_round_touch_selector.xml │ ├── bg_secondary_touch_selector.xml │ ├── bg_shape_round.xml │ ├── bg_third_touch_selector.xml │ ├── bg_transparent_no_boundary_touch_selector.xml │ ├── bg_transparent_round_touch_selector.xml │ ├── ic_add.xml │ ├── ic_back.xml │ ├── ic_back_white.xml │ ├── ic_bad_network.xml │ ├── ic_close.xml │ ├── ic_default_error.xml │ ├── ic_default_place_holder.xml │ ├── ic_load_failed.xml │ ├── ic_load_failed_selector_for_text_view.xml │ ├── ic_loading_gif.gif │ ├── ic_no_content.xml │ └── ic_share.xml │ └── values │ ├── colors.xml │ ├── default-theme.xml │ ├── dimens.xml │ ├── fonts.xml │ ├── strings.xml │ └── theme.xml ├── update-core ├── .gitignore ├── README.md ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── cody │ │ └── component │ │ └── update │ │ ├── DownloadService.java │ │ ├── UpdateBean.java │ │ ├── UpdateDelegate.java │ │ └── UpdateViewData.java │ └── res │ ├── values │ └── strings.xml │ └── xml │ └── file_paths.xml ├── util-core ├── .gitignore ├── README.md ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── cody │ │ └── component │ │ └── util │ │ ├── ActivityUtil.java │ │ ├── ApplicationUtil.java │ │ ├── CameraUtil.java │ │ ├── DisplayUtil.java │ │ ├── FileUtil.java │ │ ├── ImageUtil.java │ │ ├── LogUtil.java │ │ ├── NotProguard.java │ │ ├── PermissionUtil.java │ │ ├── RecyclerViewUtil.java │ │ ├── ScreenUtil.java │ │ ├── SizeUtil.java │ │ ├── SystemBarUtil.java │ │ ├── ToastUtil.java │ │ ├── TypeUtil.java │ │ └── VersionUtil.java │ └── res │ └── values │ └── util_ids.xml └── versions-update.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/copyright/cody.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/scopes/code.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app-core/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app-core/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * ************************************************************ 3 | * 文件:build.gradle 模块:app-core 项目:component 4 | * 当前修改时间:2019年04月23日 18:23:19 5 | * 上次修改时间:2019年04月23日 18:19:41 6 | * 作者:Cody.yi https://github.com/codyer 7 | * 8 | * 描述:app-core 9 | * Copyright (c) 2019 10 | * ************************************************************ 11 | */ 12 | 13 | apply from: "${project.rootDir}/config-aar.gradle" 14 | dependencies { 15 | api rootProject.ext.dependencies["constraintlayout"] 16 | api rootProject.ext.dependencies["easypermissions"] 17 | api project(':bind-core') 18 | } -------------------------------------------------------------------------------- /app-core/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 | 23 | #不混淆所有类名中包含了“cody”的类及其成员 24 | -keep public class **.*cody*.** {*;} -------------------------------------------------------------------------------- /app-core/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 12 | 13 | -------------------------------------------------------------------------------- /app-core/src/main/java/com/cody/component/app/IBaseListView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ************************************************************ 3 | * 文件:IBaseListView.java 模块:app-core 项目:component 4 | * 当前修改时间:2019年04月23日 18:23:19 5 | * 上次修改时间:2019年04月23日 18:16:18 6 | * 作者:Cody.yi https://github.com/codyer 7 | * 8 | * 描述:app-core 9 | * Copyright (c) 2019 10 | * ************************************************************ 11 | */ 12 | 13 | package com.cody.component.app; 14 | 15 | import androidx.annotation.NonNull; 16 | import androidx.recyclerview.widget.LinearLayoutManager; 17 | import androidx.recyclerview.widget.RecyclerView; 18 | 19 | import com.cody.component.bind.adapter.list.BindingListAdapter; 20 | import com.cody.component.bind.adapter.list.MultiBindingListAdapter; 21 | import com.cody.component.handler.data.ItemViewDataHolder; 22 | import com.cody.component.handler.interfaces.OnRetryListener; 23 | import com.cody.component.handler.interfaces.Scrollable; 24 | 25 | /** 26 | * Created by xu.yi. on 2019/4/10. 27 | * 列表绑定需要实现的接口 28 | */ 29 | public interface IBaseListView extends OnRetryListener, Scrollable { 30 | @NonNull 31 | BindingListAdapter buildListAdapter(); 32 | 33 | @NonNull 34 | BindingListAdapter getListAdapter(); 35 | 36 | @NonNull 37 | LinearLayoutManager buildLayoutManager(); 38 | 39 | @NonNull 40 | RecyclerView getRecyclerView(); 41 | } 42 | -------------------------------------------------------------------------------- /app-core/src/main/java/com/cody/component/app/IBasePageListView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ************************************************************ 3 | * 文件:IBasePageListView.java 模块:app-core 项目:component 4 | * 当前修改时间:2019年07月23日 08:41:20 5 | * 上次修改时间:2019年06月25日 10:52:57 6 | * 作者:Cody.yi https://github.com/codyer 7 | * 8 | * 描述:app-core 9 | * Copyright (c) 2019 10 | * ************************************************************ 11 | */ 12 | 13 | package com.cody.component.app; 14 | 15 | import androidx.annotation.NonNull; 16 | import androidx.recyclerview.widget.LinearLayoutManager; 17 | import androidx.recyclerview.widget.RecyclerView; 18 | 19 | import com.cody.component.bind.adapter.list.BindingPageListAdapter; 20 | import com.cody.component.bind.adapter.list.MultiBindingPageListAdapter; 21 | import com.cody.component.handler.data.ItemViewDataHolder; 22 | import com.cody.component.handler.interfaces.OnRetryListener; 23 | import com.cody.component.handler.interfaces.Scrollable; 24 | 25 | /** 26 | * Created by xu.yi. on 2019/4/10. 27 | * 列表绑定需要实现的接口 28 | */ 29 | public interface IBasePageListView extends OnRetryListener, Scrollable { 30 | @NonNull 31 | BindingPageListAdapter buildListAdapter(); 32 | 33 | @NonNull 34 | BindingPageListAdapter getListAdapter(); 35 | 36 | @NonNull 37 | LinearLayoutManager buildLayoutManager(); 38 | 39 | @NonNull 40 | RecyclerView getRecyclerView(); 41 | } 42 | -------------------------------------------------------------------------------- /app-core/src/main/java/com/cody/component/app/activity/FragmentContainerActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ************************************************************ 3 | * 文件:FragmentContainerActivity.java 模块:app-core 项目:component 4 | * 当前修改时间:2019年04月23日 18:23:19 5 | * 上次修改时间:2019年04月14日 17:02:32 6 | * 作者:Cody.yi https://github.com/codyer 7 | * 8 | * 描述:app-core 9 | * Copyright (c) 2019 10 | * ************************************************************ 11 | */ 12 | 13 | package com.cody.component.app.activity; 14 | 15 | 16 | import androidx.appcompat.widget.Toolbar; 17 | import androidx.fragment.app.Fragment; 18 | 19 | import com.cody.component.app.R; 20 | import com.cody.component.app.databinding.ActivityFragmentContainerBinding; 21 | import com.cody.component.handler.interfaces.Scrollable; 22 | 23 | /** 24 | * 包含返回键和头部 25 | */ 26 | public abstract class FragmentContainerActivity extends BaseFragmentContainerActivity implements Scrollable { 27 | public abstract Fragment getFragment(); 28 | 29 | @Override 30 | protected int getLayoutID() { 31 | return R.layout.activity_fragment_container; 32 | } 33 | 34 | protected Toolbar getToolbar() { 35 | return getBinding().toolbar; 36 | } 37 | 38 | } -------------------------------------------------------------------------------- /app-core/src/main/java/com/cody/component/app/activity/FragmentContainerWithButtonActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ************************************************************ 3 | * 文件:FragmentContainerWithButtonActivity.java 模块:app-core 项目:component 4 | * 当前修改时间:2019年04月23日 18:23:19 5 | * 上次修改时间:2019年04月14日 17:02:32 6 | * 作者:Cody.yi https://github.com/codyer 7 | * 8 | * 描述:app-core 9 | * Copyright (c) 2019 10 | * ************************************************************ 11 | */ 12 | 13 | package com.cody.component.app.activity; 14 | 15 | 16 | import androidx.appcompat.widget.Toolbar; 17 | 18 | import com.cody.component.app.R; 19 | import com.cody.component.app.databinding.ActivityFragmentContainerWithButtonBinding; 20 | import com.cody.component.handler.interfaces.Scrollable; 21 | 22 | /** 23 | * 包含返回键和头部和底部按钮 24 | */ 25 | public abstract class FragmentContainerWithButtonActivity extends BaseFragmentContainerActivity implements Scrollable { 26 | 27 | @Override 28 | protected int getLayoutID() { 29 | return R.layout.activity_fragment_container_with_button; 30 | } 31 | 32 | @Override 33 | protected Toolbar getToolbar() { 34 | return getBinding().toolbar; 35 | } 36 | } -------------------------------------------------------------------------------- /app-core/src/main/java/com/cody/component/app/activity/FragmentContainerWithFabActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ************************************************************ 3 | * 文件:FragmentContainerWithFabActivity.java 模块:app-core 项目:component 4 | * 当前修改时间:2019年04月23日 18:23:19 5 | * 上次修改时间:2019年04月14日 23:43:24 6 | * 作者:Cody.yi https://github.com/codyer 7 | * 8 | * 描述:app-core 9 | * Copyright (c) 2019 10 | * ************************************************************ 11 | */ 12 | 13 | package com.cody.component.app.activity; 14 | 15 | 16 | import androidx.appcompat.widget.Toolbar; 17 | import androidx.fragment.app.Fragment; 18 | 19 | import com.cody.component.app.R; 20 | import com.cody.component.app.databinding.ActivityFragmentContainerWithFabBinding; 21 | import com.cody.component.handler.interfaces.Scrollable; 22 | 23 | /** 24 | * 包含返回键和头部和底部FAB按钮 25 | */ 26 | public abstract class FragmentContainerWithFabActivity extends BaseFragmentContainerActivity implements Scrollable { 27 | public abstract Fragment getFragment(); 28 | 29 | @Override 30 | protected int getLayoutID() { 31 | return R.layout.activity_fragment_container_with_fab; 32 | } 33 | 34 | @Override 35 | protected Toolbar getToolbar() { 36 | return getBinding().toolbar; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app-core/src/main/java/com/cody/component/app/activity/StaticActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ************************************************************ 3 | * 文件:StaticActivity.java 模块:app-core 项目:component 4 | * 当前修改时间:2019年04月23日 18:23:19 5 | * 上次修改时间:2019年04月13日 08:43:55 6 | * 作者:Cody.yi https://github.com/codyer 7 | * 8 | * 描述:app-core 9 | * Copyright (c) 2019 10 | * ************************************************************ 11 | */ 12 | 13 | package com.cody.component.app.activity; 14 | 15 | import androidx.databinding.ViewDataBinding; 16 | 17 | /** 18 | * Created by xu.yi. on 2019/3/25. 19 | * 不需要绑定viewData 页面静态 无需要绑定数据 20 | */ 21 | public abstract class StaticActivity extends BaseBindActivity { 22 | @Override 23 | protected void bindViewData() { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app-core/src/main/java/com/cody/component/app/fragment/StaticFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ************************************************************ 3 | * 文件:StaticFragment.java 模块:app-core 项目:component 4 | * 当前修改时间:2019年04月23日 18:23:19 5 | * 上次修改时间:2019年04月13日 08:43:55 6 | * 作者:Cody.yi https://github.com/codyer 7 | * 8 | * 描述:app-core 9 | * Copyright (c) 2019 10 | * ************************************************************ 11 | */ 12 | 13 | package com.cody.component.app.fragment; 14 | 15 | import androidx.databinding.ViewDataBinding; 16 | 17 | /** 18 | * Created by xu.yi. on 2019/3/25. 19 | * 不需要绑定viewData 页面静态 无需要绑定数据 20 | */ 21 | public abstract class StaticFragment extends BaseBindFragment { 22 | @Override 23 | protected void bindViewData() { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app-core/src/main/java/com/cody/component/app/local/BaseLocalKey.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ************************************************************ 3 | * 文件:BaseLocalKey.java 模块:app-core 项目:component 4 | * 当前修改时间:2019年05月06日 14:20:35 5 | * 上次修改时间:2019年05月06日 13:13:31 6 | * 作者:Cody.yi https://github.com/codyer 7 | * 8 | * 描述:app-core 9 | * Copyright (c) 2019 10 | * ************************************************************ 11 | */ 12 | 13 | package com.cody.component.app.local; 14 | 15 | /** 16 | * Created by cody.yi on 2019/3/30. 17 | * 本地数据存储 18 | * 目前只提供sharePreference方式 19 | */ 20 | public interface BaseLocalKey { 21 | String BASE = "BS_"; 22 | String VERSION_CODE = BASE + "version_code"; 23 | String COOKIE = BASE + "cookie"; 24 | String TOKEN = BASE + "token"; 25 | String DEVICE_ID = "device_id";//设备唯一号 26 | String CITY_NAME = "cityName";// 城市名称 27 | String CITY_CODE = "cityCode";// 城市code 28 | } -------------------------------------------------------------------------------- /app-core/src/main/res/anim/ani_backward_enter.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app-core/src/main/res/anim/ani_backward_exit.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app-core/src/main/res/anim/ani_forward_enter.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app-core/src/main/res/anim/ani_forward_exit.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app-core/src/main/res/anim/ani_swipeback_enter.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app-core/src/main/res/anim/ani_swipeback_exit.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app-core/src/main/res/drawable/bg_shadow_line.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codyer/component/3e81bc0c1ffefbc7f16089ced155b5568b049e75/app-core/src/main/res/drawable/bg_shadow_line.9.png -------------------------------------------------------------------------------- /app-core/src/main/res/drawable/swipeback_shadow.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codyer/component/3e81bc0c1ffefbc7f16089ced155b5568b049e75/app-core/src/main/res/drawable/swipeback_shadow.9.png -------------------------------------------------------------------------------- /app-core/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | 发现新版本 16 | 申请权限成功! 17 | 缺少权限! 18 | 版本更新中 19 | 下载中 - 20 | 更新进度:0/100 21 | 立即更新 22 | 以后再说 23 | 下载完成! 24 | 下载进度:%1$s/%2$s 25 | 请打开未知来源权限设置 26 | -------------------------------------------------------------------------------- /app-core/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | 28 | -------------------------------------------------------------------------------- /app-demo/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /bugly 3 | -------------------------------------------------------------------------------- /app-demo/keystore.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codyer/component/3e81bc0c1ffefbc7f16089ced155b5568b049e75/app-demo/keystore.jks -------------------------------------------------------------------------------- /app-demo/signing.properties: -------------------------------------------------------------------------------- 1 | # 2 | # ************************************************************* 3 | # 文件:signing.properties 模块:app 项目:component 4 | # 当前修改时间:2019年04月23日 18:23:19 5 | # 上次修改时间:2019年04月13日 09:19:28 6 | # 作者:Cody.yi https://github.com/codyer 7 | # 8 | # 描述:app 9 | # Copyright (c) 2019 10 | # ************************************************************* 11 | # 12 | 13 | # 你的keystore文件位置 14 | KEYSTORE_FILE=keystore.jks 15 | # 你的keystore文件密码 16 | KEYSTORE_PASSWORD=cody_password 17 | # 你的keystore文件用到的别名 18 | KEY_ALIAS=cody_alias 19 | # 你的keystore文件用到的别名的密码 20 | KEY_PASSWORD=cody_password -------------------------------------------------------------------------------- /app-demo/src/main/java/com/cody/component/demo/bean/TestBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ************************************************************ 3 | * 文件:TestBean.java 模块:app 项目:component 4 | * 当前修改时间:2019年04月23日 18:23:19 5 | * 上次修改时间:2019年04月13日 08:43:54 6 | * 作者:Cody.yi https://github.com/codyer 7 | * 8 | * 描述:app 9 | * Copyright (c) 2019 10 | * ************************************************************ 11 | */ 12 | 13 | package com.cody.component.demo.bean; 14 | 15 | import androidx.annotation.NonNull; 16 | 17 | /** 18 | * Created by xu.yi. on 2019/4/3. 19 | * LiveEventBus 20 | */ 21 | public class TestBean { 22 | private String name; 23 | private String code; 24 | 25 | @NonNull 26 | @Override 27 | public String toString() { 28 | String sb = "TestDataBean{" + "name='" + name + '\'' + 29 | ", code='" + code + '\'' + 30 | '}'; 31 | return sb; 32 | } 33 | 34 | public TestBean(String name, String code) { 35 | this.name = name; 36 | this.code = code; 37 | } 38 | 39 | public String getName() { 40 | return name; 41 | } 42 | 43 | public void setName(String name) { 44 | this.name = name; 45 | } 46 | 47 | public String getCode() { 48 | return code; 49 | } 50 | 51 | public void setCode(String code) { 52 | this.code = code; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app-demo/src/main/java/com/cody/component/demo/bean/TestDataBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ************************************************************ 3 | * 文件:TestDataBean.java 模块:app 项目:component 4 | * 当前修改时间:2019年04月23日 18:23:19 5 | * 上次修改时间:2019年04月13日 08:43:55 6 | * 作者:Cody.yi https://github.com/codyer 7 | * 8 | * 描述:app 9 | * Copyright (c) 2019 10 | * ************************************************************ 11 | */ 12 | 13 | package com.cody.component.demo.bean; 14 | 15 | /** 16 | * Created by xu.yi. on 2019/4/7. 17 | * component 18 | */ 19 | public class TestDataBean { 20 | final String thing; 21 | 22 | public TestDataBean(String thing) { 23 | this.thing = thing; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app-demo/src/main/java/com/cody/component/demo/bus/AppDemo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ************************************************************ 3 | * 文件:AppDemo.java 模块:app-demo 项目:component 4 | * 当前修改时间:2021年02月27日 15:30:04 5 | * 上次修改时间:2021年02月27日 15:05:41 6 | * 作者:Cody.yi https://github.com/codyer 7 | * 8 | * 描述:app-demo 9 | * Copyright (c) 2021 10 | * ************************************************************ 11 | */ 12 | 13 | package com.cody.component.demo.bus; 14 | 15 | import com.cody.component.demo.bean.TestBean; 16 | 17 | import cody.bus.annotation.Event; 18 | import cody.bus.annotation.EventGroup; 19 | 20 | /** 21 | * Created by xu.yi. on 2019/4/3. 22 | * LiveEventBus 23 | */ 24 | @EventGroup(name = "DemoGroup", active = true) 25 | public class AppDemo { 26 | @Event(description = "定义一个测试事件") 27 | String testString; 28 | @Event(description = "定义一个测试事件测试对象", multiProcess = true) 29 | TestBean testBean; 30 | } 31 | -------------------------------------------------------------------------------- /app-demo/src/main/java/com/cody/component/demo/data/CatApiOpen.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ************************************************************ 3 | * 文件:CatApiOpen.java 模块:app 项目:component 4 | * 当前修改时间:2019年04月23日 18:23:19 5 | * 上次修改时间:2019年04月13日 08:43:55 6 | * 作者:Cody.yi https://github.com/codyer 7 | * 8 | * 描述:app 9 | * Copyright (c) 2019 10 | * ************************************************************ 11 | */ 12 | 13 | package com.cody.component.demo.data; 14 | 15 | import com.cody.component.http.lib.annotation.Domain; 16 | 17 | import io.reactivex.Observable; 18 | import retrofit2.http.GET; 19 | import retrofit2.http.Headers; 20 | 21 | /** 22 | * Created by xu.yi. on 2019/4/7. 23 | * component 24 | */ 25 | @Domain("https://api.apiopen.top") 26 | public interface CatApiOpen { 27 | 28 | @GET("/singlePoetry") 29 | @Headers({"testHeader" + ":" + "singlePoetry"}) 30 | Observable singlePoetry(); 31 | 32 | @GET("/recommendPoetry") 33 | @Headers({"testHeader" + ":" + "recommendPoetry"}) 34 | Observable recommendPoetry(); 35 | 36 | @GET("/musicBroadcasting") 37 | @Headers({"testHeader" + ":" + "musicBroadcasting"}) 38 | Observable musicBroadcasting(); 39 | 40 | @GET("/novelApi") 41 | @Headers({"testHeader" + ":" + "novelApi"}) 42 | Observable novelApi(); 43 | } 44 | -------------------------------------------------------------------------------- /app-demo/src/main/java/com/cody/component/demo/list/ListTestActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ************************************************************ 3 | * 文件:ListTestActivity.java 模块:app 项目:component 4 | * 当前修改时间:2019年04月23日 18:23:19 5 | * 上次修改时间:2019年04月14日 16:08:30 6 | * 作者:Cody.yi https://github.com/codyer 7 | * 8 | * 描述:app 9 | * Copyright (c) 2019 10 | * ************************************************************ 11 | */ 12 | 13 | package com.cody.component.demo.list; 14 | 15 | import android.view.View; 16 | 17 | import com.cody.component.app.activity.FragmentContainerActivity; 18 | 19 | import androidx.fragment.app.Fragment; 20 | 21 | public class ListTestActivity extends FragmentContainerActivity { 22 | 23 | @Override 24 | public Fragment getFragment() { 25 | return new PageListTestFragment(); 26 | } 27 | 28 | @Override 29 | public void onClick(final View v) { 30 | 31 | } 32 | 33 | @Override 34 | public void scrollToTop() { 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app-demo/src/main/java/com/cody/component/demo/repository/Account.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ************************************************************ 3 | * 文件:Account.java 模块:app 项目:component 4 | * 当前修改时间:2019年04月23日 18:23:19 5 | * 上次修改时间:2019年04月13日 08:43:55 6 | * 作者:Cody.yi https://github.com/codyer 7 | * 8 | * 描述:app 9 | * Copyright (c) 2019 10 | * ************************************************************ 11 | */ 12 | 13 | package com.cody.component.demo.repository; 14 | 15 | import com.cody.component.http.lib.annotation.Domain; 16 | import com.cody.component.lib.bean.Result; 17 | 18 | import java.util.List; 19 | 20 | import io.reactivex.Observable; 21 | import retrofit2.http.GET; 22 | import retrofit2.http.Query; 23 | 24 | /** 25 | * 26 | */ 27 | @Domain("https://www.jianshu.com/") 28 | public interface Account { 29 | 30 | @GET("onebox/weather/query") 31 | Observable> queryWeather(@Query("cityname") String cityName); 32 | 33 | @GET("qrcode/api") 34 | Observable> createQrCode(@Query("text") String text, @Query("w") int width); 35 | 36 | @GET("toutiao/index") 37 | Observable> getNews(); 38 | 39 | @GET("toutiao/index") 40 | Observable>> getNewList(); 41 | 42 | @GET("leavesC/test1") 43 | Observable> test1(); 44 | 45 | @GET("leavesC/test2") 46 | Observable> test2(); 47 | 48 | } 49 | -------------------------------------------------------------------------------- /app-demo/src/main/java/com/cody/component/demo/repository/IAccountDataSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ************************************************************ 3 | * 文件:IAccountDataSource.java 模块:app 项目:component 4 | * 当前修改时间:2019年04月23日 18:23:19 5 | * 上次修改时间:2019年04月13日 08:43:54 6 | * 作者:Cody.yi https://github.com/codyer 7 | * 8 | * 描述:app 9 | * Copyright (c) 2019 10 | * ************************************************************ 11 | */ 12 | 13 | package com.cody.component.demo.repository; 14 | 15 | 16 | import com.cody.component.http.callback.RequestCallback; 17 | 18 | /** 19 | * 自动生成,不要修改 20 | */ 21 | public interface IAccountDataSource { 22 | 23 | void queryWeather(String cityName, RequestCallback callback); 24 | 25 | void createQrCode(String text, int width, RequestCallback callback); 26 | 27 | void getNews(RequestCallback callback); 28 | 29 | void test1(RequestCallback callback); 30 | 31 | void test2(RequestCallback callback); 32 | } 33 | -------------------------------------------------------------------------------- /app-demo/src/main/java/com/cody/component/demo/repository/QrCode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ************************************************************ 3 | * 文件:QrCode.java 模块:app 项目:component 4 | * 当前修改时间:2019年04月23日 18:23:19 5 | * 上次修改时间:2019年04月13日 08:43:54 6 | * 作者:Cody.yi https://github.com/codyer 7 | * 8 | * 描述:app 9 | * Copyright (c) 2019 10 | * ************************************************************ 11 | */ 12 | 13 | package com.cody.component.demo.repository; 14 | 15 | import android.graphics.Bitmap; 16 | 17 | /** 18 | * 作者:leavesC 19 | * 时间:2018/10/29 21:22 20 | * 描述: 21 | * GitHub:https://github.com/leavesC 22 | * Blog:https://www.jianshu.com/u/9df45b87cfdf 23 | */ 24 | public class QrCode { 25 | 26 | private String base64_image; 27 | 28 | private Bitmap bitmap; 29 | 30 | public String getBase64_image() { 31 | return base64_image; 32 | } 33 | 34 | public void setBase64_image(String base64_image) { 35 | this.base64_image = base64_image; 36 | } 37 | 38 | public Bitmap getBitmap() { 39 | return bitmap; 40 | } 41 | 42 | public void setBitmap(Bitmap bitmap) { 43 | this.bitmap = bitmap; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /app-demo/src/main/res/drawable/ic_shape_red_round_button.xml: -------------------------------------------------------------------------------- 1 | 11 | 12 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /app-demo/src/main/res/drawable/img_update_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codyer/component/3e81bc0c1ffefbc7f16089ced155b5568b049e75/app-demo/src/main/res/drawable/img_update_top.png -------------------------------------------------------------------------------- /app-demo/src/main/res/layout/content_scrolling.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 22 | 23 | 29 | 30 | -------------------------------------------------------------------------------- /app-demo/src/main/res/menu/menu_demo.xml: -------------------------------------------------------------------------------- 1 | 12 | 13 | 17 | 22 | 23 | -------------------------------------------------------------------------------- /app-demo/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /app-demo/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /app-demo/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codyer/component/3e81bc0c1ffefbc7f16089ced155b5568b049e75/app-demo/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app-demo/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codyer/component/3e81bc0c1ffefbc7f16089ced155b5568b049e75/app-demo/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app-demo/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codyer/component/3e81bc0c1ffefbc7f16089ced155b5568b049e75/app-demo/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app-demo/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codyer/component/3e81bc0c1ffefbc7f16089ced155b5568b049e75/app-demo/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app-demo/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codyer/component/3e81bc0c1ffefbc7f16089ced155b5568b049e75/app-demo/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app-demo/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codyer/component/3e81bc0c1ffefbc7f16089ced155b5568b049e75/app-demo/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app-demo/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codyer/component/3e81bc0c1ffefbc7f16089ced155b5568b049e75/app-demo/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app-demo/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codyer/component/3e81bc0c1ffefbc7f16089ced155b5568b049e75/app-demo/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app-demo/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codyer/component/3e81bc0c1ffefbc7f16089ced155b5568b049e75/app-demo/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app-demo/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codyer/component/3e81bc0c1ffefbc7f16089ced155b5568b049e75/app-demo/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app-demo/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 23 | 20 | -------------------------------------------------------------------------------- /update-core/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /update-core/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * ************************************************************ 3 | * 文件:build.gradle 模块:bind-update 项目:component 4 | * 当前修改时间:2019年05月31日 15:57:18 5 | * 上次修改时间:2019年04月26日 22:46:37 6 | * 作者:Cody.yi https://github.com/codyer 7 | * 8 | * 描述:bind-update 9 | * Copyright (c) 2019 10 | * ************************************************************ 11 | */ 12 | 13 | apply from: "${project.rootDir}/config-aar.gradle" 14 | dependencies { 15 | api project(':app-core') 16 | } -------------------------------------------------------------------------------- /update-core/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 | 23 | #不混淆所有类名中包含了“cody”的类及其成员 24 | -keep public class **.*cody*.** {*;} -------------------------------------------------------------------------------- /update-core/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 12 | 13 | 15 | 16 | 17 | 18 | 19 | 20 | 25 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /update-core/src/main/java/com/cody/component/update/UpdateBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ************************************************************ 3 | * 文件:UpdateBean.java 模块:bind-update 项目:component 4 | * 当前修改时间:2019年05月31日 15:56:34 5 | * 上次修改时间:2019年04月26日 22:46:37 6 | * 作者:Cody.yi https://github.com/codyer 7 | * 8 | * 描述:bind-update 9 | * Copyright (c) 2019 10 | * ************************************************************ 11 | */ 12 | 13 | package com.cody.component.update; 14 | 15 | /** 16 | * Created by cody.yi on 2017/5/5. 17 | * App 版本信息 18 | * 检查更新接口使用 19 | */ 20 | public class UpdateBean { 21 | /** 22 | * id : 77 23 | * type : Android 24 | * downloadUrl : https://www.app.com/ftpupload/app-release.apk 25 | * latestVersion : 2.0.0 26 | * lowestVersion : 1.2.0 27 | * isForcedUpdate : true 28 | * isNeedUpdate : true 29 | * userSide : app 30 | * apkName : cody-app 31 | * updateInfo : 更新了用户信息界操作逻辑 32 | * market : 应用宝 33 | * createDate : 1493800434000 34 | * updateDate : 1493800322000 35 | */ 36 | public String type; 37 | public String downloadUrl; 38 | public String latestVersion; 39 | public String lowestVersion; 40 | public boolean isForcedUpdate; 41 | public boolean isNeedUpdate; 42 | public String userSide; 43 | public String apkName; 44 | public String updateInfo; 45 | public String market; 46 | public long createDate; 47 | public long updateDate; 48 | } 49 | -------------------------------------------------------------------------------- /update-core/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | component 16 | -------------------------------------------------------------------------------- /update-core/src/main/res/xml/file_paths.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | 18 | 21 | 24 | 27 | 30 | 31 | -------------------------------------------------------------------------------- /util-core/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /util-core/build.gradle: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * ************************************************************ 4 | * 文件:build.gradle 模块:util-core 项目:component 5 | * 当前修改时间:2019年04月23日 18:23:20 6 | * 上次修改时间:2019年04月13日 08:44:03 7 | * 作者:Cody.yi https://github.com/codyer 8 | * 9 | * 描述:util-core 10 | * Copyright (c) 2019 11 | * ************************************************************ 12 | */ 13 | 14 | apply from: "${project.rootDir}/config-aar.gradle" 15 | dependencies { 16 | api rootProject.ext.dependencies["appcompat"] 17 | api rootProject.ext.dependencies["paging"] 18 | } 19 | -------------------------------------------------------------------------------- /util-core/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 | 23 | #不混淆所有类名中包含了“cody”的类及其成员 24 | -keep public class **.*cody*.** {*;} -------------------------------------------------------------------------------- /util-core/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 12 | 13 | -------------------------------------------------------------------------------- /util-core/src/main/java/com/cody/component/util/ApplicationUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ************************************************************ 3 | * 文件:ApplicationUtil.java 模块:util-core 项目:component 4 | * 当前修改时间:2019年06月18日 09:26:58 5 | * 上次修改时间:2019年06月18日 09:26:58 6 | * 作者:Cody.yi https://github.com/codyer 7 | * 8 | * 描述:util-core 9 | * Copyright (c) 2019 10 | * ************************************************************ 11 | */ 12 | 13 | package com.cody.component.util; 14 | 15 | import android.app.Application; 16 | 17 | /** 18 | * Created by xu.yi. on 2019-06-18. 19 | * component holder application 20 | */ 21 | public class ApplicationUtil { 22 | private static Application sApplication; 23 | 24 | public static void install(Application application) { 25 | sApplication = application; 26 | } 27 | 28 | public static Application getApplication() { 29 | if (sApplication == null){ 30 | throw new NullPointerException("You should call ApplicationUtil.install() in you application first!"); 31 | } 32 | return sApplication; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /util-core/src/main/java/com/cody/component/util/NotProguard.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ************************************************************ 3 | * 文件:NotProguard.java 模块:util-core 项目:component 4 | * 当前修改时间:2019年04月23日 18:23:20 5 | * 上次修改时间:2019年04月13日 08:44:03 6 | * 作者:Cody.yi https://github.com/codyer 7 | * 8 | * 描述:util-core 9 | * Copyright (c) 2019 10 | * ************************************************************ 11 | */ 12 | 13 | package com.cody.component.util; 14 | 15 | import java.lang.annotation.ElementType; 16 | import java.lang.annotation.Retention; 17 | import java.lang.annotation.RetentionPolicy; 18 | import java.lang.annotation.Target; 19 | 20 | /** 21 | * NotProguard, Means not proguard something, like class, method, field
22 | * 23 | * @author Trinea 2015-08-07 24 | */ 25 | @Retention(RetentionPolicy.CLASS) 26 | @Target({ElementType.TYPE, ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.FIELD}) 27 | public @interface NotProguard { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /util-core/src/main/java/com/cody/component/util/ScreenUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ************************************************************ 3 | * 文件:ScreenUtil.java 模块:util-core 项目:component 4 | * 当前修改时间:2019年04月26日 13:33:35 5 | * 上次修改时间:2019年04月23日 18:23:20 6 | * 作者:Cody.yi https://github.com/codyer 7 | * 8 | * 描述:util-core 9 | * Copyright (c) 2019 10 | * ************************************************************ 11 | */ 12 | 13 | package com.cody.component.util; 14 | 15 | import android.content.Context; 16 | 17 | /** 18 | * Desc ${屏幕相关工具类} 19 | */ 20 | public class ScreenUtil { 21 | 22 | /** 23 | * 获取屏幕宽度(px) 24 | */ 25 | public static int getScreenWidth(Context context) { 26 | return context.getResources().getDisplayMetrics().widthPixels; 27 | } 28 | 29 | /** 30 | * 获取屏幕高度(px) 31 | */ 32 | public static int getScreenHeight(Context context) { 33 | return context.getResources().getDisplayMetrics().heightPixels; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /util-core/src/main/java/com/cody/component/util/SizeUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ************************************************************ 3 | * 文件:SizeUtil.java 模块:util-core 项目:component 4 | * 当前修改时间:2019年04月23日 18:23:20 5 | * 上次修改时间:2019年04月21日 22:20:27 6 | * 作者:Cody.yi https://github.com/codyer 7 | * 8 | * 描述:util-core 9 | * Copyright (c) 2019 10 | * ************************************************************ 11 | */ 12 | 13 | package com.cody.component.util; 14 | 15 | import java.text.DecimalFormat; 16 | 17 | /** 18 | * Created by xu.yi. on 2019/4/21. 19 | * component 20 | */ 21 | public class SizeUtil { 22 | private static final double BASE = 1024, KB = BASE, MB = KB * BASE, GB = MB * BASE, TB = GB * BASE; 23 | private static final DecimalFormat df = new DecimalFormat("#.##"); 24 | 25 | public static String formatSize(double size) { 26 | if (size >= TB) { 27 | return df.format(size / TB) + " TB"; 28 | } 29 | if (size >= GB) { 30 | return df.format(size / GB) + " GB"; 31 | } 32 | if (size >= MB) { 33 | return df.format(size / MB) + " MB"; 34 | } 35 | if (size >= KB) { 36 | return df.format(size / KB) + " KB"; 37 | } 38 | return "" + (int) size + " bytes"; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /util-core/src/main/java/com/cody/component/util/TypeUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ************************************************************ 3 | * 文件:TypeUtil.java 模块:util-core 项目:component 4 | * 当前修改时间:2019年11月05日 10:44:26 5 | * 上次修改时间:2019年11月05日 10:44:26 6 | * 作者:Cody.yi https://github.com/codyer 7 | * 8 | * 描述:util-core 9 | * Copyright (c) 2019 10 | * ************************************************************ 11 | */ 12 | 13 | package com.cody.component.util; 14 | 15 | import androidx.annotation.NonNull; 16 | 17 | import java.lang.reflect.ParameterizedType; 18 | import java.lang.reflect.Type; 19 | 20 | /** 21 | * Created by xu.yi. on 2019-11-05. 22 | * component 23 | */ 24 | public class TypeUtil { 25 | 26 | /** 27 | * 获取组合类类型 28 | */ 29 | public static ParameterizedType getType(final Class raw, final Type... args) { 30 | return new ParameterizedType() { 31 | @NonNull 32 | public Type getRawType() { 33 | return raw; 34 | } 35 | 36 | @NonNull 37 | public Type[] getActualTypeArguments() { 38 | return args; 39 | } 40 | 41 | public Type getOwnerType() { 42 | return null; 43 | } 44 | }; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /util-core/src/main/res/values/util_ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | 16 | 17 | --------------------------------------------------------------------------------