allwinner_a64/android/external/dagger2/examples/android-simple
2018-08-08 16:14:42 +08:00
..
src/main upload android base code part2 2018-08-08 16:14:42 +08:00
pom.xml upload android base code part2 2018-08-08 16:14:42 +08:00
README.md upload android base code part2 2018-08-08 16:14:42 +08:00

Example: Android Simple

This example demonstrates how to structure an Android application with Dagger.

A custom Application class is used to manage a global object graph of objects. Modules are assembled with a getModules method on the application that can be overridden to add additional modules in development versions of your applications or in tests.

Injection of activities is done automatically in a base activity.

Note: The app does not actually do anything when it is run. It is only to show how you can structure Dagger within an Android app

Note: The app is in transition to Dagger 2 and may not reflect recommended patterns. Before we release Dagger 2.0 it will, but until this note is removed, please do not rely on this example as a strong recommendation.