Giter VIP home page Giter VIP logo

dagger-android-injection's Introduction

dagger-android-injection's People

Contributors

iammert avatar pramodgarg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dagger-android-injection's Issues

How does MainActivityComponent get a MainActivity context?

How does MainActivityComponent get a MainActivity context?
We can use @BindsInstance method in inner Builder interface in MainActivityComponent (Subcomponent) and specify MainActivity (or Context) as parameter or just send MainActivity's Context in constructor of MainActvityModule. But I can not find where in your sample app you send the MainActivity's context. Could you explain me, please?

How can I add modules to fragment binder?

I want to add some modules to fragment binder. For example,
@ContributesAndroidInjector(modules = {RoomModule.class, RestServiceModule.class, UtilsModule.class}) abstract WatchedMoviesFragment provideWatchedMoviesFragmentFactory();

But I need to write setters for this modules. Where should I do that?
Error: @Subcomponent.Builder is missing setters for required modules or subcomponents: [xx.RoomModule, xx.UtilsModule]

Question about AppComponent.java

Hi, thanks for an amazing example, I have a question about two lines in the AppComponent.java, see below, what is the purpose of these lines? without these lines the app seems to work fine

    void inject(AndroidSampleApp app);

    @Override
    void inject(DaggerApplication instance);

Create a Kotlin version

I came across with your excellent explanation about the New Android Injector with Android 2. As a matter of fact, I suggest creating a branch with a Kotlin version, so that developers could integrate dagger 2.11+ to their Android app developer with Kotlin.

problem to add NetworkModule

Hey,
thank you for your great tutorials.
I have a problem with adding a NetworkModule
I don't know should i add a NetworkComponnet too or not
and NetworkModule contains @Singelton .
and should i add NetworkModule or NetworkComponent to AppComponent ?
I'm confused... please help me.
Thank you.

Where does dagger2 get mainvView?

 @Provides
 MainPresenter provideMainPresenter(MainView mainView, ApiService apiService){
 return new MainPresenterImpl(mainView, apiService);
 }

I don't find any Inject of mainView, Where could Dagger2 to find it and then to provide MainPresenter?

Dagger Android in Multi Modular Project

Hey,
How to use dagger android version in multi modular project. Because according to the structure we should have access to Activity module in app component that is in app module.
But the app module do not implements the different feature module in which my modules will be written.
Thanks,
Amanjeet

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.