Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yingLanNull/ScrollLayout
上拉滑动上滑拖出 类似百度地图抽屉拖拽效果 Upward sliding out
https://github.com/yingLanNull/ScrollLayout
Last synced: about 1 month ago
JSON representation
上拉滑动上滑拖出 类似百度地图抽屉拖拽效果 Upward sliding out
- Host: GitHub
- URL: https://github.com/yingLanNull/ScrollLayout
- Owner: yingLanNull
- License: apache-2.0
- Created: 2016-08-17T01:52:15.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-01T01:12:05.000Z (almost 7 years ago)
- Last Synced: 2024-08-02T01:22:31.168Z (4 months ago)
- Language: Java
- Homepage:
- Size: 12 MB
- Stars: 798
- Watchers: 15
- Forks: 163
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-github-android-ui - ScrollLayout - 场景抽屉拖拽效果 (滚动效果(Scroll))
README
# ScrollLayout
## Abstract 摘要
在ScrollView或者ListView里面使用ViewPager.支持手势上拉滑出,中途停顿,下滑退出页面,类似百度地图内场景抽屉拖拽效果效果## Gif 动画
![1](https://github.com/yingLanNull/ScrollLayout/blob/master/Show/demo.gif)## Similar 类似使用
![1](https://github.com/yingLanNull/ScrollLayout/blob/master/Show/Screenshot18.png)
![2](https://github.com/yingLanNull/ScrollLayout/blob/master/Show/Screenshot42.png)
![3](https://github.com/yingLanNull/ScrollLayout/blob/master/Show/Screenshot58.png)## Demo 下载APK体验
[下载 Download Demo](https://github.com/yingLanNull/ScrollLayout/raw/master/Show/app-debug.apk)## Usage 使用方法
### Step 1
#### Gradle 配置
```
dependencies {
compile 'com.yinglan.scrolllayout:scrolllayout:1.0.2'
}
```### Step 2
#### Function and parameter definitions 功能与参数定义
ScrollLayout
ContentRecyclerView
ContentListView
ContentScrollView
配置参数
参数含义
allowHorizontalScroll
是否支持横向滚动
exitOffset
最低部退出状态时可看到的高度,0为不可见
isSupportExit
是否支持下滑退出,支持会有下滑到最底部时的回调
maxOffset
打开状态时内容显示区域的高度
minOffset
关闭状态时最上方预留高度
mode
位置状态,关闭、打开、底部
#### In layout
```
//默认位置状态,关闭、打开、底部```
### or
#### In Java Code
```
{
mScrollLayout.setMinOffset(0);
mScrollLayout.setMaxOffset(800);
mScrollLayout.setExitOffset(500);
mScrollLayout.setToOpen();
mScrollLayout.setIsSupportExit(true);
mScrollLayout.setAllowHorizontalScroll(true);
mScrollLayout.setOnScrollChangedListener(mOnScrollChangedListener);
}```
## Other 其它
依赖内包含重写的ContentScrollView、ContentListView与ContentRecyclerView
可在ScrollLayout里面里面使用ViewPager等功能,配合使用效果更佳。
感谢[Ted](https://github.com/xiongwei-git)的库给的方向。## License
The work done has been licensed under Apache License 2.0. The license file can be found
[here](LICENSE). You can find out more about the license at:http://www.apache.org/licenses/LICENSE-2.0