# LayoutManagerDemo
**Repository Path**: lzbgit/LayoutManagerDemo
## Basic Information
- **Project Name**: LayoutManagerDemo
- **Description**: RecycylerView的自定义LayoutManger示例
- **Primary Language**: Java
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2018-08-07
- **Last Updated**: 2020-12-19
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
### 一 抖音实现思路
1.添加OnChildAttachStateChangeListener监听,实现attached、detach的方法;
2.重写scrollVerticalBy方法获取偏移量dy,通过dy可以判断上滑获取下滑;
3.重写onScrollStateChanged方法对滑动状态进行监听,为RecyclerView.SCROLL_STATE_IDLE播放下一个视频;
[抖音示例](https://gitee.com/lzbgit/LayoutManagerDemo/blob/master/LayoutManagerGroup/src/main/java/com/dingmouren/layoutmanagergroup/viewpager/ViewPagerLayoutManager.java)
### 其他

### 喜欢的就点个星星吧
**gradle导入:**
* 1.项目 的build.gralde中添加
```
allprojects{
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```
* 2.添加依赖
```
dependencies {
implementation 'com.github.DingMouRen:LayoutManagerGroup:1e6f4f96eb'
}
```
| EchelonLayoutManager | SkidRightLayoutManager | SlideLayoutManager |
| :----: | :---:| :---:|
| | | |
| PickerLayoutManager | BannerLayoutManager | ViewPagerLayoutManager |
| :---:| :---:|:---:|
| |||
#### 未完待你续...
注意:不建议直接用到项目中,这个开源项目旨在分享。
## License
```
Copyright (C) 2018 DingMouRen
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
```