作者热门文章
- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
是否有要为 Android 的 LinearLayout 设置的属性使其能够正确包装子控件?
含义 - 我有可变数量的 child ,并希望将它们水平排列,例如:
Example: Control1, Control2, Control3, ...
我通过设置来做到这一点:
ll.setOrientation(LinearLayout.HORIZONTAL);foreach (Child c in children) ll.addView(c);
但是,如果我有很多 child ,最后一个会被切断,而不是转到下一行。
知道如何解决这个问题吗?
最佳答案
截至 2016 年 5 月,Google 创建了自己的 FlexBoxLayout
,应该可以解决您的问题。
您可以在此处找到 GitHub 存储库:https://github.com/google/flexbox-layout
关于Android - LinearLayout Horizontal with wrapping children,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2961777/
我是一名优秀的程序员,十分优秀!