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

How to use same spacing for auto-spacing between views and on sides? #37

Open
AndroidDeveloperLB opened this issue May 15, 2017 · 0 comments

Comments

@AndroidDeveloperLB
Copy link

AndroidDeveloperLB commented May 15, 2017

Is it possible to set the spacing between the items (and on the edges), so that it will be even? Something like the weight used on LinearLayout?
Is it STRATEGY_FILL_SPACE or STRATEGY_FILL_VIEW?

I tried to use :

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

But it doesn't put space at the edges of the items, only between them:

image

Using STRATEGY_FILL_VIEW, it's almost what I wrote, but it puts half of the space at the edges:

image

@AndroidDeveloperLB AndroidDeveloperLB changed the title questions: max items + auto-spacing auto-spacing possible? May 15, 2017
@AndroidDeveloperLB AndroidDeveloperLB changed the title auto-spacing possible? How to use auto-spacing between views and on sides? May 15, 2017
@AndroidDeveloperLB AndroidDeveloperLB changed the title How to use auto-spacing between views and on sides? How to use same spacing for auto-spacing between views and on sides? May 15, 2017
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

1 participant