├── .gitignore ├── .idea ├── codeStyles │ ├── Project.xml │ └── codeStyleConfig.xml ├── compiler.xml ├── gradle.xml ├── jarRepositories.xml ├── misc.xml ├── runConfigurations.xml └── vcs.xml ├── LICENSE ├── README.md ├── app ├── .gitignore ├── build.gradle ├── jacoco.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── youngmanster │ │ └── collectionkotlin │ │ └── ExampleInstrumentedTest.kt │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── youngmanster │ │ └── collectionkotlin │ │ ├── activity │ │ ├── MainActivity.kt │ │ ├── base │ │ │ ├── BaseUiActivity.kt │ │ │ ├── DialogActivity.kt │ │ │ ├── PermissionActivity.kt │ │ │ └── StateViewActivity.kt │ │ ├── baseadapter │ │ │ ├── BaseAdapterActivity.kt │ │ │ ├── DragAndDeleteActivity.kt │ │ │ ├── ExpandRecyclerViewActivity.kt │ │ │ ├── ItemClickActivity.kt │ │ │ ├── MultipleItemActivity.kt │ │ │ └── holder │ │ │ │ ├── DiscountFirstVH.kt │ │ │ │ ├── DiscountSecondVH.kt │ │ │ │ ├── ExpandItem.kt │ │ │ │ └── ExpandItem1.kt │ │ ├── customview │ │ │ ├── CommonLayoutStyleFourActivity.kt │ │ │ ├── CommonLayoutStyleOneActivity.kt │ │ │ ├── CommonLayoutStyleSevenActivity.kt │ │ │ ├── CommonLayoutStyleSixActivity.kt │ │ │ ├── CommonLayoutStyleThreeActivity.kt │ │ │ ├── CommonLayoutStyleTwoActivity.kt │ │ │ ├── CommonTaLayoutStyleFiveActivity.kt │ │ │ ├── CommonTabLayoutActivity.kt │ │ │ ├── CustomViewActivity.kt │ │ │ ├── OutSideFrameTabLayoutActivity.kt │ │ │ ├── OutSideFrameTabLayoutOneActivity.kt │ │ │ ├── OutSideFrameTabLayoutTwoActivity.kt │ │ │ ├── TagViewActivity.kt │ │ │ └── WrapLinearLayoutActivity.kt │ │ ├── data │ │ │ ├── DataManagerActivity.kt │ │ │ ├── dialog │ │ │ │ └── CustomizeDialog.kt │ │ │ └── popup │ │ │ │ ├── PopupMenuActivity.kt │ │ │ │ ├── PopupMenuList.kt │ │ │ │ ├── PopupSlideBottom.kt │ │ │ │ ├── PopupSlideButton.kt │ │ │ │ ├── PopupTip.kt │ │ │ │ └── PopupWindowDemoActivity.kt │ │ ├── download │ │ │ └── DownFileActivity.kt │ │ ├── fragment │ │ │ └── FragmentActivity.kt │ │ ├── mvp │ │ │ ├── MVPActivity.kt │ │ │ ├── WeChatFeaturedActivity.kt │ │ │ └── WeChatNewsDefinitionActivity.kt │ │ ├── recyclerview │ │ │ ├── HeaderAndEmptyViewActivity.kt │ │ │ ├── NoMoreDateAndAutoRefreshActivity.kt │ │ │ ├── RecyclerViewActivity.kt │ │ │ └── RefreshActivity.kt │ │ └── status │ │ │ ├── ChangeStatusBarActivity.kt │ │ │ ├── StatusBarColorActivity.kt │ │ │ └── TransparentStatusBarActivity.kt │ │ ├── adapter │ │ ├── MainViewAdapter.kt │ │ ├── baseadapter │ │ │ ├── DragAndDeleteAdapter.kt │ │ │ ├── ExpandRecyclerAdapter.kt │ │ │ ├── ItemClickAdapter.kt │ │ │ └── MultipleAdapter.kt │ │ ├── customview │ │ │ └── CustomTabPagerAdapter.kt │ │ ├── data │ │ │ ├── ItemRecycleAdapter.kt │ │ │ └── PopupMenuListAdapter.kt │ │ ├── mvp │ │ │ └── WeChatFeaturedAdapter.kt │ │ └── recyclerview │ │ │ ├── CollectionFragmentAdapter.kt │ │ │ ├── DefaultRecyclerAdapter.kt │ │ │ ├── DefinitionRecyclerAdapter.kt │ │ │ ├── GoogleRefreshAdapter.kt │ │ │ └── PullToRecyclerViewAdapter.kt │ │ ├── base │ │ ├── BaseActivity.kt │ │ └── BaseFragment.kt │ │ ├── bean │ │ ├── ClickItem.kt │ │ ├── HttpResult.kt │ │ ├── MultiItem.kt │ │ ├── User.kt │ │ ├── WeChatNews.kt │ │ └── WeChatNewsResult.kt │ │ ├── common │ │ ├── ApiUrl.kt │ │ ├── AppApplication.kt │ │ └── AppConfig.kt │ │ ├── fragment │ │ ├── customview │ │ │ └── ChildFragment.kt │ │ ├── data │ │ │ ├── FragmentSharePreference.kt │ │ │ └── FragmentSqlite.kt │ │ ├── mvp │ │ │ ├── FragmentChinaNewsDefinition.kt │ │ │ ├── FragmentWeChatFeaturedCommonClass.kt │ │ │ ├── FragmentWeChatFeaturedNoCommonClass.kt │ │ │ └── FragmentWorldNewsDefinition.kt │ │ ├── recyclerview │ │ │ ├── FragmentAddHeader.kt │ │ │ ├── FragmentAutoRefresh.kt │ │ │ ├── FragmentDefaultRefreshAndLoading.kt │ │ │ ├── FragmentDefinitionRefreshAndLoading.kt │ │ │ ├── FragmentEmptyView.kt │ │ │ ├── FragmentGoogleRefreshAndLoading.kt │ │ │ └── FragmentNoMoreData.kt │ │ └── skip │ │ │ ├── SkipFragment.kt │ │ │ └── SkipFragment2.kt │ │ ├── mvp │ │ ├── presenter │ │ │ ├── DownloadFilePresenter.kt │ │ │ ├── WeChatChinaNewsDefinitionPresenter.kt │ │ │ ├── WeChatFeaturedNoCommonClassPresenter.kt │ │ │ ├── WeChatFeaturedPresenter.kt │ │ │ └── WeChatWorldNewsDefinitionPresenter.kt │ │ └── view │ │ │ ├── IDownloadFileView.kt │ │ │ ├── IWeChatChinaNewsDefinitionView.kt │ │ │ ├── IWeChatFeaturedNoCommonClassView.kt │ │ │ ├── IWeChatFeaturedView.kt │ │ │ └── IWeChatWorldNewsDefinitionView.kt │ │ └── view │ │ ├── DefinitionAnimationLoadMoreView.kt │ │ └── DefinitionAnimationRefreshHeaderView.kt │ ├── res-night │ └── values │ │ └── colors.xml │ └── res │ ├── anim │ ├── back_animation_one.xml │ ├── back_animation_two.xml │ ├── scale_tip_in.xml │ ├── scale_tip_out.xml │ ├── slide_bottom_in.xml │ ├── slide_bottom_out.xml │ ├── sun_animation.xml │ └── wheel_animation.xml │ ├── drawable-v24 │ └── ic_launcher_foreground.xml │ ├── drawable │ ├── ic_launcher_background.xml │ ├── loading_bottom.xml │ ├── selector_tab_home.xml │ └── shape_item_click.xml │ ├── layout │ ├── activity_change_statusbar.xml │ ├── activity_color_statusbar.xml │ ├── activity_custom_outsideframetablayout_one.xml │ ├── activity_custom_outsideframetablayout_two.xml │ ├── activity_custom_tablayout_five.xml │ ├── activity_custom_tablayout_four.xml │ ├── activity_custom_tablayout_one.xml │ ├── activity_custom_tablayout_seven.xml │ ├── activity_custom_tablayout_six.xml │ ├── activity_custom_tablayout_three.xml │ ├── activity_custom_tablayout_two.xml │ ├── activity_dialog.xml │ ├── activity_downlaod.xml │ ├── activity_fragment_skip.xml │ ├── activity_main.xml │ ├── activity_permission.xml │ ├── activity_popup_list.xml │ ├── activity_popupwindow.xml │ ├── activity_pull_refresh.xml │ ├── activity_refresh.xml │ ├── activity_state_view.xml │ ├── activity_tagview.xml │ ├── activity_test.xml │ ├── activity_transparent_statusbar.xml │ ├── activity_wechat_featured.xml │ ├── activity_wrap_linear.xml │ ├── custom_tab_view.xml │ ├── dialog_list.xml │ ├── fragment_addheader_empty.xml │ ├── fragment_child.xml │ ├── fragment_default_refresh.xml │ ├── fragment_google_refresh.xml │ ├── fragment_nomore_auto.xml │ ├── fragment_sharepreference.xml │ ├── fragment_skip.xml │ ├── fragment_skip2.xml │ ├── fragment_sqlite.xml │ ├── fragment_wechat_news.xml │ ├── fragment_wechat_news1.xml │ ├── item_click.xml │ ├── item_img.xml │ ├── item_layout.xml │ ├── item_main.xml │ ├── item_popup.xml │ ├── item_pull_refresh.xml │ ├── item_wechat_featured.xml │ ├── layout_ad_dialog.xml │ ├── layout_base_adapter_header.xml │ ├── layout_bottom_up.xml │ ├── layout_definition_animation_loading_more.xml │ ├── layout_definition_animation_refresh.xml │ ├── layout_empty.xml │ ├── layout_main_header.xml │ ├── layout_network_header.xml │ ├── layout_recyclerview.xml │ ├── layout_state.xml │ ├── popup_menu_list.xml │ ├── popup_slide_bottom.xml │ ├── popup_slide_button.xml │ ├── popup_tip.xml │ ├── rv_item_discount_first.xml │ └── rv_item_discount_second.xml │ ├── mipmap-anydpi-v26 │ ├── ic_launcher.xml │ └── ic_launcher_round.xml │ ├── mipmap-hdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-mdpi │ ├── header.jpg │ ├── ic_cancel_popup.png │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-xhdpi │ ├── ic_back_btn.png │ ├── ic_baseadapter.png │ ├── ic_bttom_loading_01.png │ ├── ic_bttom_loading_02.png │ ├── ic_launcher.png │ ├── ic_launcher_round.png │ ├── icon_network_header.png │ ├── pull_back.png │ ├── pull_rider.png │ ├── pull_sun.png │ ├── pull_wheel.png │ ├── tab_home_select.png │ └── tab_home_unselect.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 ├── build.gradle ├── collection-kotlin ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── youngmanster │ │ └── collection_kotlin │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ ├── androidx │ │ │ └── appcompat │ │ │ │ └── app │ │ │ │ └── SkinAppCompatDelegateImpl.java │ │ └── com │ │ │ └── youngmanster │ │ │ └── collection_kotlin │ │ │ ├── base │ │ │ ├── baseview │ │ │ │ ├── ICommonActivity.kt │ │ │ │ ├── ICommonFragment.kt │ │ │ │ └── ResultCode.java │ │ │ ├── customview │ │ │ │ ├── CollectionViewPager.java │ │ │ │ ├── tablayout │ │ │ │ │ ├── CommonTabLayout.java │ │ │ │ │ ├── OnTabSelectListener.java │ │ │ │ │ └── OutSideFrameTabLayout.java │ │ │ │ ├── tagview │ │ │ │ │ ├── TagView.kt │ │ │ │ │ ├── TagViewConfigBuilder.kt │ │ │ │ │ └── layout │ │ │ │ │ │ ├── AlignContent.java │ │ │ │ │ │ ├── AlignItems.java │ │ │ │ │ │ ├── AlignSelf.java │ │ │ │ │ │ ├── FlexContainer.java │ │ │ │ │ │ ├── FlexDirection.java │ │ │ │ │ │ ├── FlexItem.java │ │ │ │ │ │ ├── FlexLine.java │ │ │ │ │ │ ├── FlexWrap.java │ │ │ │ │ │ ├── FlexboxHelper.java │ │ │ │ │ │ ├── FlexboxLayout.java │ │ │ │ │ │ └── JustifyContent.java │ │ │ │ └── wraplayout │ │ │ │ │ └── AutoLineLayout.kt │ │ │ ├── dialog │ │ │ │ ├── BaseDialog.kt │ │ │ │ ├── BaseDialogFragment.kt │ │ │ │ ├── BasePopupWindow.kt │ │ │ │ ├── CommonDialog.kt │ │ │ │ ├── DialogWrapper.kt │ │ │ │ ├── IDialog.kt │ │ │ │ ├── NoLeakDialog.java │ │ │ │ ├── YYBaseDialog.kt │ │ │ │ ├── YYDialog.kt │ │ │ │ ├── YYDialogController.kt │ │ │ │ └── YYDialogsManager.kt │ │ │ ├── manager │ │ │ │ └── AppManager.kt │ │ │ ├── set │ │ │ │ ├── LinkedMultiValueMap.java │ │ │ │ └── MultiValueMap.java │ │ │ └── stateview │ │ │ │ └── StateView.kt │ │ │ ├── config │ │ │ ├── Config.kt │ │ │ └── moudle │ │ │ │ ├── IModuleInit.kt │ │ │ │ ├── ModuleLifecycleConfig.java │ │ │ │ └── ModuleLifecycleReflexs.java │ │ │ ├── data │ │ │ ├── DataManager.kt │ │ │ ├── MMKVWithLocalData.kt │ │ │ ├── SharePreference.kt │ │ │ └── database │ │ │ │ ├── Column.java │ │ │ │ ├── ColumnInfo.java │ │ │ │ ├── DBTransaction.kt │ │ │ │ ├── DateUtils.kt │ │ │ │ ├── DbSQLite.kt │ │ │ │ ├── PagingList.kt │ │ │ │ ├── ResultSet.kt │ │ │ │ ├── SQLiteDataBase.kt │ │ │ │ ├── SQLiteVersionMigrate.kt │ │ │ │ └── SqlHelper.kt │ │ │ ├── mvp │ │ │ ├── BasePresenter.kt │ │ │ ├── BaseView.kt │ │ │ ├── ClassGetUtil.kt │ │ │ ├── IBaseActivity.kt │ │ │ └── IBaseFragment.kt │ │ │ ├── mvvm │ │ │ ├── application │ │ │ │ └── BaseApplication.kt │ │ │ ├── base │ │ │ │ ├── IMVVMBaseActivity.kt │ │ │ │ └── IMVVMBaseFragment.kt │ │ │ ├── command │ │ │ │ ├── BindingAction.kt │ │ │ │ └── BindingCommand.kt │ │ │ ├── liveData │ │ │ │ └── SingleLiveEvent.kt │ │ │ ├── mode │ │ │ │ ├── BaseModel.kt │ │ │ │ └── IModel.kt │ │ │ ├── view │ │ │ │ └── ViewAdapter.kt │ │ │ └── viewmode │ │ │ │ ├── BaseViewModel.kt │ │ │ │ └── IBaseViewModel.kt │ │ │ ├── network │ │ │ ├── NetWorkCodeException.kt │ │ │ ├── RequestBuilder.java │ │ │ ├── RequestManager.java │ │ │ ├── RequestService.java │ │ │ ├── RetrofitManager.kt │ │ │ ├── convert │ │ │ │ ├── ConvertParamUtils.java │ │ │ │ ├── GsonUtils.java │ │ │ │ ├── ParameterizedTypeImpl.java │ │ │ │ └── SetterExclusionStrategy.java │ │ │ ├── download │ │ │ │ ├── DownloadFileHelper.java │ │ │ │ ├── DownloadInfo.java │ │ │ │ └── DownloadProgressBody.java │ │ │ ├── interceptor │ │ │ │ └── BasicParamsInterceptor.java │ │ │ ├── progress │ │ │ │ └── UploadProgressBody.java │ │ │ ├── request │ │ │ │ ├── RequestMethod.java │ │ │ │ └── RequestMethodImpl.java │ │ │ ├── rx │ │ │ │ ├── ObservableListener.kt │ │ │ │ ├── RxManager.kt │ │ │ │ ├── RxObservableListener.kt │ │ │ │ ├── RxSchedulers.java │ │ │ │ ├── RxSubscriber.java │ │ │ │ └── utils │ │ │ │ │ ├── BaseSubscriber.java │ │ │ │ │ ├── IExceptionHandler.java │ │ │ │ │ ├── IRxIOTask.java │ │ │ │ │ ├── IRxUITask.java │ │ │ │ │ ├── RxAsyncTask.java │ │ │ │ │ ├── RxException.java │ │ │ │ │ ├── RxExceptionHandler.java │ │ │ │ │ ├── RxIOTask.java │ │ │ │ │ ├── RxIteratorTask.java │ │ │ │ │ ├── RxJavaUtils.java │ │ │ │ │ ├── RxSchedulerUtils.java │ │ │ │ │ ├── RxTaskOnSubscribe.java │ │ │ │ │ ├── RxUITask.java │ │ │ │ │ ├── SchedulerTransformer.java │ │ │ │ │ ├── SchedulerType.java │ │ │ │ │ └── SimpleThrowableAction.java │ │ │ └── synchronization │ │ │ │ └── OkHttpUtils.java │ │ │ ├── permission │ │ │ └── PermissionManager.java │ │ │ ├── recyclerview │ │ │ ├── BaseLoadMoreView.java │ │ │ ├── BaseMultiItemEntity.kt │ │ │ ├── BasePullToRefreshView.java │ │ │ ├── BaseRecycleItemTouchHelper.java │ │ │ ├── BaseRecyclerViewAdapter.kt │ │ │ ├── BaseRecyclerViewMultiItemAdapter.kt │ │ │ ├── BaseViewHolder.java │ │ │ ├── DefaultArrowRefreshHeaderView.java │ │ │ ├── DefaultLoadMoreView.java │ │ │ ├── LoadingTextConfig.kt │ │ │ ├── PullToRefreshRecyclerView.java │ │ │ ├── PullToRefreshRecyclerViewUtils.java │ │ │ └── tree │ │ │ │ ├── TreeItem.java │ │ │ │ ├── base │ │ │ │ ├── BaseMultipleAdapter.java │ │ │ │ ├── BaseTreeAdapter.java │ │ │ │ └── Tree.java │ │ │ │ └── exception │ │ │ │ └── StopMsgException.java │ │ │ ├── screenadaptation │ │ │ ├── CancelAdapt.java │ │ │ └── Density.java │ │ │ ├── theme │ │ │ ├── Inflater │ │ │ │ ├── SkinAndroidXViewInflater.java │ │ │ │ ├── SkinAppCompatViewInflater.java │ │ │ │ ├── SkinCompatDelegate.java │ │ │ │ ├── SkinCompatViewInflater.java │ │ │ │ ├── SkinCustomViewInflater.java │ │ │ │ ├── SkinLayoutInflater.java │ │ │ │ └── SkinWrapper.java │ │ │ ├── SkinActivityLifecycle.java │ │ │ ├── ThemeManager.java │ │ │ ├── annotation │ │ │ │ └── Skinable.java │ │ │ ├── customview │ │ │ │ ├── SkinOutSideTabLayoutView.java │ │ │ │ ├── SkinStateView.java │ │ │ │ └── SkinTabLayoutView.java │ │ │ ├── exception │ │ │ │ └── SkinCompatException.java │ │ │ ├── load │ │ │ │ ├── SkinBuildInLoader.java │ │ │ │ └── SkinNoneLoader.java │ │ │ ├── material │ │ │ │ ├── SkinMaterialAppBarLayout.java │ │ │ │ ├── SkinMaterialBottomNavigationView.java │ │ │ │ ├── SkinMaterialCollapsingToolbarLayout.java │ │ │ │ ├── SkinMaterialCoordinatorLayout.java │ │ │ │ ├── SkinMaterialFloatingActionButton.java │ │ │ │ ├── SkinMaterialNavigationView.java │ │ │ │ ├── SkinMaterialTabLayout.java │ │ │ │ ├── SkinMaterialTextInputEditText.java │ │ │ │ ├── SkinMaterialTextInputLayout.java │ │ │ │ └── SkinMaterialViewInflater.java │ │ │ ├── observe │ │ │ │ ├── SkinObservable.java │ │ │ │ └── SkinObserver.java │ │ │ ├── res │ │ │ │ ├── ColorState.java │ │ │ │ ├── SkinCompatDrawableManager.java │ │ │ │ ├── SkinCompatResources.java │ │ │ │ ├── SkinCompatUserThemeManager.java │ │ │ │ ├── SkinCompatVectorResources.java │ │ │ │ └── SkinResources.java │ │ │ ├── utils │ │ │ │ ├── ImageUtils.java │ │ │ │ ├── SkinCompatDrawableUtils.java │ │ │ │ ├── SkinCompatThemeUtils.java │ │ │ │ ├── SkinCompatV7ThemeUtils.java │ │ │ │ ├── SkinCompatVersionUtils.java │ │ │ │ ├── SkinConstants.java │ │ │ │ └── Slog.java │ │ │ └── widget │ │ │ │ ├── SkinCompatAutoCompleteTextView.java │ │ │ │ ├── SkinCompatBackgroundHelper.java │ │ │ │ ├── SkinCompatButton.java │ │ │ │ ├── SkinCompatCardView.java │ │ │ │ ├── SkinCompatCheckBox.java │ │ │ │ ├── SkinCompatCheckedTextView.java │ │ │ │ ├── SkinCompatCompoundButtonHelper.java │ │ │ │ ├── SkinCompatEditText.java │ │ │ │ ├── SkinCompatFrameLayout.java │ │ │ │ ├── SkinCompatHelper.java │ │ │ │ ├── SkinCompatImageButton.java │ │ │ │ ├── SkinCompatImageHelper.java │ │ │ │ ├── SkinCompatImageView.java │ │ │ │ ├── SkinCompatLinearLayout.java │ │ │ │ ├── SkinCompatMultiAutoCompleteTextView.java │ │ │ │ ├── SkinCompatProgressBar.java │ │ │ │ ├── SkinCompatProgressBarHelper.java │ │ │ │ ├── SkinCompatRadioButton.java │ │ │ │ ├── SkinCompatRadioGroup.java │ │ │ │ ├── SkinCompatRatingBar.java │ │ │ │ ├── SkinCompatRelativeLayout.java │ │ │ │ ├── SkinCompatScrollView.java │ │ │ │ ├── SkinCompatSeekBar.java │ │ │ │ ├── SkinCompatSeekBarHelper.java │ │ │ │ ├── SkinCompatSpinner.java │ │ │ │ ├── SkinCompatSupportable.java │ │ │ │ ├── SkinCompatTextHelper.java │ │ │ │ ├── SkinCompatTextHelperV17.java │ │ │ │ ├── SkinCompatTextView.java │ │ │ │ ├── SkinCompatToolbar.java │ │ │ │ ├── SkinCompatView.java │ │ │ │ ├── SkinCompatViewGroup.java │ │ │ │ ├── SkinConstraintLayoutView.java │ │ │ │ └── SkinNetScrollView.java │ │ │ └── utils │ │ │ ├── AreaUtils.java │ │ │ ├── ColorUtils.java │ │ │ ├── DisplayUtils.kt │ │ │ ├── FileUtils.java │ │ │ ├── GetPermissionsUtils.kt │ │ │ ├── GlideUtils.kt │ │ │ ├── LogUtils.java │ │ │ ├── MatchUtils.kt │ │ │ ├── NetworkUtils.java │ │ │ ├── SoftInputUtils.kt │ │ │ ├── ThreadPoolManager.kt │ │ │ ├── ToastUtils.kt │ │ │ └── aes │ │ │ ├── AESUtil.java │ │ │ └── Base64.java │ └── res │ │ ├── anim │ │ ├── alpha_in.xml │ │ ├── alpha_out.xml │ │ ├── push_left_in.xml │ │ ├── push_right_out.xml │ │ ├── slide_left_in.xml │ │ ├── slide_left_out.xml │ │ ├── slide_right_in.xml │ │ └── slide_right_out.xml │ │ ├── drawable-v21 │ │ └── ripple_bg.xml │ │ ├── drawable │ │ ├── btn_assuere_border_bg_nol.xml │ │ ├── btn_assuere_border_bg_sel.xml │ │ ├── btn_cancel_border_bg_nol.xml │ │ ├── btn_cancel_border_bg_sel.xml │ │ ├── collection_library_selector_tagview.xml │ │ ├── collection_library_shape_tagview.xml │ │ ├── collection_library_shape_tagview_slector.xml │ │ ├── lib_ui_btn_border_bg_nol.xml │ │ ├── lib_ui_btn_border_bg_sel.xml │ │ ├── lib_ui_roundlayout.xml │ │ ├── lib_ui_selector_btn_border_bg.xml │ │ ├── lift_on_touch.xml │ │ ├── selector_btn_assuere_border_bg.xml │ │ └── selector_btn_cancel_border_bg.xml │ │ ├── layout │ │ ├── collection_library_default_base_activity.xml │ │ ├── collection_library_default_base_fragment.xml │ │ ├── collection_library_default_common_toolbar.xml │ │ ├── collection_library_design_layout_tab_icon.xml │ │ ├── collection_library_design_layout_tab_text.xml │ │ ├── collection_library_dialog_progress.xml │ │ ├── collection_library_dialog_title_text_two_button.xml │ │ ├── collection_library_layout_default_arrow_refresh.xml │ │ ├── collection_library_layout_default_loading_more.xml │ │ ├── collection_library_view_disconnect.xml │ │ ├── collection_library_view_empty.xml │ │ ├── collection_library_view_loading.xml │ │ └── lib_ui_layout_dialog_default.xml │ │ ├── mipmap-xhdpi │ │ ├── collection_library_ic_bttom_loading_01.png │ │ ├── collection_library_icon_disconnect.png │ │ ├── collection_library_icon_refresh_arrow.png │ │ └── ic_launcher_round.png │ │ ├── values-en │ │ └── strings.xml │ │ ├── values-zh-rTW │ │ └── strings.xml │ │ ├── values │ │ ├── attrs.xml │ │ ├── colors.xml │ │ ├── ids.xml │ │ ├── strings.xml │ │ └── styles.xml │ │ └── xml │ │ └── network_security_config.xml │ └── test │ └── java │ └── com │ └── youngmanster │ └── collection_kotlin │ └── ExampleUnitTest.kt ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 22 | 23 | -------------------------------------------------------------------------------- /.idea/jarRepositories.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 14 | 15 | 19 | 20 | 24 | 25 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 YongEver 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/jacoco.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'jacoco' 2 | jacoco { 3 | toolVersion = "0.8.5" //指定jacoco的版本 4 | reportsDir = file("$buildDir/JacocoReport") //指定jacoco生成报告的文件夹 5 | } 6 | 7 | tasks.withType(Test) { 8 | jacoco.includeNoLocationClasses = true 9 | } 10 | 11 | android { 12 | buildTypes { 13 | beta { 14 | //打开覆盖率统计开关 15 | testCoverageEnabled = true 16 | } 17 | } 18 | } 19 | 20 | //依赖于testDebugUnitTest任务 21 | task jacocoTestReport(type: JacocoReport, dependsOn: 'testDebugUnitTest') { 22 | group = "reporting" //指定task的分组 23 | reports { 24 | xml.enabled = true //开启xml报告 25 | html.enabled = true //开启html报告 26 | } 27 | 28 | //过滤的路径 29 | def fileFilters = [ 30 | '**/R.class', 31 | '**/R$*.class', 32 | '**/BuildConfig.*', 33 | '**/Manifest*.*', 34 | 'com/android/**/*.class' 35 | ] 36 | //需要统计的class地址 37 | def javaDebugTree = fileTree(dir: "${buildDir}/intermediates/javac/debug", excludes: fileFilters) 38 | def kotlinDebugTree = fileTree(dir: "${buildDir}/tmp/kotlin-classes/debug", excludes: fileFilters) 39 | 40 | //需要统计的源码地址 41 | sourceDirectories = files(['src/main/java']) 42 | classDirectories = files([javaDebugTree, kotlinDebugTree]) 43 | //结果文件 44 | executionData = files("${buildDir}/jacoco/testDebugUnitTest.exec") 45 | } 46 | 47 | -------------------------------------------------------------------------------- /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/youngmanster/collectionkotlin/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.runner.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("com.youngmanster.collection", appContext.packageName) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/activity/baseadapter/holder/DiscountFirstVH.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.activity.baseadapter.holder 2 | 3 | import android.view.View 4 | import android.widget.TextView 5 | import androidx.recyclerview.widget.RecyclerView 6 | import com.youngmanster.collectionkotlin.R 7 | 8 | /** 9 | * Created by yangy 10 | *2021/1/8 11 | *Describe: 12 | */ 13 | class DiscountFirstVH: RecyclerView.ViewHolder { 14 | 15 | var tvName:TextView?=null 16 | 17 | constructor(itemView: View):super(itemView){ 18 | initView() 19 | } 20 | 21 | 22 | private fun initView(){ 23 | tvName=itemView.findViewById(R.id.tv_name) 24 | } 25 | 26 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/activity/baseadapter/holder/DiscountSecondVH.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.activity.baseadapter.holder 2 | 3 | import android.view.View 4 | import android.widget.TextView 5 | import androidx.recyclerview.widget.RecyclerView 6 | import com.youngmanster.collectionkotlin.R 7 | 8 | /** 9 | * Created by yangy 10 | *2021/1/8 11 | *Describe: 12 | */ 13 | class DiscountSecondVH: RecyclerView.ViewHolder { 14 | 15 | var tvName:TextView?=null 16 | 17 | constructor(itemView: View):super(itemView){ 18 | initView() 19 | } 20 | 21 | 22 | private fun initView(){ 23 | tvName=itemView.findViewById(R.id.tv_name) 24 | } 25 | 26 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/activity/baseadapter/holder/ExpandItem.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.activity.baseadapter.holder 2 | 3 | import com.youngmanster.collection_kotlin.recyclerview.tree.TreeItem 4 | import java.util.ArrayList 5 | 6 | /** 7 | * Created by yangy 8 | *2021/1/8 9 | *Describe: 10 | */ 11 | class ExpandItem:TreeItem() { 12 | 13 | 14 | override fun getLevel(): Int { 15 | return 0 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/activity/baseadapter/holder/ExpandItem1.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.activity.baseadapter.holder 2 | 3 | import com.youngmanster.collection_kotlin.recyclerview.tree.TreeItem 4 | import java.util.ArrayList 5 | 6 | /** 7 | * Created by yangy 8 | *2021/1/8 9 | *Describe: 10 | */ 11 | class ExpandItem1:TreeItem() { 12 | 13 | override fun getLevel(): Int { 14 | return 1 15 | } 16 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/activity/customview/WrapLinearLayoutActivity.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.activity.customview 2 | 3 | import com.youngmanster.collection_kotlin.mvp.BasePresenter 4 | import com.youngmanster.collectionkotlin.R 5 | import com.youngmanster.collectionkotlin.base.BaseActivity 6 | 7 | /** 8 | * Created by yangy 9 | *2020-02-23 10 | *Describe: 11 | */ 12 | 13 | class WrapLinearLayoutActivity :BaseActivity>(){ 14 | override fun getLayoutId(): Int { 15 | return R.layout.activity_wrap_linear 16 | } 17 | 18 | override fun init() { 19 | defineActionBarConfig.setTitle("AutoLineLayout") 20 | } 21 | 22 | override fun requestData() { 23 | } 24 | 25 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/activity/data/popup/PopupMenuActivity.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.activity.data.popup 2 | 3 | import android.view.View 4 | import com.youngmanster.collection_kotlin.mvp.BasePresenter 5 | import com.youngmanster.collectionkotlin.R 6 | import com.youngmanster.collectionkotlin.base.BaseActivity 7 | import kotlinx.android.synthetic.main.activity_popup_list.* 8 | 9 | /** 10 | * Created by yangy 11 | *2020-02-23 12 | *Describe: 13 | */ 14 | 15 | class PopupMenuActivity :BaseActivity>(),View.OnClickListener{ 16 | override fun getLayoutId(): Int { 17 | return R.layout.activity_popup_list 18 | } 19 | 20 | override fun init() { 21 | defineActionBarConfig.setTitle(getString(R.string.popup_title)) 22 | 23 | clickLl.setOnClickListener(this) 24 | } 25 | 26 | override fun requestData() { 27 | } 28 | 29 | override fun onClick(v: View?) { 30 | val popupMenuList = PopupMenuList(this) 31 | popupMenuList.showPopupAsDropDown(clickLl) 32 | } 33 | 34 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/activity/data/popup/PopupSlideBottom.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.activity.data.popup 2 | 3 | import android.content.Context 4 | import com.youngmanster.collection_kotlin.base.dialog.BasePopupWindow 5 | import com.youngmanster.collectionkotlin.R 6 | 7 | /** 8 | * Created by yangy 9 | *2020-02-23 10 | *Describe: 11 | */ 12 | 13 | class PopupSlideBottom(context: Context) : BasePopupWindow(context) { 14 | override fun getPopupLayoutRes(): Int { 15 | return R.layout.popup_slide_bottom 16 | } 17 | 18 | override fun getPopupAnimationStyleRes(): Int { 19 | return R.style.animation_bottom 20 | } 21 | 22 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/activity/data/popup/PopupSlideButton.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.activity.data.popup 2 | 3 | import android.content.Context 4 | import android.view.ViewGroup 5 | import com.youngmanster.collection_kotlin.base.dialog.BasePopupWindow 6 | import com.youngmanster.collectionkotlin.R 7 | 8 | /** 9 | * Created by yangy 10 | *2020-02-23 11 | *Describe: 12 | */ 13 | 14 | class PopupSlideButton : BasePopupWindow { 15 | 16 | constructor(context: Context):super(context, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT){ 17 | setShowMaskView(false) 18 | } 19 | 20 | override fun getPopupLayoutRes(): Int { 21 | return R.layout.popup_slide_button 22 | } 23 | 24 | override fun getPopupAnimationStyleRes(): Int { 25 | return 0 26 | } 27 | 28 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/activity/data/popup/PopupTip.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.activity.data.popup 2 | 3 | import android.content.Context 4 | import android.view.ViewGroup 5 | import com.youngmanster.collection_kotlin.base.dialog.BasePopupWindow 6 | import com.youngmanster.collectionkotlin.R 7 | 8 | /** 9 | * Created by yangy 10 | *2020-02-23 11 | *Describe: 12 | */ 13 | 14 | class PopupTip :BasePopupWindow{ 15 | override fun getPopupLayoutRes(): Int { 16 | return R.layout.popup_tip 17 | } 18 | 19 | override fun getPopupAnimationStyleRes(): Int { 20 | return R.style.animation_scale 21 | } 22 | 23 | constructor(context:Context):super(context, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT){ 24 | setShowMaskView(false) 25 | } 26 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/activity/fragment/FragmentActivity.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.activity.fragment 2 | 3 | import com.youngmanster.collection_kotlin.mvp.BasePresenter 4 | import com.youngmanster.collection_kotlin.utils.LogUtils 5 | import com.youngmanster.collectionkotlin.R 6 | import com.youngmanster.collectionkotlin.base.BaseActivity 7 | import com.youngmanster.collectionkotlin.fragment.skip.SkipFragment 8 | 9 | /** 10 | * Created by yangy 11 | *2020/5/21 12 | *Describe: 13 | */ 14 | class FragmentActivity:BaseActivity>() { 15 | override fun getLayoutId(): Int { 16 | return R.layout.activity_fragment_skip 17 | } 18 | 19 | override fun init() { 20 | defineActionBarConfig.setTitle("Fragment页面跳转") 21 | startFragment(SkipFragment::class.java) 22 | } 23 | 24 | override fun requestData() { 25 | } 26 | 27 | 28 | override fun fragmentLayoutId(): Int { 29 | return R.id.root 30 | } 31 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/adapter/baseadapter/DragAndDeleteAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.adapter.baseadapter 2 | 3 | import android.content.Context 4 | import androidx.cardview.widget.CardView 5 | import com.youngmanster.collection_kotlin.recyclerview.BaseRecyclerViewAdapter 6 | import com.youngmanster.collection_kotlin.recyclerview.BaseViewHolder 7 | import com.youngmanster.collection_kotlin.utils.DisplayUtils 8 | import com.youngmanster.collectionkotlin.R 9 | 10 | /** 11 | * Created by yangy 12 | *2020-02-22 13 | *Describe: 14 | */ 15 | class DragAndDeleteAdapter(mContext: Context, mLayoutResId: Int, mDatas: ArrayList) : 16 | BaseRecyclerViewAdapter(mContext, mLayoutResId, mDatas) { 17 | 18 | private var mHeight: Int=0 19 | 20 | init { 21 | mHeight = DisplayUtils.dip2px(100f) 22 | } 23 | 24 | override fun convert(baseViewHolder: BaseViewHolder, t: String) { 25 | baseViewHolder.setText(R.id.title, t) 26 | baseViewHolder.getView(R.id.card_view).layoutParams.height = mHeight 27 | } 28 | 29 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/adapter/baseadapter/ItemClickAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.adapter.baseadapter 2 | 3 | import android.content.Context 4 | import android.view.View 5 | import android.widget.TextView 6 | import com.youngmanster.collection_kotlin.recyclerview.BaseRecyclerViewAdapter 7 | import com.youngmanster.collection_kotlin.recyclerview.BaseViewHolder 8 | import com.youngmanster.collectionkotlin.R 9 | import com.youngmanster.collectionkotlin.bean.ClickItem 10 | 11 | /** 12 | * Created by yangy 13 | *2020-02-22 14 | *Describe: 15 | */ 16 | 17 | class ItemClickAdapter(mContext: Context, mLayoutResId: Int, mDatas: ArrayList,onClickListener: View.OnClickListener) : 18 | BaseRecyclerViewAdapter(mContext, mLayoutResId, mDatas) { 19 | 20 | private var onClickListener: View.OnClickListener?=null 21 | 22 | init { 23 | this.onClickListener = onClickListener 24 | } 25 | 26 | override fun convert(baseViewHolder: BaseViewHolder, t: ClickItem) { 27 | baseViewHolder.setText(R.id.titleTv, t.title) 28 | .setImageResource(R.id.ivImg, t.res) 29 | .setOnClickListener(R.id.clickTv, onClickListener) 30 | 31 | baseViewHolder.getView(R.id.clickTv).visibility = View.VISIBLE 32 | } 33 | 34 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/adapter/customview/CustomTabPagerAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.adapter.customview 2 | 3 | import android.annotation.SuppressLint 4 | import androidx.fragment.app.Fragment 5 | import androidx.fragment.app.FragmentManager 6 | import androidx.fragment.app.FragmentPagerAdapter 7 | 8 | /** 9 | * Created by yangy 10 | *2020-02-23 11 | *Describe: 12 | */ 13 | 14 | class CustomTabPagerAdapter:FragmentPagerAdapter{ 15 | private var fragmentList: List?=null 16 | private var titleList: List?=null 17 | 18 | @SuppressLint("WrongConstant") 19 | constructor(fm: FragmentManager, fragmentList:List, titleList: ArrayList):super(fm, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT){ 20 | this.fragmentList = fragmentList 21 | this.titleList=titleList 22 | } 23 | 24 | override fun getCount(): Int { 25 | return fragmentList?.size!! 26 | } 27 | 28 | override fun getItem(position: Int): Fragment { 29 | return fragmentList?.get(position)!! 30 | } 31 | 32 | override fun getPageTitle(position: Int): CharSequence? { 33 | return titleList?.get(position) 34 | } 35 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/adapter/data/ItemRecycleAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.adapter.data 2 | 3 | import android.content.Context 4 | import com.youngmanster.collection_kotlin.recyclerview.BaseRecyclerViewAdapter 5 | import com.youngmanster.collection_kotlin.recyclerview.BaseViewHolder 6 | import com.youngmanster.collectionkotlin.R 7 | 8 | /** 9 | * Created by yangy 10 | *2020-02-23 11 | *Describe: 12 | */ 13 | 14 | class ItemRecycleAdapter(mContext: Context, mLayoutResId: Int, mDatas: ArrayList) : 15 | BaseRecyclerViewAdapter(mContext, mLayoutResId, mDatas) { 16 | 17 | override fun convert(baseViewHolder: BaseViewHolder, t: String) { 18 | baseViewHolder.setText(R.id.tv_Label, t) 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/adapter/data/PopupMenuListAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.adapter.data 2 | 3 | import android.content.Context 4 | import com.youngmanster.collection_kotlin.recyclerview.BaseRecyclerViewAdapter 5 | import com.youngmanster.collection_kotlin.recyclerview.BaseViewHolder 6 | import com.youngmanster.collectionkotlin.R 7 | 8 | /** 9 | * Created by yangy 10 | *2020-02-23 11 | *Describe: 12 | */ 13 | 14 | class PopupMenuListAdapter(mContext: Context, mLayoutResId: Int, mDatas: ArrayList) : 15 | BaseRecyclerViewAdapter(mContext, mLayoutResId, mDatas) { 16 | 17 | override fun convert(baseViewHolder: BaseViewHolder, t: String) { 18 | baseViewHolder.setText(R.id.tvTxt, t) 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/adapter/recyclerview/CollectionFragmentAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.adapter.recyclerview 2 | 3 | import android.annotation.SuppressLint 4 | import androidx.fragment.app.Fragment 5 | import androidx.fragment.app.FragmentManager 6 | import androidx.fragment.app.FragmentPagerAdapter 7 | 8 | /** 9 | * Created by yangy 10 | *2020-02-21 11 | *Describe: 12 | */ 13 | class CollectionFragmentAdapter: 14 | FragmentPagerAdapter{ 15 | 16 | private var fragmentList: List?=null 17 | private var titleList: List?=null 18 | 19 | @SuppressLint("WrongConstant") 20 | constructor(fm: FragmentManager, fragmentList:List, titleList: List):super(fm, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT){ 21 | this.fragmentList = fragmentList 22 | this.titleList=titleList 23 | } 24 | 25 | override fun getCount(): Int { 26 | return fragmentList?.size!! 27 | } 28 | 29 | override fun getItem(position: Int): Fragment { 30 | return fragmentList?.get(position)!! 31 | } 32 | 33 | override fun getPageTitle(position: Int): CharSequence? { 34 | return titleList?.get(position) 35 | } 36 | 37 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/adapter/recyclerview/DefinitionRecyclerAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.adapter.recyclerview 2 | 3 | import android.content.Context 4 | import com.youngmanster.collection_kotlin.recyclerview.BaseRecyclerViewAdapter 5 | import com.youngmanster.collection_kotlin.recyclerview.BaseViewHolder 6 | import com.youngmanster.collection_kotlin.recyclerview.PullToRefreshRecyclerView 7 | import com.youngmanster.collectionkotlin.R 8 | 9 | /** 10 | * Created by yangy 11 | *2020-02-21 12 | *Describe: 13 | */ 14 | 15 | class DefinitionRecyclerAdapter( 16 | mContext: Context, 17 | mLayoutResId: Int, 18 | mDatas: ArrayList, 19 | pullToRefreshRecyclerView: PullToRefreshRecyclerView 20 | ) : BaseRecyclerViewAdapter(mContext, mLayoutResId, mDatas, pullToRefreshRecyclerView) { 21 | 22 | override fun convert(baseViewHolder: BaseViewHolder, t: String) { 23 | baseViewHolder.setText(R.id.title, t) 24 | } 25 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/adapter/recyclerview/PullToRecyclerViewAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.adapter.recyclerview 2 | 3 | import android.content.Context 4 | import com.youngmanster.collection_kotlin.recyclerview.BaseRecyclerViewAdapter 5 | import com.youngmanster.collectionkotlin.R 6 | import com.youngmanster.collection_kotlin.recyclerview.BaseViewHolder 7 | import com.youngmanster.collection_kotlin.recyclerview.PullToRefreshRecyclerView 8 | 9 | /** 10 | * Created by yangy 11 | *2020-02-21 12 | *Describe: 13 | */ 14 | 15 | class PullToRecyclerViewAdapter( 16 | mContext: Context, 17 | mLayoutResId: Int, 18 | mDatas: ArrayList, 19 | pullToRefreshRecyclerView: PullToRefreshRecyclerView 20 | ) : BaseRecyclerViewAdapter(mContext, mLayoutResId, mDatas, pullToRefreshRecyclerView) { 21 | 22 | 23 | override fun convert(baseViewHolder: BaseViewHolder, t: String) { 24 | baseViewHolder.setText(R.id.title, t) 25 | } 26 | 27 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/base/BaseActivity.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.base 2 | 3 | import android.os.Bundle 4 | import android.view.View 5 | import com.youngmanster.collectionkotlin.R 6 | 7 | import com.youngmanster.collection_kotlin.mvp.BasePresenter 8 | import com.youngmanster.collection_kotlin.mvp.IBaseActivity 9 | 10 | /** 11 | * Created by yangy 12 | *2020-02-21 13 | *Describe: 14 | */ 15 | 16 | abstract class BaseActivity> : IBaseActivity() { 17 | 18 | 19 | override fun onCreate(savedInstanceState: Bundle?) { 20 | super.onCreate(savedInstanceState) 21 | defineActionBarConfig 22 | .setBarBackground(R.color.colorPrimaryDark) 23 | .setTitleColor(R.color.white) 24 | .setBackIcon(R.mipmap.ic_back_btn) 25 | .setBackClick(View.OnClickListener { 26 | onBackPressed() 27 | }) 28 | 29 | } 30 | 31 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/base/BaseFragment.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.base 2 | 3 | import android.os.Bundle 4 | import com.youngmanster.collection_kotlin.mvp.BasePresenter 5 | import com.youngmanster.collection_kotlin.mvp.IBaseFragment 6 | 7 | /** 8 | * Created by yangy 9 | *2020-02-21 10 | *Describe: 11 | */ 12 | 13 | abstract class BaseFragment>: IBaseFragment(){ 14 | 15 | override fun onActivityCreated(savedInstanceState: Bundle?) { 16 | super.onActivityCreated(savedInstanceState) 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/bean/ClickItem.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.bean 2 | 3 | /** 4 | * Created by yangy 5 | *2020-02-22 6 | *Describe: 7 | */ 8 | class ClickItem{ 9 | var title: String? = "" 10 | var res: Int = 0 11 | 12 | 13 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/bean/HttpResult.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.bean 2 | 3 | import java.io.Serializable 4 | 5 | /** 6 | * Created by yangy 7 | *2020-02-20 8 | *Describe: 9 | */ 10 | 11 | class HttpResult : Serializable { 12 | var code: Int = 0 13 | var message: String? = null 14 | var result: T? = null 15 | var data: T? = null 16 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/bean/MultiItem.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.bean 2 | 3 | import com.youngmanster.collection_kotlin.recyclerview.BaseMultiItemEntity 4 | 5 | /** 6 | * Created by yangy 7 | *2020-02-22 8 | *Describe: 9 | */ 10 | 11 | class MultiItem:BaseMultiItemEntity{ 12 | 13 | companion object{ 14 | const val TYPE_TEXT = 1 15 | const val TYPE_IMG = 2 16 | const val TYPE_TEXT_IMG = 3 17 | } 18 | 19 | var title: String? = null 20 | var res: Int = 0 21 | var type: Int = 0 22 | 23 | override fun getItemViewType(): Int { 24 | return type 25 | } 26 | 27 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/bean/User.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.bean 2 | 3 | import com.youngmanster.collection_kotlin.data.database.Column 4 | 5 | /** 6 | * Created by yangy 7 | *2020-02-24 8 | *Describe: 9 | */ 10 | class User{ 11 | @Column(isPrimaryKey = true) 12 | var id:Int=0 13 | var name:String?="你好" 14 | var age:Int?=0 15 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/bean/WeChatNews.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.bean 2 | 3 | /** 4 | * Created by yangy 5 | *2020-02-20 6 | *Describe: 7 | */ 8 | 9 | class WeChatNews { 10 | var sid: String? = null 11 | var text: String? = null 12 | var type: String? = null 13 | var thumbnail: String? = null 14 | var video: String? = null 15 | var images: String? = null 16 | var up: String? = null 17 | var down: String? = null 18 | var forward: String? = null 19 | var comment: String? = null 20 | var uid: String? = null 21 | var name: String? = null 22 | var header: String? = null 23 | var top_comments_content: String? = null 24 | var top_comments_voiceuri: String? = null 25 | var top_comments_uid: String? = null 26 | var top_comments_name: String? = null 27 | var top_comments_header: String? = null 28 | var passtime: String? = null 29 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/bean/WeChatNewsResult.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.bean 2 | 3 | /** 4 | * Created by yangy 5 | *2020-02-22 6 | *Describe: 7 | */ 8 | 9 | class WeChatNewsResult { 10 | var code: Int = 0 11 | var message: String? = null 12 | var result: List? = null 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/common/ApiUrl.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.common 2 | 3 | /** 4 | * Created by yangy 5 | *2020-02-20 6 | *Describe: 7 | */ 8 | class ApiUrl{ 9 | companion object{ 10 | val URL_WETCHAT_FEATURED = "getJoke" 11 | } 12 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/common/AppConfig.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.common 2 | 3 | import android.content.Context 4 | 5 | /** 6 | * Created by yangy 7 | *2020-02-22 8 | *Describe: 9 | */ 10 | class AppConfig{ 11 | 12 | companion object{ 13 | 14 | fun getStorageDir(context:Context):String{ 15 | return context.getExternalFilesDir(null)?.absolutePath + "/Collection_kotlin/" 16 | } 17 | 18 | fun getURLCacheDir(context:Context):String{ 19 | return getStorageDir(context)+ "url/cache/" 20 | } 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/fragment/customview/ChildFragment.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.fragment.customview 2 | 3 | import android.os.Bundle 4 | import com.youngmanster.collection_kotlin.mvp.BasePresenter 5 | import com.youngmanster.collectionkotlin.R 6 | import com.youngmanster.collectionkotlin.base.BaseFragment 7 | import kotlinx.android.synthetic.main.fragment_child.* 8 | 9 | /** 10 | * Created by yangy 11 | *2020-02-23 12 | *Describe: 13 | */ 14 | 15 | class ChildFragment :BaseFragment>(){ 16 | 17 | companion object{ 18 | fun newInstance(str: String): ChildFragment { 19 | val childFragment = ChildFragment() 20 | val bundle = Bundle() 21 | bundle.putString("str", str) 22 | childFragment.arguments = bundle 23 | return childFragment 24 | } 25 | } 26 | 27 | 28 | override fun getLayoutId(): Int { 29 | return R.layout.fragment_child 30 | } 31 | 32 | override fun init() { 33 | val bundle = arguments 34 | val str = bundle?.getString("str") 35 | childTv.text = str 36 | } 37 | 38 | override fun requestData() { 39 | } 40 | 41 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/fragment/skip/SkipFragment.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.fragment.skip 2 | import com.youngmanster.collection_kotlin.mvp.BasePresenter 3 | import com.youngmanster.collection_kotlin.utils.LogUtils 4 | import com.youngmanster.collectionkotlin.R 5 | import com.youngmanster.collectionkotlin.base.BaseFragment 6 | import kotlinx.android.synthetic.main.fragment_skip.* 7 | 8 | /** 9 | * Created by yangy 10 | *2020/5/21 11 | *Describe: 12 | */ 13 | class SkipFragment:BaseFragment>() { 14 | override fun getLayoutId(): Int { 15 | return R.layout.fragment_skip 16 | } 17 | 18 | override fun init() { 19 | btn1.setOnClickListener{ 20 | startFragment(SkipFragment2::class.java) 21 | } 22 | 23 | btn2.setOnClickListener{ 24 | startFragment(SkipFragment2::class.java,true) 25 | } 26 | } 27 | 28 | override fun requestData() { 29 | } 30 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/fragment/skip/SkipFragment2.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.fragment.skip 2 | 3 | import com.youngmanster.collection_kotlin.mvp.BasePresenter 4 | import com.youngmanster.collection_kotlin.utils.LogUtils 5 | import com.youngmanster.collectionkotlin.R 6 | import com.youngmanster.collectionkotlin.base.BaseFragment 7 | 8 | /** 9 | * Created by yangy 10 | *2020/5/21 11 | *Describe: 12 | */ 13 | class SkipFragment2:BaseFragment>() { 14 | override fun getLayoutId(): Int { 15 | return R.layout.fragment_skip2 16 | } 17 | 18 | override fun init() { 19 | } 20 | 21 | override fun requestData() { 22 | 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/mvp/view/IDownloadFileView.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.mvp.view 2 | 3 | import com.youngmanster.collection_kotlin.mvp.BaseView 4 | 5 | interface IDownloadFileView :BaseView{ 6 | fun updateProgress( progress: Float) 7 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/mvp/view/IWeChatChinaNewsDefinitionView.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.mvp.view 2 | 3 | import com.youngmanster.collection_kotlin.mvp.BaseView 4 | import com.youngmanster.collectionkotlin.bean.WeChatNews 5 | 6 | interface IWeChatChinaNewsDefinitionView :BaseView{ 7 | fun refreshUI(weChatNews: List?) 8 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/mvp/view/IWeChatFeaturedNoCommonClassView.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.mvp.view 2 | 3 | import com.youngmanster.collection_kotlin.mvp.BaseView 4 | import com.youngmanster.collectionkotlin.bean.WeChatNews 5 | 6 | interface IWeChatFeaturedNoCommonClassView :BaseView{ 7 | fun refreshUI(newsList: List?) 8 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/mvp/view/IWeChatFeaturedView.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.mvp.view 2 | 3 | import com.youngmanster.collection_kotlin.mvp.BaseView 4 | import com.youngmanster.collectionkotlin.bean.WeChatNews 5 | 6 | interface IWeChatFeaturedView :BaseView{ 7 | fun refreshUI(newsList: List?) 8 | } -------------------------------------------------------------------------------- /app/src/main/java/com/youngmanster/collectionkotlin/mvp/view/IWeChatWorldNewsDefinitionView.kt: -------------------------------------------------------------------------------- 1 | package com.youngmanster.collectionkotlin.mvp.view 2 | 3 | import com.youngmanster.collection_kotlin.mvp.BaseView 4 | import com.youngmanster.collectionkotlin.bean.WeChatNews 5 | 6 | interface IWeChatWorldNewsDefinitionView :BaseView{ 7 | fun refreshUI(weChatNews: List?) 8 | } -------------------------------------------------------------------------------- /app/src/main/res-night/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #008577 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/anim/back_animation_one.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/anim/back_animation_two.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/anim/scale_tip_in.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/anim/scale_tip_out.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/anim/slide_bottom_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/anim/slide_bottom_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/anim/sun_animation.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/anim/wheel_animation.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/loading_bottom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/selector_tab_home.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_item_click.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_color_statusbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 |