Flexbox-Layout v0.2.5 发布, 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>layout_height is set to wrap_content for the FlexboxLayout</li>     <li>Bottom (or top) margin is set to a child</li>     <li>The child which has the bottom (top) margin has the largest height in the same flex line (or only a single child exists)</li>     <li>The child has a positive layout_flexGrow attribute set</li>    </ul>    <h2>下载</h2>    <ul>     <li><a href="/misc/goto?guid=4958996178633632002" rel="nofollow"><strong>Source code</strong> (zip)</a></li>     <li><a href="/misc/goto?guid=4958996178725209703" 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/1a1ea49e">http://www.open-open.com/news/view/1a1ea49e</a></p>