GithubHelp home page GithubHelp logo

zhuhui / bgaflowlayout-android Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bingoogolapple/bgaflowlayout-android

0.0 1.0 0.0 766 KB

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

Java 100.00%

bgaflowlayout-android's Introduction

🏃BGAFlowLayout-Android v1.0.0🏃

关于我
微博:bingoogolapple    主页:bingoogolapple.cn    邮箱:[email protected]

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

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

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

效果图

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

Gradle依赖

dependencies {
    compile 'cn.bingoogolapple:bga-flowlayout:1.0.0@aar'
}

自定义属性说明

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

代码是最好的老师,更多详细用法请查看Demo

bgaflowlayout-android's People

Contributors

bingoogolapple avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.