# VLayoutDemo
**Repository Path**: lzbgit/VLayoutDemo
## Basic Information
- **Project Name**: VLayoutDemo
- **Description**: No description available
- **Primary Language**: Java
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2018-08-04
- **Last Updated**: 2020-12-19
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# VLayoutDemo
### 一 VLayout使用
1.添加依赖包
>implementation 'com.alibaba.android:vlayout:1.0.3@aar'
>
>implementation 'com.android.support:recyclerview-v7:28.0.0-beta01'
2.九大布局
>LinearLayoutHelper——线性布局
>
>GridLayoutHelper——Grid布局
>
>ScrollFixLayoutHelper——固定布局
>
>FloatLayoutHelper——浮动布局
>
>ColumnLayoutHelper——栏格布局
>
>SingleLayoutHelper—— 一个元素布局
>
>OnePlusNLayoutHelper——一拖N布局
>
>StickyLayoutHelper——stikcy布局
>
>StaggeredGridLayoutHelper——瀑布流布局
[使用案例](https://gitee.com/lzbgit/VLayoutDemo/blob/master/app/src/main/java/com/example/administrator/usevlayout/MainActivity.java)
### 二 自动换行的标签
1. 思路
> (1) 自定义LayoutManger集成LayoutManger;
> (2) 重写onLayoutChildren方法,对子View进行重新布局 当offsetX + w > getWidth()换行,并且记录Recycle的总高度;
> (3) 重写scrollVerticallyBy方法实现Recycle的上下滚动;
> (4) 把不可见View进行回收,可见的View从回收池中,显示到屏幕上;
[示例](https://gitee.com/lzbgit/VLayoutDemo/blob/master/FlowLayoutManagerDemo/src/main/java/com/dongnao/layoutmanagerflow/AutoLayoutManager.java)