ChipsLayoutManager icon indicating copy to clipboard operation
ChipsLayoutManager copied to clipboard

Bug : setMaxViewsInRow doesn't work

Open AndroidDeveloperLB opened this issue 8 years ago • 1 comments

I use this:

    ChipsLayoutManager chipsLayoutManager = ChipsLayoutManager.newBuilder(getActivity())
            .setChildGravity(Gravity.CENTER)
            .setScrollingEnabled(true)
            .setRowStrategy(ChipsLayoutManager.STRATEGY_FILL_VIEW ).withLastRow(true)
            .setMaxViewsInRow(3)
            .build();

Yet I can still see 4 in a single row:

image

Not only that, but the last item is truncated, while the first item has a lot of space compared to the others...

AndroidDeveloperLB avatar May 15 '17 07:05 AndroidDeveloperLB

This function specify when break row and start build item in next row ,this function return true when you want to start new row for items .setRowBreaker(new IRowBreaker() { @Override public boolean isItemBreakRow(@IntRange(from = 0) int position) { return position == 6 || position == 11 || position == 2; } })

MohammedObaidDev avatar Jan 05 '22 11:01 MohammedObaidDev