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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable recycling of views within groups #657

Merged
merged 4 commits into from Jan 22, 2019
Merged

Conversation

elihart
Copy link
Contributor

@elihart elihart commented Jan 12, 2019

There has been a limitation in EpoxyModelGroup that groups with the same view type had to contain the same number of models. This made it very inflexible for dynamically changing group size. Additionally, groups couldn't share subviews between each other, so view recycling was not as effective.

This changes groups to recycle child views into a shared pool among all groups - which also enables groups to have dynamic amounts of models.

This also adds kotlin to the project for the first time 馃帀

This works in the sample app, but I still need to write quite a few tests for it.

@ngsilverman @gpeal

@@ -22,6 +22,7 @@ dependencies {
implementation rootProject.deps.androidAnnotations
implementation rootProject.deps.androidRecyclerView
implementation rootProject.deps.androidDesignLibrary
implementation rootProject.deps.kotlin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like Checkstyle for Java, do you want to bring ktlint for the Kotlin code ?
However here will be a bunch of code to re-format it the annotation processor that is already in Kotlin.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think ktlint would be great - we would just have to reformat all existing kotlin code to match.

I don't feel like doing it in this PR (since there is already a lot of other kotlin code), but it would be a good thing to do soon.

Thanks for bringing it up, I'll create an issue.

@elihart elihart force-pushed the eli-group_recycling branch 2 times, most recently from d92fe45 to f22f9bc Compare January 19, 2019 23:46
@elihart
Copy link
Contributor Author

elihart commented Jan 19, 2019

This has been updated with tests, and a few fixes, plus formatting with ktlint since it was added

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

Successfully merging this pull request may close these issues.

None yet

2 participants