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

Avoid separate implementations for each LayoutManager #22

Open
dgreenhalgh opened this issue Mar 25, 2016 · 0 comments
Open

Avoid separate implementations for each LayoutManager #22

dgreenhalgh opened this issue Mar 25, 2016 · 0 comments
Milestone

Comments

@dgreenhalgh
Copy link

In order for this library to be simple, we shouldn't make the user use a separate API if they are using a different LayoutManager. Let's get the LayoutManager from the parent RecyclerView in ItemDecoration.getItemOffsets and switch behavior based on it. This will allow us to fold the following implementations together:

  • DividerItemDecoration <- GridDividerItemDecoration
  • StartOffsetItemDecoration <- GridTopOffsetItemDecoration
  • EndOffsetItemDecoration <- GridBottomOffsetItemDecoration

Moving forward with just three ItemDecorations will enhance the usefulness of Simple Item Decoration as a library, rather than a collection of samples.

@dgreenhalgh dgreenhalgh added this to the 2.0 milestone Mar 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant