Skip to content

Commit 857ccd6

Browse files
Update README.md
1 parent d4006ee commit 857ccd6

File tree

1 file changed

+2
-29
lines changed

1 file changed

+2
-29
lines changed

README.md

+2-29
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ English | [中文](README_ZH_CN.md)
1515
- Support for set reload event.
1616
- Support for update views anytime.
1717
- Support for use with most third-party libraries.
18-
- Support for preprocessing the content view.
1918

2019
## Demo
2120

@@ -48,7 +47,7 @@ Add dependencies in your module `build.gradle` :
4847

4948
```
5049
dependencies {
51-
implementation 'com.github.DylanCaiCoding:LoadingHelper:2.2.0'
50+
implementation 'com.github.DylanCaiCoding:LoadingHelper:2.3.0'
5251
}
5352
```
5453

@@ -129,9 +128,7 @@ If you want to add an ordinary title bar above the content.
129128
Similar to the previous usage, create a class extends `LoadingHelper.Adapter<VH extends ViewHolder>` and set header.
130129

131130
```java
132-
loadingHelper.register(ViewType.TITLE, new TitleAdapter("title"));
133-
loadingHelper.register(VIEW_TYPE_SEARCH, new SearchHeaderAdapter(onSearchListener));
134-
loadingHelper.setDecorHeader(ViewType.TITLE, VIEW_TYPE_SEARCH);
131+
loadingHelper.setDecorHeader(new TitleAdapter("title"), new SearchHeaderAdapter(onSearchListener));
135132
```
136133

137134
If you want to add an special title bar with linkage effect.
@@ -160,30 +157,6 @@ Then set it up.
160157
loadingHelper.setDecorAdapter(new ScrollDecorAdapter());
161158
```
162159

163-
#### Preprocessing the content view
164-
165-
Create a adapter extends `LoadingHelper.ContentAdapter<VH extends ViewHolder>`.
166-
167-
```java
168-
public class CommonContentAdapter extends LoadingHelper.ContentAdapter<LoadingHelper.ViewHolder> {
169-
@Override
170-
public LoadingHelper.ViewHolder onCreateViewHolder(@NonNull View contentView) {
171-
return new LoadingHelper.ViewHolder(contentView);
172-
}
173-
174-
@Override
175-
public void onBindViewHolder(@NonNull LoadingHelper.ViewHolder holder) {
176-
View contentView = holder.getRootView();
177-
}
178-
}
179-
```
180-
181-
Create a `LoadingHelper` with the `ContentAdapter`.
182-
183-
```java
184-
LoadingHelper loadingHelper = new LoadingHelper(this, new CommonContentAdapter());
185-
```
186-
187160
## Thanks
188161

189162
- [luckbilly/Gloading](https://github.com/luckybilly/Gloading) Optimize my library standing on the shoulders of giants.

0 commit comments

Comments
 (0)