Skip to content
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

Bug : setMaxViewsInRow doesn't work #38

Open
AndroidDeveloperLB opened this issue May 15, 2017 · 1 comment
Open

Bug : setMaxViewsInRow doesn't work #38

AndroidDeveloperLB opened this issue May 15, 2017 · 1 comment

Comments

@AndroidDeveloperLB
Copy link

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...

@MohammedObaidDev
Copy link

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;
}
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants