All Projects → bingoogolapple → Bgaflowlayout Android

bingoogolapple / Bgaflowlayout Android

Android 流式布局,可配置是否将每一行的空白区域平均分配给子控件

Programming Languages

java
68154 projects - #9 most used programming language

🏃BGAFlowLayout-Android🏃

Maven Central

Android流式布局,可配置是否将每一行的空白区域平均分配给子控件。

最开始是参考鸿洋_的这篇文章的思路实现的,后来根据产品经理出的需求,增加了将每一行的空白区域平均分配给子控件。

demo中分别演示了在xml使用方式和在java代码中动态添加

效果图

Image of 平均分配剩余空间 Image of 不平均分配剩余空间

Gradle依赖

dependencies {
    compile 'cn.bingoogolapple:bga-flowlayout:[email protected]'
}

自定义属性说明

<declare-styleable name="BGAFlowLayout">
    <!-- 标签之间的水平间距 -->
    <attr name="fl_horizontalChildGap" format="dimension" />
    <!-- 标签之间的垂直间距 -->
    <attr name="fl_verticalChildGap" format="dimension" />
    <!-- 是否平均分配每一行的剩余水平方向的空白区域给该行的标签 -->
    <attr name="fl_isDistributionWhiteSpacing" format="boolean" />
</declare-styleable>

关于我

新浪微博 个人主页 邮箱 BGA系列开源库QQ群
bingoogolapple bingoogolapple.cn [email protected] BGA_CODE_CLUB
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].