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

jopen 7年前
   <p style="text-align: center;"><strong><img alt="" src="https://simg.open-open.com/show/df6c62812675f0c6f89c8c7c12d186df.png" /></strong></p>    <p> </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>    <p> </p>    <h2>更新日志</h2>    <ul>     <li> <p>Fix the issue invalid height is set in the following situation (<a href="/misc/goto?guid=4958995570916602476">#139</a>)</p>      <ul>       <li>flex direction is set to row (or row_reverse)</li>       <li>FlexboxLayout has a TextView (or other views that expand vertically if not enough space is left horizontally)</li>       <li>TextView's layout_width is set to 0dp, layout_height is set to wrap_content and layout_flexGrow is set to positive</li>      </ul> </li>     <li> <p>Fix the center alignment when margin is set only one side of a flex item to be consistent with the CSS spec (<a href="/misc/goto?guid=4958995571025383895">#138</a>)</p> </li>    </ul>    <h2>下载</h2>    <ul>     <li><a href="/misc/goto?guid=4958995571132988783" rel="nofollow"><strong>Source code</strong> (zip)</a></li>     <li><a href="/misc/goto?guid=4958995571235729479" rel="nofollow"><strong>Source code</strong> (tar.gz)</a></li>    </ul>    <p>本站原创,转载时保留以下信息:<br /> 本文转自:深度开源(open-open.com)<br /> 原文地址:<a href="http://www.open-open.com/news/view/7d5dcb4b">http://www.open-open.com/news/view/7d5dcb4b</a></p>