├── .gitignore ├── src ├── main │ ├── res │ │ ├── drawable-hdpi │ │ │ ├── okey.png │ │ │ ├── arrow_up.png │ │ │ ├── arrow_down.png │ │ │ ├── message_icon.png │ │ │ ├── pagefailed_bg.png │ │ │ ├── rotate_icon.png │ │ │ ├── circle_loading.png │ │ │ ├── common_alert_icon.png │ │ │ ├── common_right_arrow.png │ │ │ ├── toast_background.9.png │ │ │ └── hint_info_pink_icon.png │ │ ├── drawable-xhdpi │ │ │ ├── switch_btn_bottom.png │ │ │ ├── switch_btn_frame.png │ │ │ ├── switch_btn_mask.png │ │ │ ├── switch_btn_pressed.png │ │ │ └── swithc_btn_unpressed.png │ │ ├── drawable │ │ │ ├── sample_footer_loading.png │ │ │ ├── shape_4_dialog_bg.xml │ │ │ ├── shape_ok_toast_bg.xml │ │ │ ├── shape_rounded_dark_gray.xml │ │ │ ├── rounded_black_bg.xml │ │ │ ├── indicator_corner_bg.xml │ │ │ ├── rounded_corner_white_stroke.xml │ │ │ ├── shape_stroke_1_radius_10_bg_white.xml │ │ │ ├── simple_toast_bg.xml │ │ │ ├── selector_for_text_colors_black_def.xml │ │ │ ├── top_rounded_corner_blue_bg.xml │ │ │ ├── background_tab.xml │ │ │ ├── rounded_white_shape.xml │ │ │ ├── sample_footer_loading_progress.xml │ │ │ ├── rounded_different_corner_white_bg.xml │ │ │ ├── progressbar_style_light_green_progress.xml │ │ │ ├── indeterminate_progressbar_drawable.xml │ │ │ └── selector_4_item.xml │ │ ├── layout │ │ │ ├── empty_loading_layout.xml │ │ │ ├── gray_divider_line.xml │ │ │ ├── item_just_textview.xml │ │ │ ├── simple_dialog_loading.xml │ │ │ ├── view_expandable.xml │ │ │ ├── item_text_imageview.xml │ │ │ ├── common_progress_dialog_layout.xml │ │ │ ├── common_recycler_pull_refresh_layout.xml │ │ │ ├── common_pull_refresh_recyclerview_list.xml │ │ │ ├── def_loading.xml │ │ │ ├── common_tabstrip_viewpager_layout.xml │ │ │ ├── common_refresh_webview_layout.xml │ │ │ ├── def_header_4_vrefresh_layout.xml │ │ │ ├── common_empty_recycler_pull_refresh_layout.xml │ │ │ ├── common_progress_dialog_layout2.xml │ │ │ ├── base_common_header_view.xml │ │ │ ├── empty_error_layout.xml │ │ │ ├── ok_toast.xml │ │ │ └── simple_guide_banner_layout.xml │ │ ├── anim │ │ │ ├── popwindow_y_translate_in.xml │ │ │ ├── popwindow_y_translate_out.xml │ │ │ ├── common_rotate_anim.xml │ │ │ ├── expandable_hide.xml │ │ │ ├── switcher_in.xml │ │ │ ├── switcher_out.xml │ │ │ ├── common_whole_right_in.xml │ │ │ ├── common_whole_left_in.xml │ │ │ ├── common_whole_left_out.xml │ │ │ ├── expandable_show.xml │ │ │ ├── common_part_left_in.xml │ │ │ ├── common_whole_right_out.xml │ │ │ ├── common_part_right_out.xml │ │ │ └── modal_in.xml │ │ ├── values │ │ │ ├── attrs_roundcornerframelayout.xml │ │ │ ├── attrs_xrounded_corners_view.xml │ │ │ ├── ids.xml │ │ │ ├── attrs_imageviewplus.xml │ │ │ ├── attrs_focus_show_text_view.xml │ │ │ └── strings.xml │ │ └── values-en │ │ │ └── strings.xml │ ├── java │ │ ├── common │ │ │ └── base │ │ │ │ ├── mvx │ │ │ │ ├── m │ │ │ │ │ ├── IModel.kt │ │ │ │ │ ├── IRepository.kt │ │ │ │ │ ├── IDataBinder.kt │ │ │ │ │ ├── IDataObserver.kt │ │ │ │ │ ├── ABizResult.kt │ │ │ │ │ ├── IObserver.kt │ │ │ │ │ ├── DoResult.kt │ │ │ │ │ ├── BaseRepository.kt │ │ │ │ │ └── AbsDataObserver.kt │ │ │ │ ├── vm │ │ │ │ │ ├── BaseViewModelWithAppContext.kt │ │ │ │ │ ├── BaseViewModelWithRepository.kt │ │ │ │ │ └── BaseViewModel.kt │ │ │ │ ├── v │ │ │ │ │ ├── UiEx.kt │ │ │ │ │ └── IView.kt │ │ │ │ ├── interfaces │ │ │ │ │ └── IHostActions.kt │ │ │ │ └── fragments │ │ │ │ │ └── CommonViewDelegateFragment.kt │ │ │ │ ├── beans │ │ │ │ ├── BaseListEntity.java │ │ │ │ ├── BaseData.java │ │ │ │ ├── IHasTextData.java │ │ │ │ └── BaseBannerItem.java │ │ │ │ ├── glide │ │ │ │ ├── progress │ │ │ │ │ ├── OnGlideImageViewListener.java │ │ │ │ │ ├── OnProgressListener.java │ │ │ │ │ └── ProgressResponseBody.java │ │ │ │ ├── WrapUrlTarget.java │ │ │ │ ├── BaseGlide.java │ │ │ │ └── GlideCircleTransformation.java │ │ │ │ ├── popupwindow │ │ │ │ ├── DefPopupWindow.kt │ │ │ │ └── ARecyclerViewPopWindow.kt │ │ │ │ ├── utils │ │ │ │ ├── ITimeCounterListener.kt │ │ │ │ ├── CommonConfigs.java │ │ │ │ ├── TopSmoothScroller.java │ │ │ │ ├── XCoroutineScope.kt │ │ │ │ ├── GenericsParamUtil.java │ │ │ │ ├── StepTracker.java │ │ │ │ ├── CountdownTimerImpl.java │ │ │ │ ├── CountTimer.java │ │ │ │ └── FileUtil.java │ │ │ │ ├── netAbout │ │ │ │ ├── WrapperRespData.kt │ │ │ │ ├── INetEventWithResponse.java │ │ │ │ └── INetEvent.java │ │ │ │ ├── annotations │ │ │ │ └── InvokeStep.java │ │ │ │ ├── adapters │ │ │ │ ├── JustHasTextDataSelectableAdapter.java │ │ │ │ ├── ViewPagerFragmentInfo.java │ │ │ │ ├── JustViewDataPagerAdapter.java │ │ │ │ ├── viewholders │ │ │ │ │ ├── WithRecyclerViewViewHolder.kt │ │ │ │ │ └── ACommonViewHolder.kt │ │ │ │ ├── BaseCustomViewHolderAdapter.kt │ │ │ │ └── AbsSelectableLocalViewHolderAdapter.kt │ │ │ │ ├── interfaces │ │ │ │ ├── ITextWatcher.java │ │ │ │ ├── ICommonUiHintActions.java │ │ │ │ ├── ICommonBehaviors.java │ │ │ │ ├── NotUse.java │ │ │ │ ├── IDoTaskCallback.java │ │ │ │ ├── ICommonActionsInListUi.java │ │ │ │ └── IRecyclerViewItemClickEventsListener.java │ │ │ │ ├── views │ │ │ │ ├── CustomToast.java │ │ │ │ ├── CustomTextView.java │ │ │ │ ├── FrameAnimationController.java │ │ │ │ ├── CommonRefreshRecyclerView.java │ │ │ │ └── RadiusCornerBackgroundColorSpan.java │ │ │ │ ├── retrofitCase │ │ │ │ └── JsonConvert.java │ │ │ │ ├── activitys │ │ │ │ ├── IProxyCallback.java │ │ │ │ └── CommonViewpagerFragmentViewActivity.java │ │ │ │ ├── dialogs │ │ │ │ └── IDialogLifeCircleListener.java │ │ │ │ └── animators │ │ │ │ └── BezierPointValuer.java │ │ └── com │ │ │ ├── chad │ │ │ └── library │ │ │ │ └── adapter │ │ │ │ └── base │ │ │ │ ├── entity │ │ │ │ ├── MultiItemEntity.java │ │ │ │ ├── IExpandable.java │ │ │ │ ├── SectionEntity.java │ │ │ │ └── SectionMultiEntity.java │ │ │ │ ├── animation │ │ │ │ ├── BaseAnimation.java │ │ │ │ ├── SlideInBottomAnimation.java │ │ │ │ ├── SlideInLeftAnimation.java │ │ │ │ ├── SlideInRightAnimation.java │ │ │ │ ├── AlphaInAnimation.java │ │ │ │ └── ScaleInAnimation.java │ │ │ │ ├── util │ │ │ │ ├── ItemProviderException.java │ │ │ │ ├── ProviderDelegate.java │ │ │ │ └── TouchEventUtil.java │ │ │ │ ├── listener │ │ │ │ ├── OnItemDragListener.java │ │ │ │ ├── OnItemLongClickListener.java │ │ │ │ ├── OnItemClickListener.java │ │ │ │ ├── OnItemChildClickListener.java │ │ │ │ ├── OnItemChildLongClickListener.java │ │ │ │ ├── OnRecyclerItemClickEventListener.java │ │ │ │ └── OnItemSwipeListener.java │ │ │ │ ├── loadmore │ │ │ │ └── SimpleLoadMoreView.java │ │ │ │ └── provider │ │ │ │ └── BaseItemProvider.java │ │ │ ├── flyco │ │ │ └── banner │ │ │ │ ├── transform │ │ │ │ ├── FlowTransformer.java │ │ │ │ ├── RotateUpTransformer.java │ │ │ │ ├── RotateDownTransformer.java │ │ │ │ ├── FadeSlideTransformer.java │ │ │ │ ├── DepthTransformer.java │ │ │ │ └── ZoomOutSlideTransformer.java │ │ │ │ ├── anim │ │ │ │ ├── select │ │ │ │ │ ├── RotateEnter.java │ │ │ │ │ └── ZoomInEnter.java │ │ │ │ ├── unselect │ │ │ │ │ └── NoAnimExist.java │ │ │ │ └── BaseAnimator.java │ │ │ │ └── widget │ │ │ │ ├── LoopViewPager │ │ │ │ └── FixedSpeedScroller.java │ │ │ │ └── Banner │ │ │ │ ├── JustImageViewBanner.java │ │ │ │ └── BaseGuideBanner.java │ │ │ └── lzy │ │ │ └── okgo │ │ │ ├── adapter │ │ │ ├── CallAdapter.java │ │ │ ├── AdapterParam.java │ │ │ ├── DefaultCallAdapter.java │ │ │ └── Call.java │ │ │ ├── request │ │ │ ├── base │ │ │ │ └── NoBodyRequest.java │ │ │ ├── PutRequest.java │ │ │ ├── HeadRequest.java │ │ │ ├── DeleteRequest.java │ │ │ ├── PatchRequest.java │ │ │ ├── GetRequest.java │ │ │ ├── PostRequest.java │ │ │ ├── OptionsRequest.java │ │ │ └── TraceRequest.java │ │ │ ├── model │ │ │ ├── Priority.java │ │ │ └── HttpMethod.java │ │ │ ├── convert │ │ │ ├── Converter.java │ │ │ └── StringConvert.java │ │ │ ├── cache │ │ │ ├── CacheMode.java │ │ │ └── policy │ │ │ │ └── CommonCachePolicy.java │ │ │ ├── callback │ │ │ ├── AbsCallbackWrapper.java │ │ │ ├── StringCallback.java │ │ │ ├── JustStringCallback.java │ │ │ ├── FileCallback.java │ │ │ └── BitmapCallback.java │ │ │ ├── exception │ │ │ ├── OkGoException.java │ │ │ ├── CacheException.java │ │ │ └── StorageException.java │ │ │ └── cookie │ │ │ ├── store │ │ │ └── CookieStore.java │ │ │ └── CookieJarImpl.java │ └── AndroidManifest.xml ├── test │ └── java │ │ └── common │ │ └── base │ │ └── ExampleUnitTest.java └── androidTest │ └── java │ └── common │ └── base │ └── ApplicationTest.java ├── maven.properties └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | *.iml 3 | /local.properties -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/okey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feer921/BaseProject/HEAD/src/main/res/drawable-hdpi/okey.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/arrow_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feer921/BaseProject/HEAD/src/main/res/drawable-hdpi/arrow_up.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/arrow_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feer921/BaseProject/HEAD/src/main/res/drawable-hdpi/arrow_down.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/message_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feer921/BaseProject/HEAD/src/main/res/drawable-hdpi/message_icon.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/pagefailed_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feer921/BaseProject/HEAD/src/main/res/drawable-hdpi/pagefailed_bg.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/rotate_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feer921/BaseProject/HEAD/src/main/res/drawable-hdpi/rotate_icon.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/circle_loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feer921/BaseProject/HEAD/src/main/res/drawable-hdpi/circle_loading.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/common_alert_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feer921/BaseProject/HEAD/src/main/res/drawable-hdpi/common_alert_icon.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/common_right_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feer921/BaseProject/HEAD/src/main/res/drawable-hdpi/common_right_arrow.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/toast_background.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feer921/BaseProject/HEAD/src/main/res/drawable-hdpi/toast_background.9.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/switch_btn_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feer921/BaseProject/HEAD/src/main/res/drawable-xhdpi/switch_btn_bottom.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/switch_btn_frame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feer921/BaseProject/HEAD/src/main/res/drawable-xhdpi/switch_btn_frame.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/switch_btn_mask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feer921/BaseProject/HEAD/src/main/res/drawable-xhdpi/switch_btn_mask.png -------------------------------------------------------------------------------- /src/main/res/drawable/sample_footer_loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feer921/BaseProject/HEAD/src/main/res/drawable/sample_footer_loading.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/hint_info_pink_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feer921/BaseProject/HEAD/src/main/res/drawable-hdpi/hint_info_pink_icon.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/switch_btn_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feer921/BaseProject/HEAD/src/main/res/drawable-xhdpi/switch_btn_pressed.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/swithc_btn_unpressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feer921/BaseProject/HEAD/src/main/res/drawable-xhdpi/swithc_btn_unpressed.png -------------------------------------------------------------------------------- /src/main/java/common/base/mvx/m/IModel.kt: -------------------------------------------------------------------------------- 1 | package common.base.mvx.m 2 | 3 | /** 4 | * @author fee 5 | *
DESC: 6 | * 仅声明的一个接口 7 | *
8 | */ 9 | interface IModel { 10 | 11 | } -------------------------------------------------------------------------------- /src/main/res/layout/empty_loading_layout.xml: -------------------------------------------------------------------------------- 1 | 2 |DESC: 6 | * 数据层/业务层/数据仓库 的接口 7 | *
8 | */ 9 | interface IRepository { 10 | 11 | /** 12 | * 对仓库的初始化或者初始化需要的数据 13 | */ 14 | fun init() 15 | 16 | } -------------------------------------------------------------------------------- /src/main/res/drawable/shape_ok_toast_bg.xml: -------------------------------------------------------------------------------- 1 | 2 |DESC: 8 | * 视图层绑定 数据层 9 | *
10 | */ 11 | interface IDataBinderDESC: 7 | * 目的是为了让该类的使用 和原生[PopupWindow]类似,消除 BasePopupWindow 的泛型参数 8 | *
9 | */ 10 | class DefPopupWindow(context: Context) : BasePopupWindowDESC: 9 | * 具有文本属性的数据实体 10 | *
11 | * ******************(^_^)*********************** 12 | */ 13 | public interface IHasTextData { 14 | CharSequence getTextData(); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/res/anim/common_rotate_anim.xml: -------------------------------------------------------------------------------- 1 | 2 |DESC: 7 | * 相关数据结果 对象的包裹类 8 | *
9 | * ******************(^_^)*********************** 10 | */ 11 | open class WrapperRespDataDESC: 11 | * 提示 调用步骤/顺序的 注解类 12 | *
13 | */ 14 | @Retention(RetentionPolicy.SOURCE) 15 | @Target({ElementType.METHOD,ElementType.TYPE,ElementType.CONSTRUCTOR}) 16 | public @interface InvokeStep { 17 | String desc(); 18 | int value(); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/res/values-en/strings.xml: -------------------------------------------------------------------------------- 1 |DESC: 13 | *
14 | * ******************(^_^)*********************** 15 | */ 16 | public class JustHasTextDataSelectableAdapterDESC: 11 | * [Observer] 的子接口,目的为增加 当前数据被观察到改变时增加回调当前的数据类型 12 | *
13 | * ******************(^_^)*********************** 14 | */ 15 | interface IDataObserverDESC: 10 | * 通用的一个响应 结果 实体对象 11 | * 注:可用于 [MutableLiveData]的 value 12 | *
13 | * ******************(^_^)*********************** 14 | */ 15 | open class ABizResultDESC: 11 | * 接口:[Observer] 的子接口,默认重写 [Observer]的接口方法 12 | *
13 | * ******************(^_^)*********************** 14 | */ 15 | interface IObserverDESC: 12 | * 拥有和 Application 同生命周期的 ViewModel 13 | *
14 | * ******************(^_^)*********************** 15 | */ 16 | 17 | abstract class BaseViewModelWithAppContextDESC: 11 | *
12 | * ******************(^_^)*********************** 13 | */ 14 | public interface INetEventWithResponseDESC: 12 | * 给ViewPager直接提供itemData为View的PagerAdapter 13 | *
14 | * ******************(^_^)*********************** 15 | */ 16 | public class JustViewDataPagerAdapter extends AbsPagerAdapterDESC: 14 | * 自定义注解 15 | * 该注解用来标记某个类、属性、方法不使用 16 | *
17 | * ******************(^_^)*********************** 18 | */ 19 | @Retention(RetentionPolicy.SOURCE) 20 | @Target({ElementType.CONSTRUCTOR,ElementType.FIELD,ElementType.METHOD,ElementType.LOCAL_VARIABLE,ElementType.TYPE}) 21 | public @interface NotUse { 22 | String value(); 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/chad/library/adapter/base/loadmore/SimpleLoadMoreView.java: -------------------------------------------------------------------------------- 1 | package com.chad.library.adapter.base.loadmore; 2 | 3 | 4 | import common.base.R; 5 | 6 | /** 7 | * Created by BlingBling on 2016/10/11. 8 | */ 9 | 10 | public final class SimpleLoadMoreView extends LoadMoreView { 11 | 12 | @Override 13 | public int getLayoutId() { 14 | return R.layout.quick_view_load_more; 15 | } 16 | 17 | @Override 18 | protected int getLoadingViewId() { 19 | return R.id.load_more_loading_view; 20 | } 21 | 22 | @Override 23 | protected int getLoadFailViewId() { 24 | return R.id.load_more_load_fail_view; 25 | } 26 | 27 | @Override 28 | protected int getLoadEndViewId() { 29 | return R.id.load_more_load_end_view; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/res/layout/item_text_imageview.xml: -------------------------------------------------------------------------------- 1 | 2 |DESC: 11 | * Glide加载图片到的Target,携带当前所加载的图片url地址 12 | *
13 | * ******************(^_^)*********************** 14 | */ 15 | public abstract class WrapUrlTargetDESC: 11 | * 关于任务执行的回调接口 12 | *
13 | * ******************(^_^)*********************** 14 | */ 15 | public interface IDoTaskCallback { 16 | 17 | /** 18 | * 正在执行任务 19 | * @param whatTask 要执行的什么类型的任务 20 | * @param taskObj 要执行的任务体 21 | */ 22 | boolean onDoTask(int whatTask, Object taskObj); 23 | /** 24 | * 任务执行结果 25 | * 注:回调在主线程 26 | * @param whatTask 什么任务类型 27 | * @param taskResult 任务结果 28 | */ 29 | @MainThread 30 | void onDoTaskResult(int whatTask, Object taskResult); 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/common/base/mvx/vm/BaseViewModelWithRepository.kt: -------------------------------------------------------------------------------- 1 | package common.base.mvx.vm 2 | 3 | import common.base.mvx.m.IRepository 4 | 5 | /** 6 | ******************(^_^)***********************DESC: 11 | * 框架为 ViewModel has IRepository 的架构模式 12 | *
13 | * ******************(^_^)*********************** 14 | */ 15 | abstract class BaseViewModelWithRepositoryDESC: 12 | *
13 | * ******************(^_^)*********************** 14 | */ 15 | abstract class WithRecyclerViewViewHolderDESC: 14 | * 15 | *
16 | * ******************(^_^)*********************** 17 | */ 18 | class CustomToast extends Toast { 19 | 20 | /** 21 | * Construct an empty Toast object. You must call {@link #setView} before you 22 | * can call {@link #show}. 23 | * 24 | * @param context The context to use. Usually your {@link Application} 25 | * or {@link Activity} object. 26 | */ 27 | public CustomToast(Context context) { 28 | super(context); 29 | } 30 | 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/common/base/adapters/BaseCustomViewHolderAdapter.kt: -------------------------------------------------------------------------------- 1 | package common.base.adapters 2 | 3 | import android.view.ViewGroup 4 | import com.chad.library.adapter.base.BaseQuickAdapter 5 | import com.chad.library.adapter.base.BaseViewHolder 6 | 7 | /** 8 | * ******************(^_^)***********************DESC: 11 | * 需要 创建自定义 ViewHolder 的 Adapter 基类 12 | *
13 | * ******************(^_^)*********************** 14 | */ 15 | abstract class BaseCustomViewHolderAdapterDESC: 10 | *
11 | */ 12 | class ARecyclerViewPopWindow(context: Context) : BasePopupWindowDESC: 12 | * 供RecyclerView作平滑滚动到指定position的滚动者 13 | * 有一个平滑滚动效果,并且可以滚动到对应position位置并置顶 14 | *
15 | * ******************(^_^)*********************** 16 | */ 17 | public class TopSmoothScroller extends LinearSmoothScroller { 18 | 19 | public TopSmoothScroller(Context context) { 20 | super(context); 21 | } 22 | 23 | @Override 24 | protected int getHorizontalSnapPreference() { 25 | return SNAP_TO_START;//具体见源码注释 26 | } 27 | @Override 28 | protected int getVerticalSnapPreference() { 29 | return SNAP_TO_START;//具体见源码注释 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/res/layout/common_pull_refresh_recyclerview_list.xml: -------------------------------------------------------------------------------- 1 | 2 |DESC: 12 | *
13 | * ******************(^_^)*********************** 14 | */ 15 | abstract class ACommonViewHolderDESC: 21 | *
22 | * ******************(^_^)*********************** 23 | */ 24 | 25 | public class BaseGlide extends LibraryGlideModule { 26 | @Override 27 | public void registerComponents(Context context, Glide glide, Registry registry) { 28 | super.registerComponents(context, glide, registry); 29 | registry.replace(GlideUrl.class, InputStream.class, new OkHttpUrlLoader.Factory(ProgressManager.getOkHttpClient())); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/res/layout/common_tabstrip_viewpager_layout.xml: -------------------------------------------------------------------------------- 1 | 2 |DESC: 9 | * 一次业务执行的结果对象 10 | *
11 | */ 12 | @Deprecated(message = "",replaceWith = ReplaceWith("")) 13 | sealed class DoResultDESC: 16 | *
17 | * ******************(^_^)*********************** 18 | */ 19 | public class CustomTextView extends AppCompatTextView { 20 | 21 | public CustomTextView(Context context) { 22 | super(context); 23 | } 24 | 25 | public CustomTextView(Context context, @Nullable AttributeSet attrs) { 26 | super(context, attrs); 27 | } 28 | 29 | public CustomTextView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { 30 | super(context, attrs, defStyleAttr); 31 | } 32 | 33 | public void setTextSizeWithPxValue(@Px int textSizePxValue) { 34 | setTextSize(TypedValue.COMPLEX_UNIT_PX, textSizePxValue); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/common/base/retrofitCase/JsonConvert.java: -------------------------------------------------------------------------------- 1 | package common.base.retrofitCase; 2 | 3 | import org.json.JSONException; 4 | import org.json.JSONObject; 5 | 6 | import java.io.IOException; 7 | import java.lang.reflect.Type; 8 | 9 | import okhttp3.ResponseBody; 10 | import retrofit2.Converter; 11 | 12 | /** 13 | * User: fee(1176610771@qq.com) 14 | * Date: 2016-05-16 15 | * Time: 18:09 16 | * DESC: JsonObject 转换器,即将Retrofit的响应结果转换成JsonObject数据 17 | */ 18 | public class JsonConvert implements ConverterDESC: 9 | * 业务[M] 10 | * 网络接口请求/数据库查询/IO流操作... 11 | *
12 | */ 13 | abstract class BaseRepository : IRepository { 14 | protected val TAG = javaClass.simpleName 15 | 16 | /** 17 | * 是否使能Log输出 18 | * def: false 19 | */ 20 | var isEnableLogDebug: Boolean = false 21 | var extraInfosInDebug: String = "" 22 | 23 | open fun e(tag: String? = "$TAG[$extraInfosInDebug]", vararg logBodys: Any?) { 24 | CommonLog.e(tag ?: "$TAG[$extraInfosInDebug]", *logBodys) 25 | } 26 | 27 | open fun v(tag: String? = "$TAG[$extraInfosInDebug]", vararg logBodys: Any?) { 28 | CommonLog.fullLog('v', tag ?: "$TAG[$extraInfosInDebug]", CommonLog.getInfo(*logBodys)) 29 | } 30 | 31 | open fun i(tag: String? = "$TAG[$extraInfosInDebug]", vararg logBodys: Any?) { 32 | CommonLog.iFullLog(tag ?: "$TAG[$extraInfosInDebug]", *logBodys) 33 | } 34 | 35 | open fun d(logTag: String? = "$TAG[$extraInfosInDebug]", vararg logBodys: Any?) { 36 | CommonLog.d(logTag ?: "$TAG[$extraInfosInDebug]", *logBodys) 37 | } 38 | 39 | } -------------------------------------------------------------------------------- /src/main/java/com/chad/library/adapter/base/listener/OnItemClickListener.java: -------------------------------------------------------------------------------- 1 | package com.chad.library.adapter.base.listener; 2 | 3 | import android.view.View; 4 | 5 | import com.chad.library.adapter.base.BaseQuickAdapter; 6 | 7 | /** 8 | * Created by AllenCoder on 2016/8/03. 9 | *10 | *
11 | * A convenience class to extend when you only want to OnItemClickListener for a subset
12 | * of all the SimpleClickListener. This implements all methods in the
13 | * {@link SimpleClickListener}
14 | */
15 | public abstract class OnItemClickListener extends SimpleClickListener {
16 | @Override
17 | public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
18 | onSimpleItemClick(adapter, view, position);
19 | }
20 |
21 | @Override
22 | public void onItemLongClick(BaseQuickAdapter adapter, View view, int position) {
23 |
24 | }
25 |
26 | @Override
27 | public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
28 |
29 | }
30 |
31 | @Override
32 | public void onItemChildLongClick(BaseQuickAdapter adapter, View view, int position) {
33 |
34 | }
35 |
36 | public abstract void onSimpleItemClick(BaseQuickAdapter adapter, View view, int position);
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/com/chad/library/adapter/base/listener/OnItemChildClickListener.java:
--------------------------------------------------------------------------------
1 | package com.chad.library.adapter.base.listener;
2 |
3 | import android.view.View;
4 |
5 | import com.chad.library.adapter.base.BaseQuickAdapter;
6 |
7 | /**
8 | * Created by AllenCoder on 2016/8/03.
9 | * A convenience class to extend when you only want to OnItemChildClickListener for a subset
10 | * of all the SimpleClickListener. This implements all methods in the
11 | * {@link SimpleClickListener}
12 | **/
13 |
14 | public abstract class OnItemChildClickListener extends SimpleClickListener {
15 | @Override
16 | public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
17 |
18 | }
19 |
20 | @Override
21 | public void onItemLongClick(BaseQuickAdapter adapter, View view, int position) {
22 |
23 | }
24 |
25 | @Override
26 | public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
27 | onSimpleItemChildClick(adapter, view, position);
28 | }
29 |
30 | @Override
31 | public void onItemChildLongClick(BaseQuickAdapter adapter, View view, int position) {
32 |
33 | }
34 |
35 | public abstract void onSimpleItemChildClick(BaseQuickAdapter adapter, View view, int position);
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/java/common/base/mvx/m/AbsDataObserver.kt:
--------------------------------------------------------------------------------
1 | package common.base.mvx.m
2 |
3 | import java.lang.ref.WeakReference
4 |
5 | /**
6 | ******************(^_^)***********************
7 | * User: fee(QQ/WeiXin:1176610771)
8 | * Date: 2021/4/4
9 | * Time: 11:52
10 | *
DESC: 11 | * [IDataObserver] 的一个实现类 12 | * 可赋值 被观察的 数据类型; 13 | * 可赋值,外部的 [IDataObserver]接口实现类,目的为再回调外部 14 | *
15 | * ******************(^_^)*********************** 16 | */ 17 | open class AbsDataObserverDESC:
11 | * 一个Dialog的生命周期的监听者
12 | * 一般生命周期流程为:显示线: show() --> [如果没创建过则-->onCreate()] --> onStart()
13 | * 消失线: [cancel()] --> dismiss() --> onStop()
14 | * "[]"表示可有无
15 | * ******************(^_^)***********************
16 | */
17 | public interface IDialogLifeCircleListener {
18 |
19 | /**
20 | * 当前Dialog 将要创建
21 | * 一般只有一次
22 | * @param theDialog 当前Dialog
23 | */
24 | void onDialogCreate(Dialog theDialog/*,Bundle savedInstanceState*/);
25 |
26 | /**
27 | * 当前Dialog 将要show()
28 | * @param theDialog 当前Dialog
29 | * @param titleHintOtherTexts [0] title; [1] hint text;[2] cancel btn text; [3] submit btn text... 使用者需要判断长度 ^~^
30 | */
31 | void onDialogShow(Dialog theDialog, CharSequence... titleHintOtherTexts);
32 |
33 | /**
34 | * 当前Dialog 将要消失
35 | * @param theDialog 当前Dialog
36 | * // * @param dueToCancel true:是由于调用了 cancel()消失的;false:一般为 dismiss()方法的调用
37 | */
38 | void onDialogDismiss(Dialog theDialog/*, boolean dueToCancel*/);
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/java/com/lzy/okgo/convert/StringConvert.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 jeasonlzy(廖子尧)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.lzy.okgo.convert;
17 |
18 | import okhttp3.Response;
19 | import okhttp3.ResponseBody;
20 |
21 | /**
22 | * ================================================
23 | * 作 者:jeasonlzy(廖子尧)Github地址:https://github.com/jeasonlzy
24 | * 版 本:1.0
25 | * 创建日期:16/9/11
26 | * 描 述:字符串的转换器
27 | * 修订历史:
28 | * ================================================
29 | */
30 | public class StringConvert implements Converter DESC:
12 | * 通用的缓存策略
13 | * DESC:
12 | * ViewModel的基类
13 | * 在[MVC]框架下,可以作为[M]
14 | * 在[MVP]框架下,可以作为[M]
15 | * 在[MVVM]框架下,作为[VM]
16 | * DESC:
18 | * 对 UI 的一些通用扩展
19 | * DESC:
14 | * DESC:
9 | * 运行步骤的步次tracker
10 | * DESC:
12 | * 宿主相关的 动作
13 | *
15 | * 不管是 MVP 框架还是 MVVM框架,
16 | * V层尽量需要写成 可复用V层:1、方便独立维护不与Activity、Fragment强偶合; 2、方便通用:比如如果项目中由Activity 变更成 Fragment方案,则直接V层的
17 | * 挪用过来就行;
18 | * DESC:
11 | * 倒数实现者
12 | * DESC:
9 | * 统计开始到结束的所用的时间
10 | * 注意,这个只适合单线程
11 | * DESC:
14 | * 一个通用的加载 视图层代理的 Fragment,
15 | * 从而可以不用写各个Fragment,而只写 相应的 ViewDelegate
16 | * DESC:
13 | * DESC:
15 | * 操作文件的工具类
16 | * DESC:
15 | * 可设置为圆角矩形的背景颜色 SPAN
16 | *
8 | * User: fee(QQ/WeiXin:1176610771)
9 | * Date: 2020/4/7
10 | * Time: 20:00
11 | *
14 | * Author: fee(QQ/WeiXin:1176610771)
15 | * Date: 2023/7/2
16 | * Time: 19:55
17 | *
10 | * User: fee(QQ/WeiXin:1176610771)
11 | * Date: 2019/1/17
12 | * Time: 20:24
13 | *
5 | * User: fee(QQ/WeiXin:1176610771)
6 | * Date: 2019/4/11
7 | * Time: 16:51
8 | *
7 | * User: fee(QQ/WeiXin:1176610771)
8 | * Date: 2020/2/12
9 | * Time: 15:24
10 | *
5 | * User: 11776610771@qq.com
6 | * Date: 2017/10/12
7 | * Time: 9:52
8 | *
10 | * User: fee(QQ/WeiXin:1176610771)
11 | * Date: 2021/3/20
12 | * Time: 12:31
13 | *
11 | * User: fee(QQ/WeiXin:1176610771)
12 | *
11 | * User: fee(QQ/WeiXin:1176610771)
12 | * Date: 2021/4/24
13 | * Time: 22:42
14 | * fraction representing the proportion between the start and end values. The
26 | * calculation is a simple parametric calculation: result = x0 + t * (x1 - x0),
27 | * where x0 is startValue, x1 is endValue,
28 | * and t is fraction.
29 | *
30 | * @param t The fraction from the starting to the ending values
31 | * @param p0 The start value. 贝塞尔曲线的开始点
32 | * @param p3 The end value. 贝塞尔曲线的结束点这里为第三个点
33 | * @return A linear interpolation between the start and end values, given the
34 | * fraction parameter.
35 | * 贝塞尔曲线 公式:B(t) = P0*(1-t)^3 + 3*p1*t*(1-t)^2 + 3*p2*t^2*(1-t) + p3*t^3, t{0~1}
36 | */
37 | @Override
38 | public PointF evaluate(float t, PointF p0, PointF p3) {
39 | PointF transitionPoint = new PointF();
40 | transitionPoint.x = p0.x * (1 - t) * (1 - t) * (1 - t)
41 | + 3 * point1.x * t * (1 - t) * (1 - t) + 3 * point2.x * t * t * (1 - t)
42 | + p3.x * t * t * t;
43 | transitionPoint.y = p0.y * (1 - t) * (1 - t) * (1 - t)
44 | + 3 * point1.y * t * (1 - t) * (1 - t) + 3 * point2.y * t * t * (1 - t)
45 | + p3.y * t * t * t;
46 |
47 | return transitionPoint;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/main/res/layout/simple_guide_banner_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 | * User: fee(QQ/WeiXin:1176610771)
12 | * Date: 2020/2/14
13 | * Time: 14:43
14 | *