flexbox-layout icon indicating copy to clipboard operation
flexbox-layout copied to clipboard

FlexboxLayoutManager did not display all items with FlexWrap.WRAP and FlexDirection.COLUMN

Open liangtg opened this issue 6 years ago • 2 comments

  • [x] I have searched existing issues and confirmed this is not a duplicate

Issues and steps to reproduce

  • FlexboxLayoutManager did not display all items with FlexWrap.WRAP and FlexDirection.COLUMN
  • some item lost

this is main code

        FlexboxLayoutManager layoutManager = new FlexboxLayoutManager(this);
        layoutManager.setFlexWrap(FlexWrap.WRAP);
        layoutManager.setFlexDirection(FlexDirection.COLUMN);

Expected behavior

FlexboxLayoutManager should display all items

Version of the flexbox library

com.google.android:flexbox:1.0.0

Link to code

https://github.com/liangtg/flexbox-test

liangtg avatar Jul 24 '18 09:07 liangtg

Any news ? I have the same problem. Only 16 items of my 26 items are displayed.

geotinc avatar Nov 21 '18 13:11 geotinc

Any news ? I have the same problem. Only 16 items of my 26 items are displayed.

@geotinc this solved my problem:

    @Override
    public void onBindViewHolder(@NonNull AdapterViewHolder holder, int position) {
        FlexboxLayoutManager.LayoutParams lp = (FlexboxLayoutManager.LayoutParams) holder.itemView.getLayoutParams();
        lp.width = screenwidth;

liangtg avatar Nov 26 '18 02:11 liangtg