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

Inject RecycledViewPool by using Dagger2 #662

merged 2 commits into from Feb 10, 2018


None yet
5 participants

chibatching commented Feb 10, 2018


  • no issue

Overview (Required)

  • Share RecycledViewPool by using Dagger module
    • ViewModel must not reference a view instance. It may cause memory leaking.



Before After
import io.github.droidkaigi.confsched2018.presentation.MainActivity

@Module interface MainActivityBuilder {
@ContributesAndroidInjector(modules = [MainActivityModule::class])
@ContributesAndroidInjector(modules = [MainActivityModule::class, RecycledViewPoolModule::class])

This comment has been minimized.


droidkaigibot Feb 10, 2018

⚠️ Exceeded max line length (100)

This comment has been minimized.


eyedol Mar 6, 2018


This is unrelated to the PR but I'm curious what tool you're using for the automatic code reviews. Looking to implement something similar for my projects. Thanks.


This comment has been minimized.


jmatsu commented Feb 10, 2018


import dagger.Module
import dagger.Provides

// Share RecycledViewPool between content fragments of ViewPager.

This comment has been minimized.


jmatsu approved these changes Feb 10, 2018


@jmatsu jmatsu merged commit 2e0ddf7 into DroidKaigi:master Feb 10, 2018

2 checks passed

ci/circleci Your tests passed on CircleCI!
danger/danger All green. Woo!

@chibatching chibatching deleted the chibatching:share_view_pool_via_daggaer branch Feb 10, 2018


This comment has been minimized.


chibatching commented Feb 10, 2018

Thanks! 😄

@takahirom takahirom added the awesome label Feb 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment