-
Notifications
You must be signed in to change notification settings - Fork 535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
【问答】怎么限制FlexboxLayout的行数呢? #638
Comments
目前好像没有对应的办法 ,不过如果子元素高度知道的会 ,设置一下maxheight 可以满足 |
解决了吗?我也遇到这个问题 |
如果业务只是需要 FlexboxLayout 的流式布局,又希望限制行高的话,用你现在的方式还不如直接自定义 ViewGroup 来实现。 另外,FlexboxLayout 的 issue 里面也有人提出希望有一个 |
也不能获取flexboxlayout的行数。 |
1.0.0已经支持了 |
设置了MAXLINE=2.第2行后面显示不下的ITEM 都挤压到第2行了,是我配置不对吗? 我是 1.0 版本 FlexboxLayoutManager flexboxLayoutManager = new FlexboxLayoutManager(this); |
好像有这个问题。。。那么setMaxLine并没什么卵用的样子 |
你好,可以参考下代码吗 |
check this: google/flexbox-layout#156 (comment) |
可以设置RecyclerView的高度来限制行数,android:layout_height="xxdp" |
如何限制超过两行末尾加省略号呢? |
完美解决 |
就是要限制 FlexboxLayout的行数为4行,多出来的数据就不在显示。我现在用获取FlexboxLayout的高度和子控件的高度来判断,是否添加到FlexboxLayout。但是,FlexboxLayout的getMeasuredHeight 一直是109。没有变化。有没有人好的想法呢?
The text was updated successfully, but these errors were encountered: