From d21fcc54fae72d7dd212ecdd1b8b9939cadf47a1 Mon Sep 17 00:00:00 2001 From: DylanCaiCoding Date: Mon, 27 Sep 2021 01:25:29 +0800 Subject: [PATCH] Prepare for release 3.0.0-alpha --- README.md | 106 ++++++++++++++-------------------- README_ZH_CN.md | 148 ++++++++++++++---------------------------------- 2 files changed, 83 insertions(+), 171 deletions(-) diff --git a/README.md b/README.md index d6f128f..01d4ca5 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# LoadingHelper +# LoadingStateView English | [中文](README_ZH_CN.md) -[![](https://www.jitpack.io/v/DylanCaiCoding/LoadingHelper.svg)](https://www.jitpack.io/#DylanCaiCoding/LoadingHelper) [![](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](https://github.com/DylanCaiCoding/LoadingHelper/blob/master/LICENSE) +[![](https://www.jitpack.io/v/DylanCaiCoding/LoadingStateView.svg)](https://www.jitpack.io/#DylanCaiCoding/LoadingLoadingStateView) [![License](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](https://github.com/DylanCaiCoding/LoadingStateView/blob/master/LICENSE) -`LoadingHelper` is a highly expandable Android library for showing loading status view on the low-coupling way, it is implemented with a Kotlin code of less than 300 lines without comment statement . it not only **shows different view like loading, content, error, empty or customized view** when loading network data, but also **manages title bar.** +`LoadingStateView` is a highly expandable Android library for showing loading status view on the low-coupling way, it is implemented with a Kotlin code of less than 300 lines without comment statement . it not only **shows different view like loading, content, error, empty or customized view** when loading network data, but also **manages title bar.** ## Feature @@ -22,18 +22,19 @@ Click or scan QR code to download [![QR code](img/app_download_qr_code.png)](https://www.pgyer.com/loadinghelper) -| [Activity(error)](app/src/main/java/com/dylanc/loadinghelper/sample/ui/ActErrorActivity.java) | [View(placeholder)](app/src/main/java/com/dylanc/loadinghelper/sample/ui/ViewPlaceholderActivity.java) | [ViewPager(timeout)](app/src/main/java/com/dylanc/loadinghelper/sample/ui/ViewPagerActivity.java) | [RecyclerView(cool loading)](app/src/main/java/com/dylanc/loadinghelper/sample/ui/RecyclerViewActivity.java) | -| :---: | :----: | :---: | :---: | -| ![](gif/activity_error.gif) | ![](gif/view_placeholder.gif) | ![](gif/viewpager_timeout.gif) | ![](gif/recyclerview_loading.gif) | +| [Activity(error)](app/src/main/java/com/dylanc/loadingstateview/sample/ui/ActErrorActivity.java) | [View(placeholder)](app/src/main/java/com/dylanc/loadingstateview/sample/ui/ViewPlaceholderActivity.java) | [ViewPager(timeout)](app/src/main/java/com/dylanc/loadingstateview/sample/ui/ViewPagerActivity.java) | [RecyclerView(cool loading)](app/src/main/java/com/dylanc/loadingstateview/sample/ui/RecyclerViewActivity.java) | +| :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | +| ![](gif/activity_error.gif) | ![](gif/view_placeholder.gif) | ![](gif/viewpager_timeout.gif) | ![](gif/recyclerview_loading.gif) | -| [SpecialHeader(custom)](app/src/main/java/com/dylanc/loadinghelper/sample/ui/CustomHeaderActivity.java) | [MultipleHeader(search)](app/src/main/java/com/dylanc/loadinghelper/sample/ui/MultipleHeaderActivity.java) | [SpecialDecorView(scrolling)](app/src/main/java/com/dylanc/loadinghelper/sample/ui/ScrollingToolbarActivity.java) | [BottomDecorView(editor)](app/src/main/java/com/dylanc/loadinghelper/sample/ui/BottomEditorActivity.java) | -| :---: | :---: | :---: | :---: | -| ![](gif/special_header_custom.gif) | ![](gif/multiple_header_search.gif) | ![](gif/special_decor_scrolling.gif) | ![](gif/bottom_decor_editor.gif) | +| [SpecialHeader(custom)](app/src/main/java/com/dylanc/loadingstateview/sample/ui/CustomHeaderActivity.java) | [MultipleHeader(search)](app/src/main/java/com/dylanc/loadingstateview/sample/ui/MultipleHeaderActivity.java) | [SpecialDecorView(scrolling)](app/src/main/java/com/dylanc/loadingstateview/sample/ui/ScrollingToolbarActivity.java) | [BottomDecorView(editor)](app/src/main/java/com/dylanc/loadingstateview/sample/ui/BottomEditorActivity.java) | +| :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | +| ![](gif/special_header_custom.gif) | ![](gif/multiple_header_search.gif) | ![](gif/special_decor_scrolling.gif) | ![](gif/bottom_decor_editor.gif) | ## Getting started Add it in your root `build.gradle` at the end of repositories: + ```groovy allprojects { repositories { @@ -45,62 +46,61 @@ allprojects { Add dependencies in your module `build.gradle` : -``` +```groovy dependencies { - implementation 'com.github.DylanCaiCoding:LoadingHelper:2.3.0' + implementation 'com.github.DylanCaiCoding:LoadingStateView:3.0.0-alpha' } ``` ### Usage -#### Step 1. Create a class extends `LoadingHelper.Adapter`, for example: +#### Step 1. Create a class extends `LoadingStateView.ViewDelegate`, for example: ```java -public class LoadingAdapter extends LoadingHelper.Adapter { +public class LoadingViewDelegate extends LoadingStateView.ViewDelegate { @NonNull @Override - public LoadingHelper.ViewHolder onCreateViewHolder(@NonNull LayoutInflater inflater, @NonNull ViewGroup parent) { - return new LoadingHelper.ViewHolder(inflater.inflate(R.layout.layout_loading_view, parent, false)); + public LoadingStateView.ViewHolder onCreateViewHolder(@NonNull LayoutInflater inflater, @NonNull ViewGroup parent) { + return new LoadingStateView.ViewHolder(inflater.inflate(R.layout.layout_loading_view, parent, false)); } @Override - public void onBindViewHolder(@NonNull LoadingHelper.ViewHolder holder) { - + public void onBindViewHolder(@NonNull LoadingStateView.ViewHolder holder) { } } ``` -#### Step 2. Register your adapter with a view type, for example: +#### Step 2. Register `ViewDelegate` with a view type, for example: ```java -LoadingHelper loadingHelper = new LoadingHelper(this); -loadingHelper.register(ViewType.LOADING, new LoadingAdapter()); +LoadingStateView loadingStateView = new LoadingStateView(this); +loadingStateView.register(ViewType.LOADING, new LoadingViewDelegate()); ``` -##### Or if you want to register a global adapter. +##### Or if you want to register a global `ViewDelegate`. ```java -LoadingHelper.setDefaultAdapterPool(adapterPool -> { - adapterPool.register(ViewType.LOADING, new LoadingAdapter()); - return Unit.INSTANCE; +loadingStateView.setViewDelegatePool(pool -> { + pool.register(ViewType.LOADING, new LoadingViewDelegate()); + return null; }); ``` #### Step 3. Show view by view type, for example: ```java -loadingHelper.showView(viewType); -loadingHelper.showLoadingView(); // view type is ViewType.LOADING -loadingHelper.showContentView(); // view type is ViewType.CONTENT -loadingHelper.showErrorView(); // view type is ViewType.ERROR -loadingHelper.showEmptyView(); // view type is ViewType.EMPTY +loadingStateView.showView(viewType); +loadingStateView.showLoadingView(); // view type is ViewType.LOADING +loadingStateView.showContentView(); // view type is ViewType.CONTENT +loadingStateView.showErrorView(); // view type is ViewType.ERROR +loadingStateView.showEmptyView(); // view type is ViewType.EMPTY ``` #### When you need to reload data. ```java -loadingHelper.setOnReloadListener(new LoadingHelper.OnReloadListener() { +loadingStateView.setOnReloadListener(new LoadingStateView.OnReloadListener() { @Override public void onReload() { // request data again @@ -114,9 +114,9 @@ holder.getOnReloadListener.onReload(); #### When you need to change view after view showed. ```java -ErrorAdapter adapter = loadingHelper.getAdapter(ViewType.Error); -adapter.errorText = "Fail to load, please wait"; -adapter.notifyDataSetChanged(); +ErrorViewDelegate errorViewDelegate = loadingStateView.getViewDelegate(ViewType.ERROR); +errorViewDelegate.errorText = "Fail to load, please wait"; +loadingStateView.notifyDataSetChanged(ViewType.ERROR); ``` ### Advanced usage @@ -125,42 +125,30 @@ adapter.notifyDataSetChanged(); If you want to add an ordinary title bar above the content. -Similar to the previous usage, create a class extends `LoadingHelper.Adapter` and set header. +Similar to the previous usage, create a class extends `LoadingStateView.ViewDelegate` and set header. ```java -loadingHelper.setDecorHeader(new TitleAdapter("title"), new SearchHeaderAdapter(onSearchListener)); +loadingStateView.setDecorHeader(new TitleViewDelegate("title"), new SearchHeaderViewDelegate()); ``` If you want to add an special title bar with linkage effect. -Create a class extends `LoadingHelper.DecorAdapter` to create a decorated view and specify a loading container. +Create a class extends `LoadingStateView.DecorViewDelegate` to create a decorated view and specify a loading container. ```java -public class ScrollDecorAdapter extends LoadingHelper.DecorAdapter { - @NotNull - @Override - public View onCreateDecorView(@NotNull LayoutInflater inflater) { - return inflater.inflate(R.layout.layout_scrolling, null); - } - - @NotNull - @Override - public ViewGroup getContentParent(@NotNull View decorView) { - return decorView.findViewById(R.id.content_parent); - } -} +public class ScrollingDecorViewDelegate extends LoadingStateView.DecorViewDelegate { @NotNull @Override public View onCreateDecorView(@NotNull LayoutInflater inflater) { return inflater.inflate(R.layout.layout_scrolling, null); } @NotNull @Override public ViewGroup getContentParent(@NotNull View decorView) { return decorView.findViewById(R.id.content_parent); }} ``` Then set it up. ```java -loadingHelper.setDecorAdapter(new ScrollDecorAdapter()); +loadingStateView.setDecorView(new ScrollingDecorViewDelegate()); ``` ## Author's other libraries -- [LoadingHelper](https://github.com/DylanCaiCoding/LoadingHelper), a highly expandable Android library for decoupling the code of toolbar or loading status view. - [ViewBindingKTX](https://github.com/DylanCaiCoding/ViewBindingKTX), the most comprehensive utils of ViewBinding. +- [ActivityResultLauncher](https://github.com/DylanCaiCoding/ActivityResultLauncher), perfect replacement for `startActivityForResult()` ## Thanks @@ -171,17 +159,5 @@ loadingHelper.setDecorAdapter(new ScrollDecorAdapter()); ## License ``` -Copyright (C) 2019. Dylan Cai - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -``` +Copyright (C) 2019. Dylan CaiLicensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License. +``` \ No newline at end of file diff --git a/README_ZH_CN.md b/README_ZH_CN.md index ea218d5..8c43700 100644 --- a/README_ZH_CN.md +++ b/README_ZH_CN.md @@ -1,10 +1,10 @@ -# LoadingHelper +# LoadingStateView [English](README.md) | 中文 -[![](https://www.jitpack.io/v/DylanCaiCoding/LoadingHelper.svg)](https://www.jitpack.io/#DylanCaiCoding/LoadingHelper) [![License](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](https://github.com/DylanCaiCoding/LoadingHelper/blob/master/LICENSE) +[![](https://www.jitpack.io/v/DylanCaiCoding/LoadingStateView.svg)](https://www.jitpack.io/#DylanCaiCoding/LoadingLoadingStateView) [![License](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](https://github.com/DylanCaiCoding/LoadingStateView/blob/master/LICENSE) -`LoadingHelper` 是一个深度解耦加载界面和标题栏的工具,只用了一个 Kotlin 文件实现,不算上注释少于 300 行代码。不仅能在请求网络数据时**显示加载中、加载成功、加载失败、无数据的视图或自定义视图**,还可以**对标题栏进行管理**。 +`LoadingStateView` 是一个深度解耦加载界面和标题栏的工具,只用了一个 Kotlin 文件实现,不算上注释少于 300 行代码。不仅能在请求网络数据时**显示加载中、加载成功、加载失败、无数据的视图或自定义视图**,还可以**对标题栏进行管理**。 详细的标题栏用法可以查看这篇文章[《史上耦合度最低的添加标题栏方式》](https://juejin.im/post/5ef01e22e51d4573eb40dab1)。 @@ -24,15 +24,15 @@ 动态添加加载状态的布局: -| [Activity(error)](app/src/main/java/com/dylanc/loadinghelper/sample/ui/ActErrorActivity.java) | [View(placeholder)](app/src/main/java/com/dylanc/loadinghelper/sample/ui/ViewPlaceholderActivity.java) | [ViewPager(timeout)](app/src/main/java/com/dylanc/loadinghelper/sample/ui/ViewPagerActivity.java) | [RecyclerView(cool loading)](app/src/main/java/com/dylanc/loadinghelper/sample/ui/RecyclerViewActivity.java) | -| :---: | :----: | :---: | :---: | -| ![](gif/activity_error.gif) | ![](gif/view_placeholder.gif) | ![](gif/viewpager_timeout.gif) | ![](gif/recyclerview_loading.gif) | +| [Activity(error)](app/src/main/java/com/dylanc/loadingstateview/sample/ui/ActErrorActivity.java) | [View(placeholder)](app/src/main/java/com/dylanc/loadingstateview/sample/ui/ViewPlaceholderActivity.java) | [ViewPager(timeout)](app/src/main/java/com/dylanc/loadingstateview/sample/ui/ViewPagerActivity.java) | [RecyclerView(cool loading)](app/src/main/java/com/dylanc/loadingstateview/sample/ui/RecyclerViewActivity.java) | +| :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | +| ![](gif/activity_error.gif) | ![](gif/view_placeholder.gif) | ![](gif/viewpager_timeout.gif) | ![](gif/recyclerview_loading.gif) | 动态添加标题栏或装饰容器: -| [SpecialHeader(custom)](app/src/main/java/com/dylanc/loadinghelper/sample/ui/CustomHeaderActivity.java) | [MultipleHeader(search)](app/src/main/java/com/dylanc/loadinghelper/sample/ui/MultipleHeaderActivity.java) | [SpecialDecorView(scrolling)](app/src/main/java/com/dylanc/loadinghelper/sample/ui/ScrollingToolbarActivity.java) | [BottomDecorView(editor)](app/src/main/java/com/dylanc/loadinghelper/sample/ui/BottomEditorActivity.java) | -| :---: | :---: | :---: | :---: | -| ![](gif/special_header_custom.gif) | ![](gif/multiple_header_search.gif) | ![](gif/special_decor_scrolling.gif) | ![](gif/bottom_decor_editor.gif) | +| [SpecialHeader(custom)](app/src/main/java/com/dylanc/loadingstateview/sample/ui/CustomHeaderActivity.java) | [MultipleHeader(search)](app/src/main/java/com/dylanc/loadingstateview/sample/ui/MultipleHeaderActivity.java) | [SpecialDecorView(scrolling)](app/src/main/java/com/dylanc/loadingstateview/sample/ui/ScrollingToolbarActivity.java) | [BottomDecorView(editor)](app/src/main/java/com/dylanc/loadingstateview/sample/ui/BottomEditorActivity.java) | +| :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | +| ![](gif/special_header_custom.gif) | ![](gif/multiple_header_search.gif) | ![](gif/special_decor_scrolling.gif) | ![](gif/bottom_decor_editor.gif) | ## 开始使用 @@ -50,68 +50,67 @@ allprojects { 在模块的 `build.gradle` 添加依赖: -``` +```groovy dependencies { - implementation 'com.github.DylanCaiCoding:LoadingHelper:2.3.0' + implementation 'com.github.DylanCaiCoding:LoadingStateView:3.0.0-alpha' } ``` ### 基础用法 -第一步,创建一个适配器继承 `LoadingHelper.Adapter`,写法与 `RecyclerView.Adapter` 类似。如果需要实现点击重新请求数据,可以在点击事件调用 holder.getOnReloadListener.onReload() 方法。 +第一步,创建一个类继承 `LoadingStateView.ViewDelegate`,写法与 `RecyclerView.Adapter` 类似。如果需要实现点击重新请求数据,可以在点击事件调用 holder.getOnReloadListener.onReload() 方法。 ```java -public class LoadingAdapter extends LoadingHelper.Adapter { +public class LoadingViewDelegate extends LoadingStateView.ViewDelegate { @NonNull @Override - public LoadingHelper.ViewHolder onCreateViewHolder(@NonNull LayoutInflater inflater, @NonNull ViewGroup parent) { - return new LoadingHelper.ViewHolder(inflater.inflate(R.layout.layout_loading_view, parent, false)); + public LoadingStateView.ViewHolder onCreateViewHolder(@NonNull LayoutInflater inflater, @NonNull ViewGroup parent) { + return new LoadingStateView.ViewHolder(inflater.inflate(R.layout.layout_loading_view, parent, false)); } @Override - public void onBindViewHolder(@NonNull LoadingHelper.ViewHolder holder) { - + public void onBindViewHolder(@NonNull LoadingStateView.ViewHolder holder) { } } ``` -第二步,注册适配器,关联一个视图类型。有五个默认类型,也可以传任意类型数据进行注册。 +第二步,注册 `ViewDelegate`,关联一个视图类型。有五个默认类型,也可以传任意类型数据进行注册。 ```java -LoadingHelper loadingHelper = new LoadingHelper(this); // 可传 Activity 或 View -loadingHelper.register(ViewType.LOADING, new LoadingAdapter()); +LoadingStateView loadingStateView = new LoadingStateView(this); // 可传 Activity 或 View +loadingStateView.register(ViewType.LOADING, new LoadingViewDelegate()); // 当需要支持点击重新请求数据时 -loadingHelper.setOnReloadListener(() -> {}) +loadingStateView.setOnReloadListener(() -> {}) ``` -如果想注册成全局的适配器,需要配置默认的适配器池。 +如果需要注册成全局的 `ViewDelegate`。 ```java -LoadingHelper.setDefaultAdapterPool(adapterPool -> { - adapterPool.register(ViewType.LOADING, new LoadingAdapter()); - return Unit.INSTANCE; +loadingStateView.setViewDelegatePool(pool -> { + pool.register(ViewType.LOADING, new LoadingViewDelegate()); + return null; }); ``` 第三步,显示对应类型的视图。 ```java -loadingHelper.showView(viewType); -loadingHelper.showLoadingView(); // 对应视图类型 ViewType.LOADING -loadingHelper.showContentView(); // 对应视图类型 ViewType.CONTENT -loadingHelper.showErrorView(); // 对应视图类型 ViewType.ERROR -loadingHelper.showEmptyView(); // 对应视图类型 ViewType.EMPTY +loadingStateView.showView(viewType); +loadingStateView.showLoadingView(); // 对应视图类型 ViewType.LOADING +loadingStateView.showContentView(); // 对应视图类型 ViewType.CONTENT +loadingStateView.showErrorView(); // 对应视图类型 ViewType.ERROR +loadingStateView.showEmptyView(); // 对应视图类型 ViewType.EMPTY ``` **动态更新已显示视图** -在显示了视图之后,可以对视图进行更改刷新。用法和 `RecyclerView.Adapter` 一样,调用 `notifyDataSetChanged()` 后,会执行适配器的 `onBindViewHolder()` 方法。 +在显示了视图之后,可以对视图进行更改刷新。和 `RecyclerView.Adapter` 类似,调用 `notifyDataSetChanged()` 后,会执行适配器的 `onBindViewHolder()` 方法。 ```java -ErrorAdapter errorAdapter = loadingHelper.getAdapter(ViewType.ERROR); -errorAdapter.errorText = "服务器繁忙,请稍后重试"; -errorAdapter.notifyDataSetChanged(); +ErrorViewDelegate errorViewDelegate = loadingStateView.getViewDelegate(ViewType.ERROR); +errorViewDelegate.errorText = "服务器繁忙,请稍后重试"; +loadingStateView.notifyDataSetChanged(ViewType.ERROR); ``` ### 高级用法 @@ -120,10 +119,10 @@ errorAdapter.notifyDataSetChanged(); 如果是**普通的标题栏**,就是简单地在内容的上方添加标题栏: -和前面的用法类似,先创建一个继承 `LoadingHelper.Adapter` 的标题栏适配器,然后就能在内容的上方添加标题栏了,可以添加多个头部。 +和前面的用法类似,先创建一个继承 `LoadingStateView.ViewDelegate` 的标题栏适配器,然后就能在内容的上方添加标题栏了,可以添加多个头部。 ```java -loadingHelper.setDecorHeader(new TitleAdapter("标题名"), new SearchHeaderAdapter(onSearchListener)); +loadingStateView.setDecorHeader(new TitleViewDelegate("标题名"), new SearchHeaderViewDelegate()); ``` 如果是**特殊的标题栏**,比如有联动效果,就不能直接使用上面的方式了。这时我们要给内容增加个装饰的容器。 @@ -131,70 +130,19 @@ loadingHelper.setDecorHeader(new TitleAdapter("标题名"), new SearchHeaderAdap 先实现一个不含内容的布局。 ```xml - - - - - - - - - - - - - - - + ``` -创建一个类继承另一个适配器 `LoadingHelper.DecorAdapter` ,加载实现的布局,并指定一个添加内容的容器。 +创建一个类继承另一个适配器 `LoadingStateView.DecorViewDelegate` ,加载实现的布局,并指定一个添加内容的容器。 ```java -public class ScrollDecorAdapter extends LoadingHelper.DecorAdapter { - @NotNull - @Override - public View onCreateDecorView(@NotNull LayoutInflater inflater) { - return inflater.inflate(R.layout.layout_scrolling, null); - } - - @NotNull - @Override - public ViewGroup getContentParent(@NotNull View decorView) { - return decorView.findViewById(R.id.content_parent); - } -} +public class ScrollingDecorViewDelegate extends LoadingStateView.DecorViewDelegate { @NotNull @Override public View onCreateDecorView(@NotNull LayoutInflater inflater) { return inflater.inflate(R.layout.layout_scrolling, null); } @NotNull @Override public ViewGroup getContentParent(@NotNull View decorView) { return decorView.findViewById(R.id.content_parent); }} ``` 最后设置一下就可以了。 ```java -loadingHelper.setDecorAdapter(new ScrollDecorAdapter()); +loadingStateView.setDecorView(new ScrollingDecorViewDelegate()); ``` 上述的两种使用方式都是可以进行多次设置,不过每次设置会把上一次设置的样式给替换掉。 @@ -202,7 +150,7 @@ loadingHelper.setDecorAdapter(new ScrollDecorAdapter()); ## 作者其它的库 - [ViewBindingKTX](https://github.com/DylanCaiCoding/ViewBindingKTX) —— 最全面的 ViewBinding 工具 -- [ActivityResultLauncher](https://github.com/DylanCaiCoding/ActivityResultLauncher) —— 完美替代 `startActivityForResult()` +- [ActivityResultLauncher](https://github.com/DylanCaiCoding/ActivityResultLauncher) —— 优雅地替代 `startActivityForResult()` ## 感谢 @@ -213,17 +161,5 @@ loadingHelper.setDecorAdapter(new ScrollDecorAdapter()); ## License ``` -Copyright (C) 2019. Dylan Cai - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -``` +Copyright (C) 2019. Dylan CaiLicensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License. +``` \ No newline at end of file