/android-dagger-butterknife-mvp

Simple application using Dagger Android (2.11), Butterknife (8.7), and Model-View-Presenter (MVP) with support for Singleton, Activity, Fragment, and child Fragment scopes

Primary LanguageJavaApache License 2.0Apache-2.0

Android Dagger ButterKnife MVP

This is a sample app that is part of an article about how to build Android applications using Dagger 2 with the Dagger Android extension, Butterknife, and Model-View-Presenter (MVP) pattern with support for Singleton, PerActivity, PerFragment, and PerChildFragment scopes.

This demonstrates dagger.android, butterknife, and MVP setup using 3 examples:

  1. Activity with 1 fragment.
  2. Activity with 2 fragments.
  3. Activity with 1 fragment with 1 child fragment.

Read the blogs for a complete walkthrough of this app:

  1. Creating a project, from scratch, using the new Dagger.Android (2.11) dependency injection framework with support for @Singleton, @PerActivity , @PerFragment, and @PerChildFragment scopes. ARTICLE
  2. Using Butterknife (8.7) to replace a lot of handwritten boilerplate view binding code. ARTICLE
  3. Restructuring the code to Model-View-Presenter (MVP) to increase testability, maintainability, and scalability. (coming soon)

License

Copyright 2017 Vandolf Estrellado

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

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.