Skip to content

Commit da499f9

Browse files
Update README.md
1 parent 36f2bee commit da499f9

File tree

1 file changed

+29
-4
lines changed

1 file changed

+29
-4
lines changed

README.md

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
English | [中文](README_ZH_CN.md)
44

5+
>The original library name was [LoadingHelper](https://github.com/DylanCaiCoding/LoadingHelper)
6+
57
[![](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)
68

7-
`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.**
9+
`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 and customized view** when loading network data, but also **manages title bar.**
810

911
## Feature
1012

@@ -136,7 +138,17 @@ If you want to add an special title bar with linkage effect.
136138
Create a class extends `LoadingStateView.DecorViewDelegate` to create a decorated view and specify a loading container.
137139

138140
```java
139-
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); }}
141+
class ScrollingDecorViewDelegate : LoadingStateView.DecorViewDelegate() {
142+
@NotNull
143+
override fun onCreateDecorView(@NotNull inflater: LayoutInflater): View {
144+
return inflater.inflate(R.layout.layout_scrolling, null)
145+
}
146+
147+
@NotNull
148+
fun getContentParent(@NotNull decorView: View): ViewGroup {
149+
return decorView.findViewById(R.id.content_parent)
150+
}
151+
}
140152
```
141153

142154
Then set it up.
@@ -159,5 +171,18 @@ loadingStateView.setDecorView(new ScrollingDecorViewDelegate());
159171
## License
160172

161173
```
162-
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.
163-
```
174+
175+
Copyright (C) 2019. Dylan Cai
176+
177+
Licensed under the Apache License, Version 2.0 (the "License");
178+
you may not use this file except in compliance with the License.
179+
You may obtain a copy of the License at
180+
181+
http://www.apache.org/licenses/LICENSE-2.0
182+
183+
Unless required by applicable law or agreed to in writing, software
184+
distributed under the License is distributed on an "AS IS" BASIS,
185+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
186+
See the License for the specific language governing permissions and
187+
limitations under the License.
188+
```

0 commit comments

Comments
 (0)