Flexbox-Layout v0.2.3 发布, Android实现类似 Flexbox 布局

jopen 8年前
   <p style="text-align: center;"><img alt="" src="https://simg.open-open.com/show/df6c62812675f0c6f89c8c7c12d186df.png" /></p>    <p>Flexbox 是属于web前端领域CSS的一种布局方案,是2009年W3C提出了一种新的布局方案,可以简便、完整、响应式地实现各种页面布局,并且 React Native 也是使用的 Flex 布局。你可以简单的理解为 Flexbox 是CSS领域类似 Linearlayout 的一种布局,但是要比 Linearlayout 要强大的多。</p>    <p>在 Android 开发中使用 Linearlayout + RelativeLayout 基本可以实现大部分复杂的布局,但是Google就想了,有没有类似 Flexbox 的一个布局呢?这使用起来一个布局就可以搞定各种复杂的情况了,于是 FlexboxLayout 就应运而生了。 所以 FlexboxLayout 是针对 Android 平台的,实现类似 Flexbox 布局方案。</p>    <h2>更新日志</h2>    <ul>     <li> <p>Adds the feature to put dividers between flex items or flex lines. Following attributes are now supported ( <a href="/misc/goto?guid=4958992488062819817">#100</a> )</p>      <ul>       <li>showDivider</li>       <li>showDividerHorizontal</li>       <li>showDividerVertical</li>       <li>dividerDrawable</li>       <li>dividerDrawableHorizontal</li>       <li>dividerDrawableVertical</li>      </ul> </li>     <li> <p>Exposes the <code>FlexLine</code> class and <code>getFlexLines()</code> method to offer the read-only information about the flex lines contained in the FlexboxLayout. ( <a href="/misc/goto?guid=4958992488181252137" title="Expose the FlexLine class and mFlexLines">#102</a> )</p> </li>     <li> <p>Fixes the issue that an empty flex line is added if the initial length of the first item is large ( <a href="/misc/goto?guid=4958992488286235087">#88</a>)</p> </li>    </ul>    <h2>下载</h2>    <ul>     <li><a href="/misc/goto?guid=4958992488413233405" rel="nofollow"><strong>Source code</strong> (zip)</a></li>     <li><a href="/misc/goto?guid=4958992488549967722" rel="nofollow"><strong>Source code</strong> (tar.gz)</a></li>    </ul>