conductor-dagger | use conductor with the new dagger | Android library
kandi X-RAY | conductor-dagger Summary
kandi X-RAY | conductor-dagger Summary
Extension to use conductor with the new dagger.android module.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Invoked when the view is created
- Finds the Ginjector for a controller
- Injects a controller
- Initializes the controller
- Invoked when the component is created
- Handle back button pressed
conductor-dagger Key Features
conductor-dagger Examples and Code Snippets
Copyright 2017 Christian Bahl
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
U
dependencies {
compile 'com.christianbahl.conductor:conductor-dagger-android:1.0.0'
annotationProcessor 'com.google.dagger:dagger-compiler:2.11-rc2'
}
Community Discussions
Trending Discussions on conductor-dagger
QUESTION
I am experimenting with the 'new' Android support in Dagger 2.
I want to set up the following architecture in Dagger:
Application => Activity => Controller (Conductor)
(Controller is basically a View
that gets instantiated by the system. You can think of it like Fragment
s but without Dagger Injection support)
For each level I have defined a dependency: ApplicationDep
, ActivityDep
and ControllerDep
.
- My
Controller
should be able to inject all of these dependencies. - My
Activity
should be able to inject theApplicationDep
and theActivityDep
- My
Application
should only be able to inject theApplicationDep
Everything works except in my Controller
.
I am unable to inject the ActivityDep
.
ANSWER
Answered 2018-Jan-05 at 10:32It sounds like controller is a subcomponent of activity component.
I took a look at your GitHub, so I change some of your code to answer.
First, for the Activity
injection.
Controller
is not subcomponent of Appcomponent
, so it only need ActivityBindingModule
.
AppComponent.java
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install conductor-dagger
You can use conductor-dagger like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the conductor-dagger component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page