Skip to content

Commit 15901be

Browse files
authored
Update README.md
1 parent 8610500 commit 15901be

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,31 @@
11
# OverScrollLayout
22
类似iOS上下拉回弹效果的视图,附加上下拉加载更多的功能
3+
4+
# 效果图
5+
![效果图](https://github.com/ShaqCc/OverScrollLayout/blob/master/OverScrollLayout/screenshot/jdfw.gif)
6+
7+
# 使用方法
8+
1.下载代码,将该项目中的library作为自己的本地依赖
9+
2.XML文件如下:
10+
11+
```xml
12+
<FrameLayout
13+
xmlns:android="http://schemas.android.com/apk/res/android"
14+
android:layout_width="match_parent"
15+
android:layout_height="match_parent">
16+
17+
<com.bayin.library.view.OsContainer
18+
android:id="@+id/container"
19+
android:layout_width="match_parent"
20+
android:layout_height="match_parent"/>
21+
22+
</FrameLayout>
23+
```
24+
3.java代码如下:
25+
26+
```java
27+
OsContainer container = (OsContainer) findViewById(R.id.container);
28+
//参数传递自己的xml布局
29+
container.setChildView(new OsTopLayout(this, R.layout.top_layout),
30+
new OsBottomLayout(this, R.layout.bottom_layout));
31+
```

0 commit comments

Comments
 (0)