├── .gitignore ├── README.md ├── app ├── build.gradle ├── proguard-rules.txt └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── antonioleiva │ │ └── daggerexample │ │ └── app │ │ ├── ActivityScope.java │ │ ├── App.java │ │ ├── AppComponent.java │ │ ├── AppModule.java │ │ ├── domain │ │ ├── AnalyticsManager.java │ │ └── DomainModule.java │ │ ├── interactors │ │ ├── FindItemsInteractor.java │ │ ├── FindItemsInteractorImpl.java │ │ ├── InteractorsModule.java │ │ ├── LoginInteractor.java │ │ └── LoginInteractorImpl.java │ │ └── ui │ │ ├── common │ │ └── BaseActivity.java │ │ ├── login │ │ ├── LoginActivity.java │ │ ├── LoginComponent.java │ │ ├── LoginModule.java │ │ ├── LoginPresenter.java │ │ ├── LoginPresenterImpl.java │ │ ├── LoginView.java │ │ └── OnLoginFinishedListener.java │ │ └── main │ │ ├── MainActivity.java │ │ ├── MainComponent.java │ │ ├── MainModule.java │ │ ├── MainPresenter.java │ │ ├── MainPresenterImpl.java │ │ ├── MainView.java │ │ └── OnFinishedListener.java │ └── res │ ├── drawable-hdpi │ ├── ic_action_accept.png │ ├── ic_action_accounts.png │ ├── ic_action_person.png │ └── ic_launcher.png │ ├── drawable-mdpi │ ├── ic_action_accept.png │ ├── ic_action_accounts.png │ ├── ic_action_person.png │ └── ic_launcher.png │ ├── drawable-xhdpi │ ├── ic_action_accept.png │ ├── ic_action_accounts.png │ ├── ic_action_person.png │ └── ic_launcher.png │ ├── drawable-xxhdpi │ ├── ic_action_accept.png │ ├── ic_action_accounts.png │ ├── ic_action_person.png │ └── ic_launcher.png │ ├── layout │ ├── activity_login.xml │ └── activity_main.xml │ ├── values-w820dp │ └── dimens.xml │ └── values │ ├── dimens.xml │ ├── strings.xml │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | 15 | # Gradle files 16 | .gradle/ 17 | ./gradlew.bat 18 | ./gradlew 19 | build/ 20 | 21 | # Mirror files 22 | mirror/ 23 | 24 | # Local configuration file (sdk path, etc) 25 | local.properties 26 | 27 | # Proguard folder generated by Eclipse 28 | proguard/ 29 | 30 | # Intellij project files 31 | *.iws 32 | .idea/workspace.xml 33 | .idea/tasks.xml 34 | .idea 35 | 36 | *.iml 37 | 38 | # OS 39 | .DS_Store -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | DaggerExample 2 | ============= 3 | 4 | Android project using Dagger library. This code was created to support this set of articles: 5 | 6 | [Dependency injection using Dagger (Part 1) @ antonioleiva.com](http://antonioleiva.com/dependency-injection-android-dagger-part-1/) 7 | 8 | [Dependency injection using Dagger (Part 2) @ antonioleiva.com](http://antonioleiva.com/dagger-android-part-2/) 9 | 10 | [Dependency injection using Dagger (Part 3) @ antonioleiva.com](http://antonioleiva.com/dagger-3/) 11 | 12 | ### Dagger 2 13 | 14 | [Migration process from Dagger 1 to Dagger 2 @ frogermcs.github.io](http://frogermcs.github.io/dagger-1-to-2-migration/) 15 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * 4 | * * * Copyright (C) 2014 Antonio Leiva Gordillo. 5 | * * * 6 | * * * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * * * you may not use this file except in compliance with the License. 8 | * * * You may obtain a copy of the License at 9 | * * * 10 | * * * http://www.apache.org/licenses/LICENSE-2.0 11 | * * * 12 | * * * Unless required by applicable law or agreed to in writing, software 13 | * * * distributed under the License is distributed on an "AS IS" BASIS, 14 | * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * * * See the License for the specific language governing permissions and 16 | * * * limitations under the License. 17 | * * 18 | * 19 | */ 20 | 21 | apply plugin: 'com.android.application' 22 | apply plugin: 'com.neenbedankt.android-apt' 23 | 24 | android { 25 | compileSdkVersion 22 26 | buildToolsVersion "22.0.1" 27 | 28 | defaultConfig { 29 | minSdkVersion 14 30 | targetSdkVersion 22 31 | versionCode 1 32 | versionName "1.0" 33 | } 34 | 35 | compileOptions { 36 | sourceCompatibility JavaVersion.VERSION_1_7 37 | targetCompatibility JavaVersion.VERSION_1_7 38 | } 39 | buildTypes { 40 | release { 41 | minifyEnabled false 42 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' 43 | } 44 | } 45 | } 46 | 47 | dependencies { 48 | compile fileTree(dir: 'libs', include: ['*.jar']) 49 | compile 'com.google.dagger:dagger:2.0' 50 | apt 'com.google.dagger:dagger-compiler:2.0' 51 | provided 'org.glassfish:javax.annotation:10.0-b28' 52 | } -------------------------------------------------------------------------------- /app/proguard-rules.txt: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in C:/Desarrollo/Entorno Android/01 Entorno de Desarrollo/adt-bundle-windows/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the ProGuard 5 | # include property in project.properties. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 24 | 25 | 31 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /app/src/main/java/com/antonioleiva/daggerexample/app/ActivityScope.java: -------------------------------------------------------------------------------- 1 | package com.antonioleiva.daggerexample.app; 2 | 3 | import java.lang.annotation.Retention; 4 | import java.lang.annotation.RetentionPolicy; 5 | 6 | import javax.inject.Scope; 7 | 8 | @Scope 9 | @Retention(RetentionPolicy.RUNTIME) 10 | public @interface ActivityScope { 11 | } -------------------------------------------------------------------------------- /app/src/main/java/com/antonioleiva/daggerexample/app/App.java: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * 4 | * * 5 | * * * Copyright (C) 2014 Antonio Leiva Gordillo. 6 | * * * 7 | * * * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * * * you may not use this file except in compliance with the License. 9 | * * * You may obtain a copy of the License at 10 | * * * 11 | * * * http://www.apache.org/licenses/LICENSE-2.0 12 | * * * 13 | * * * Unless required by applicable law or agreed to in writing, software 14 | * * * distributed under the License is distributed on an "AS IS" BASIS, 15 | * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * * * See the License for the specific language governing permissions and 17 | * * * limitations under the License. 18 | * * 19 | * 20 | */ 21 | 22 | package com.antonioleiva.daggerexample.app; 23 | 24 | import android.app.Application; 25 | import android.content.Context; 26 | 27 | import com.antonioleiva.daggerexample.app.domain.AnalyticsManager; 28 | 29 | import javax.inject.Inject; 30 | 31 | 32 | public class App extends Application { 33 | 34 | private AppComponent component; 35 | 36 | @Inject 37 | AnalyticsManager analyticsManager; 38 | 39 | @Override 40 | public void onCreate() { 41 | super.onCreate(); 42 | setupGraph(); 43 | analyticsManager.registerAppEnter(); 44 | } 45 | 46 | private void setupGraph() { 47 | component = DaggerAppComponent.builder() 48 | .appModule(new AppModule(this)) 49 | .build(); 50 | component.inject(this); 51 | } 52 | 53 | public AppComponent component() { 54 | return component; 55 | } 56 | 57 | public static App get(Context context) { 58 | return (App) context.getApplicationContext(); 59 | } 60 | } -------------------------------------------------------------------------------- /app/src/main/java/com/antonioleiva/daggerexample/app/AppComponent.java: -------------------------------------------------------------------------------- 1 | package com.antonioleiva.daggerexample.app; 2 | 3 | import com.antonioleiva.daggerexample.app.domain.AnalyticsManager; 4 | import com.antonioleiva.daggerexample.app.domain.DomainModule; 5 | import com.antonioleiva.daggerexample.app.interactors.FindItemsInteractor; 6 | import com.antonioleiva.daggerexample.app.interactors.InteractorsModule; 7 | import com.antonioleiva.daggerexample.app.interactors.LoginInteractor; 8 | 9 | import javax.inject.Singleton; 10 | 11 | import dagger.Component; 12 | 13 | /** 14 | * Created by Miroslaw Stanek on 17.03.15. 15 | */ 16 | @Singleton 17 | @Component( 18 | modules = { 19 | AppModule.class, 20 | DomainModule.class, 21 | InteractorsModule.class 22 | } 23 | ) 24 | public interface AppComponent { 25 | void inject(App app); 26 | 27 | AnalyticsManager getAnalyticsManager(); 28 | LoginInteractor getLoginInteractor(); 29 | FindItemsInteractor getFindItemsInteractor(); 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/com/antonioleiva/daggerexample/app/AppModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * 4 | * * * Copyright (C) 2014 Antonio Leiva Gordillo. 5 | * * * 6 | * * * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * * * you may not use this file except in compliance with the License. 8 | * * * You may obtain a copy of the License at 9 | * * * 10 | * * * http://www.apache.org/licenses/LICENSE-2.0 11 | * * * 12 | * * * Unless required by applicable law or agreed to in writing, software 13 | * * * distributed under the License is distributed on an "AS IS" BASIS, 14 | * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * * * See the License for the specific language governing permissions and 16 | * * * limitations under the License. 17 | * * 18 | * 19 | */ 20 | 21 | package com.antonioleiva.daggerexample.app; 22 | 23 | import android.app.Application; 24 | 25 | import javax.inject.Singleton; 26 | 27 | import dagger.Module; 28 | import dagger.Provides; 29 | 30 | @Module 31 | public class AppModule { 32 | 33 | private App app; 34 | 35 | public AppModule(App app) { 36 | this.app = app; 37 | } 38 | 39 | @Provides 40 | @Singleton 41 | public Application provideApplication() { 42 | return app; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/java/com/antonioleiva/daggerexample/app/domain/AnalyticsManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * 4 | * * * Copyright (C) 2014 Antonio Leiva Gordillo. 5 | * * * 6 | * * * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * * * you may not use this file except in compliance with the License. 8 | * * * You may obtain a copy of the License at 9 | * * * 10 | * * * http://www.apache.org/licenses/LICENSE-2.0 11 | * * * 12 | * * * Unless required by applicable law or agreed to in writing, software 13 | * * * distributed under the License is distributed on an "AS IS" BASIS, 14 | * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * * * See the License for the specific language governing permissions and 16 | * * * limitations under the License. 17 | * * 18 | * 19 | */ 20 | 21 | package com.antonioleiva.daggerexample.app.domain; 22 | 23 | import android.app.Application; 24 | import android.widget.Toast; 25 | 26 | public class AnalyticsManager { 27 | 28 | private Application app; 29 | 30 | public AnalyticsManager(Application app) { 31 | this.app = app; 32 | } 33 | 34 | public void registerAppEnter() { 35 | Toast.makeText(app, "App enter", Toast.LENGTH_LONG).show(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/antonioleiva/daggerexample/app/domain/DomainModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * 4 | * * * Copyright (C) 2014 Antonio Leiva Gordillo. 5 | * * * 6 | * * * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * * * you may not use this file except in compliance with the License. 8 | * * * You may obtain a copy of the License at 9 | * * * 10 | * * * http://www.apache.org/licenses/LICENSE-2.0 11 | * * * 12 | * * * Unless required by applicable law or agreed to in writing, software 13 | * * * distributed under the License is distributed on an "AS IS" BASIS, 14 | * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * * * See the License for the specific language governing permissions and 16 | * * * limitations under the License. 17 | * * 18 | * 19 | */ 20 | 21 | package com.antonioleiva.daggerexample.app.domain; 22 | 23 | import android.app.Application; 24 | 25 | import javax.inject.Singleton; 26 | 27 | import dagger.Module; 28 | import dagger.Provides; 29 | 30 | @Module 31 | public class DomainModule { 32 | 33 | @Provides @Singleton public AnalyticsManager provideAnalyticsManager(Application app){ 34 | return new AnalyticsManager(app); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/antonioleiva/daggerexample/app/interactors/FindItemsInteractor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * 4 | * * * Copyright (C) 2014 Antonio Leiva Gordillo. 5 | * * * 6 | * * * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * * * you may not use this file except in compliance with the License. 8 | * * * You may obtain a copy of the License at 9 | * * * 10 | * * * http://www.apache.org/licenses/LICENSE-2.0 11 | * * * 12 | * * * Unless required by applicable law or agreed to in writing, software 13 | * * * distributed under the License is distributed on an "AS IS" BASIS, 14 | * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * * * See the License for the specific language governing permissions and 16 | * * * limitations under the License. 17 | * * 18 | * 19 | */ 20 | 21 | package com.antonioleiva.daggerexample.app.interactors; 22 | 23 | import com.antonioleiva.daggerexample.app.ui.main.OnFinishedListener; 24 | 25 | public interface FindItemsInteractor { 26 | 27 | public void findItems(OnFinishedListener listener); 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/com/antonioleiva/daggerexample/app/interactors/FindItemsInteractorImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * 4 | * * * Copyright (C) 2014 Antonio Leiva Gordillo. 5 | * * * 6 | * * * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * * * you may not use this file except in compliance with the License. 8 | * * * You may obtain a copy of the License at 9 | * * * 10 | * * * http://www.apache.org/licenses/LICENSE-2.0 11 | * * * 12 | * * * Unless required by applicable law or agreed to in writing, software 13 | * * * distributed under the License is distributed on an "AS IS" BASIS, 14 | * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * * * See the License for the specific language governing permissions and 16 | * * * limitations under the License. 17 | * * 18 | * 19 | */ 20 | 21 | package com.antonioleiva.daggerexample.app.interactors; 22 | 23 | import android.os.Handler; 24 | 25 | import com.antonioleiva.daggerexample.app.ui.main.OnFinishedListener; 26 | 27 | import java.util.Arrays; 28 | import java.util.List; 29 | 30 | public class FindItemsInteractorImpl implements FindItemsInteractor { 31 | @Override public void findItems(final OnFinishedListener listener) { 32 | new Handler().postDelayed(new Runnable() { 33 | @Override public void run() { 34 | listener.onFinished(createArrayList()); 35 | } 36 | }, 2000); 37 | } 38 | 39 | private List createArrayList() { 40 | return Arrays.asList( 41 | "Item 1", 42 | "Item 2", 43 | "Item 3", 44 | "Item 4", 45 | "Item 5", 46 | "Item 6", 47 | "Item 7", 48 | "Item 8", 49 | "Item 9", 50 | "Item 10" 51 | ); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /app/src/main/java/com/antonioleiva/daggerexample/app/interactors/InteractorsModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * 4 | * * * Copyright (C) 2014 Antonio Leiva Gordillo. 5 | * * * 6 | * * * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * * * you may not use this file except in compliance with the License. 8 | * * * You may obtain a copy of the License at 9 | * * * 10 | * * * http://www.apache.org/licenses/LICENSE-2.0 11 | * * * 12 | * * * Unless required by applicable law or agreed to in writing, software 13 | * * * distributed under the License is distributed on an "AS IS" BASIS, 14 | * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * * * See the License for the specific language governing permissions and 16 | * * * limitations under the License. 17 | * * 18 | * 19 | */ 20 | 21 | package com.antonioleiva.daggerexample.app.interactors; 22 | 23 | import dagger.Module; 24 | import dagger.Provides; 25 | 26 | @Module 27 | public class InteractorsModule { 28 | 29 | @Provides public FindItemsInteractor provideFindItemsInteractor() { 30 | return new FindItemsInteractorImpl(); 31 | } 32 | 33 | @Provides public LoginInteractor provideLoginInteractor() { 34 | return new LoginInteractorImpl(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/com/antonioleiva/daggerexample/app/interactors/LoginInteractor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * 4 | * * * Copyright (C) 2014 Antonio Leiva Gordillo. 5 | * * * 6 | * * * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * * * you may not use this file except in compliance with the License. 8 | * * * You may obtain a copy of the License at 9 | * * * 10 | * * * http://www.apache.org/licenses/LICENSE-2.0 11 | * * * 12 | * * * Unless required by applicable law or agreed to in writing, software 13 | * * * distributed under the License is distributed on an "AS IS" BASIS, 14 | * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * * * See the License for the specific language governing permissions and 16 | * * * limitations under the License. 17 | * * 18 | * 19 | */ 20 | 21 | package com.antonioleiva.daggerexample.app.interactors; 22 | 23 | import com.antonioleiva.daggerexample.app.ui.login.OnLoginFinishedListener; 24 | 25 | public interface LoginInteractor { 26 | public void login(String username, String password, OnLoginFinishedListener listener); 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/com/antonioleiva/daggerexample/app/interactors/LoginInteractorImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * 4 | * * * Copyright (C) 2014 Antonio Leiva Gordillo. 5 | * * * 6 | * * * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * * * you may not use this file except in compliance with the License. 8 | * * * You may obtain a copy of the License at 9 | * * * 10 | * * * http://www.apache.org/licenses/LICENSE-2.0 11 | * * * 12 | * * * Unless required by applicable law or agreed to in writing, software 13 | * * * distributed under the License is distributed on an "AS IS" BASIS, 14 | * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * * * See the License for the specific language governing permissions and 16 | * * * limitations under the License. 17 | * * 18 | * 19 | */ 20 | 21 | package com.antonioleiva.daggerexample.app.interactors; 22 | 23 | import android.os.Handler; 24 | import android.text.TextUtils; 25 | 26 | import com.antonioleiva.daggerexample.app.ui.login.OnLoginFinishedListener; 27 | 28 | public class LoginInteractorImpl implements LoginInteractor { 29 | 30 | @Override 31 | public void login(final String username, final String password, final OnLoginFinishedListener listener) { 32 | // Mock login. I'm creating a handler to delay the answer a couple of seconds 33 | new Handler().postDelayed(new Runnable() { 34 | @Override public void run() { 35 | boolean error = false; 36 | if (TextUtils.isEmpty(username)){ 37 | listener.onUsernameError(); 38 | error = true; 39 | } 40 | if (TextUtils.isEmpty(password)){ 41 | listener.onPasswordError(); 42 | error = true; 43 | } 44 | if (!error){ 45 | listener.onSuccess(); 46 | } 47 | } 48 | }, 2000); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/src/main/java/com/antonioleiva/daggerexample/app/ui/common/BaseActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * 4 | * * * Copyright (C) 2014 Antonio Leiva Gordillo. 5 | * * * 6 | * * * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * * * you may not use this file except in compliance with the License. 8 | * * * You may obtain a copy of the License at 9 | * * * 10 | * * * http://www.apache.org/licenses/LICENSE-2.0 11 | * * * 12 | * * * Unless required by applicable law or agreed to in writing, software 13 | * * * distributed under the License is distributed on an "AS IS" BASIS, 14 | * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * * * See the License for the specific language governing permissions and 16 | * * * limitations under the License. 17 | * * 18 | * 19 | */ 20 | 21 | package com.antonioleiva.daggerexample.app.ui.common; 22 | 23 | import android.app.Activity; 24 | import android.os.Bundle; 25 | 26 | import com.antonioleiva.daggerexample.app.App; 27 | import com.antonioleiva.daggerexample.app.AppComponent; 28 | 29 | public abstract class BaseActivity extends Activity { 30 | 31 | 32 | @Override protected void onCreate(Bundle savedInstanceState) { 33 | super.onCreate(savedInstanceState); 34 | setupComponent((AppComponent) App.get(this).component()); 35 | } 36 | 37 | protected abstract void setupComponent(AppComponent appComponent); 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/com/antonioleiva/daggerexample/app/ui/login/LoginActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * 4 | * * * Copyright (C) 2014 Antonio Leiva Gordillo. 5 | * * * 6 | * * * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * * * you may not use this file except in compliance with the License. 8 | * * * You may obtain a copy of the License at 9 | * * * 10 | * * * http://www.apache.org/licenses/LICENSE-2.0 11 | * * * 12 | * * * Unless required by applicable law or agreed to in writing, software 13 | * * * distributed under the License is distributed on an "AS IS" BASIS, 14 | * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * * * See the License for the specific language governing permissions and 16 | * * * limitations under the License. 17 | * * 18 | * 19 | */ 20 | 21 | package com.antonioleiva.daggerexample.app.ui.login; 22 | 23 | import android.content.Intent; 24 | import android.os.Bundle; 25 | import android.view.View; 26 | import android.widget.EditText; 27 | import android.widget.ProgressBar; 28 | 29 | import com.antonioleiva.daggerexample.app.AppComponent; 30 | import com.antonioleiva.daggerexample.app.R; 31 | import com.antonioleiva.daggerexample.app.ui.common.BaseActivity; 32 | import com.antonioleiva.daggerexample.app.ui.main.MainActivity; 33 | 34 | import javax.inject.Inject; 35 | 36 | public class LoginActivity extends BaseActivity implements LoginView, View.OnClickListener { 37 | 38 | @Inject LoginPresenter presenter; 39 | 40 | private ProgressBar progressBar; 41 | private EditText username; 42 | private EditText password; 43 | 44 | @Override 45 | protected void setupComponent(AppComponent appComponent) { 46 | DaggerLoginComponent.builder() 47 | .appComponent(appComponent) 48 | .loginModule(new LoginModule(this)) 49 | .build() 50 | .inject(this); 51 | } 52 | 53 | @Override 54 | protected void onCreate(Bundle savedInstanceState) { 55 | super.onCreate(savedInstanceState); 56 | setContentView(R.layout.activity_login); 57 | progressBar = (ProgressBar) findViewById(R.id.progress); 58 | username = (EditText) findViewById(R.id.username); 59 | password = (EditText) findViewById(R.id.password); 60 | findViewById(R.id.button).setOnClickListener(this); 61 | } 62 | 63 | @Override public void showProgress() { 64 | progressBar.setVisibility(View.VISIBLE); 65 | } 66 | 67 | @Override public void hideProgress() { 68 | progressBar.setVisibility(View.GONE); 69 | } 70 | 71 | @Override public void setUsernameError() { 72 | username.setError(getString(R.string.username_error)); 73 | } 74 | 75 | @Override public void setPasswordError() { 76 | password.setError(getString(R.string.password_error)); 77 | } 78 | 79 | @Override public void navigateToHome() { 80 | startActivity(new Intent(this, MainActivity.class)); 81 | finish(); 82 | } 83 | 84 | @Override public void onClick(View v) { 85 | presenter.validateCredentials(username.getText().toString(), password.getText().toString()); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /app/src/main/java/com/antonioleiva/daggerexample/app/ui/login/LoginComponent.java: -------------------------------------------------------------------------------- 1 | package com.antonioleiva.daggerexample.app.ui.login; 2 | 3 | import com.antonioleiva.daggerexample.app.ActivityScope; 4 | import com.antonioleiva.daggerexample.app.AppComponent; 5 | import com.antonioleiva.daggerexample.app.ui.main.MainActivity; 6 | 7 | import dagger.Component; 8 | 9 | /** 10 | * Created by Miroslaw Stanek on 17.03.15. 11 | */ 12 | @ActivityScope 13 | @Component( 14 | dependencies = AppComponent.class, 15 | modules = LoginModule.class 16 | ) 17 | public interface LoginComponent { 18 | void inject(LoginActivity activity); 19 | 20 | LoginPresenter getLoginPresenter(); 21 | } -------------------------------------------------------------------------------- /app/src/main/java/com/antonioleiva/daggerexample/app/ui/login/LoginModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * 4 | * * * Copyright (C) 2014 Antonio Leiva Gordillo. 5 | * * * 6 | * * * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * * * you may not use this file except in compliance with the License. 8 | * * * You may obtain a copy of the License at 9 | * * * 10 | * * * http://www.apache.org/licenses/LICENSE-2.0 11 | * * * 12 | * * * Unless required by applicable law or agreed to in writing, software 13 | * * * distributed under the License is distributed on an "AS IS" BASIS, 14 | * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * * * See the License for the specific language governing permissions and 16 | * * * limitations under the License. 17 | * * 18 | * 19 | */ 20 | 21 | package com.antonioleiva.daggerexample.app.ui.login; 22 | 23 | import com.antonioleiva.daggerexample.app.interactors.LoginInteractor; 24 | 25 | import dagger.Module; 26 | import dagger.Provides; 27 | 28 | @Module 29 | public class LoginModule { 30 | 31 | private LoginView view; 32 | 33 | public LoginModule(LoginView view) { 34 | this.view = view; 35 | } 36 | 37 | @Provides 38 | public LoginView provideView() { 39 | return view; 40 | } 41 | 42 | @Provides 43 | public LoginPresenter providePresenter(LoginView loginView, LoginInteractor loginInteractor) { 44 | return new LoginPresenterImpl(loginView, loginInteractor); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/src/main/java/com/antonioleiva/daggerexample/app/ui/login/LoginPresenter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * 4 | * * * Copyright (C) 2014 Antonio Leiva Gordillo. 5 | * * * 6 | * * * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * * * you may not use this file except in compliance with the License. 8 | * * * You may obtain a copy of the License at 9 | * * * 10 | * * * http://www.apache.org/licenses/LICENSE-2.0 11 | * * * 12 | * * * Unless required by applicable law or agreed to in writing, software 13 | * * * distributed under the License is distributed on an "AS IS" BASIS, 14 | * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * * * See the License for the specific language governing permissions and 16 | * * * limitations under the License. 17 | * * 18 | * 19 | */ 20 | 21 | package com.antonioleiva.daggerexample.app.ui.login; 22 | 23 | public interface LoginPresenter { 24 | public void validateCredentials(String username, String password); 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/java/com/antonioleiva/daggerexample/app/ui/login/LoginPresenterImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * 4 | * * * Copyright (C) 2014 Antonio Leiva Gordillo. 5 | * * * 6 | * * * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * * * you may not use this file except in compliance with the License. 8 | * * * You may obtain a copy of the License at 9 | * * * 10 | * * * http://www.apache.org/licenses/LICENSE-2.0 11 | * * * 12 | * * * Unless required by applicable law or agreed to in writing, software 13 | * * * distributed under the License is distributed on an "AS IS" BASIS, 14 | * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * * * See the License for the specific language governing permissions and 16 | * * * limitations under the License. 17 | * * 18 | * 19 | */ 20 | 21 | package com.antonioleiva.daggerexample.app.ui.login; 22 | 23 | import com.antonioleiva.daggerexample.app.interactors.LoginInteractor; 24 | 25 | public class LoginPresenterImpl implements LoginPresenter, OnLoginFinishedListener { 26 | 27 | private LoginView loginView; 28 | private LoginInteractor loginInteractor; 29 | 30 | public LoginPresenterImpl(LoginView loginView, LoginInteractor loginInteractor) { 31 | this.loginView = loginView; 32 | this.loginInteractor = loginInteractor; 33 | } 34 | 35 | @Override public void validateCredentials(String username, String password) { 36 | loginView.showProgress(); 37 | loginInteractor.login(username, password, this); 38 | } 39 | 40 | @Override public void onUsernameError() { 41 | loginView.setUsernameError(); 42 | loginView.hideProgress(); 43 | } 44 | 45 | @Override public void onPasswordError() { 46 | loginView.setPasswordError(); 47 | loginView.hideProgress(); 48 | } 49 | 50 | @Override public void onSuccess() { 51 | loginView.navigateToHome(); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /app/src/main/java/com/antonioleiva/daggerexample/app/ui/login/LoginView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * 4 | * * * Copyright (C) 2014 Antonio Leiva Gordillo. 5 | * * * 6 | * * * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * * * you may not use this file except in compliance with the License. 8 | * * * You may obtain a copy of the License at 9 | * * * 10 | * * * http://www.apache.org/licenses/LICENSE-2.0 11 | * * * 12 | * * * Unless required by applicable law or agreed to in writing, software 13 | * * * distributed under the License is distributed on an "AS IS" BASIS, 14 | * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * * * See the License for the specific language governing permissions and 16 | * * * limitations under the License. 17 | * * 18 | * 19 | */ 20 | 21 | package com.antonioleiva.daggerexample.app.ui.login; 22 | 23 | public interface LoginView { 24 | public void showProgress(); 25 | 26 | public void hideProgress(); 27 | 28 | public void setUsernameError(); 29 | 30 | public void setPasswordError(); 31 | 32 | public void navigateToHome(); 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/com/antonioleiva/daggerexample/app/ui/login/OnLoginFinishedListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * 4 | * * * Copyright (C) 2014 Antonio Leiva Gordillo. 5 | * * * 6 | * * * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * * * you may not use this file except in compliance with the License. 8 | * * * You may obtain a copy of the License at 9 | * * * 10 | * * * http://www.apache.org/licenses/LICENSE-2.0 11 | * * * 12 | * * * Unless required by applicable law or agreed to in writing, software 13 | * * * distributed under the License is distributed on an "AS IS" BASIS, 14 | * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * * * See the License for the specific language governing permissions and 16 | * * * limitations under the License. 17 | * * 18 | * 19 | */ 20 | 21 | package com.antonioleiva.daggerexample.app.ui.login; 22 | 23 | public interface OnLoginFinishedListener { 24 | 25 | public void onUsernameError(); 26 | 27 | public void onPasswordError(); 28 | 29 | public void onSuccess(); 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/com/antonioleiva/daggerexample/app/ui/main/MainActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * 4 | * * * Copyright (C) 2014 Antonio Leiva Gordillo. 5 | * * * 6 | * * * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * * * you may not use this file except in compliance with the License. 8 | * * * You may obtain a copy of the License at 9 | * * * 10 | * * * http://www.apache.org/licenses/LICENSE-2.0 11 | * * * 12 | * * * Unless required by applicable law or agreed to in writing, software 13 | * * * distributed under the License is distributed on an "AS IS" BASIS, 14 | * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * * * See the License for the specific language governing permissions and 16 | * * * limitations under the License. 17 | * * 18 | * 19 | */ 20 | 21 | package com.antonioleiva.daggerexample.app.ui.main; 22 | 23 | import android.os.Bundle; 24 | import android.view.View; 25 | import android.widget.AdapterView; 26 | import android.widget.ArrayAdapter; 27 | import android.widget.ListView; 28 | import android.widget.ProgressBar; 29 | import android.widget.Toast; 30 | 31 | import com.antonioleiva.daggerexample.app.AppComponent; 32 | import com.antonioleiva.daggerexample.app.R; 33 | import com.antonioleiva.daggerexample.app.ui.common.BaseActivity; 34 | 35 | import java.util.List; 36 | 37 | import javax.inject.Inject; 38 | 39 | public class MainActivity extends BaseActivity implements MainView, AdapterView.OnItemClickListener { 40 | 41 | @Inject MainPresenter presenter; 42 | private ListView listView; 43 | private ProgressBar progressBar; 44 | 45 | @Override 46 | protected void setupComponent(AppComponent appComponent) { 47 | DaggerMainComponent.builder() 48 | .appComponent(appComponent) 49 | .mainModule(new MainModule(this)) 50 | .build() 51 | .inject(this); 52 | } 53 | 54 | @Override 55 | protected void onCreate(Bundle savedInstanceState) { 56 | super.onCreate(savedInstanceState); 57 | setContentView(R.layout.activity_main); 58 | listView = (ListView) findViewById(R.id.list); 59 | listView.setOnItemClickListener(this); 60 | progressBar = (ProgressBar) findViewById(R.id.progress); 61 | } 62 | 63 | @Override protected void onResume() { 64 | super.onResume(); 65 | presenter.onResume(); 66 | } 67 | 68 | @Override public void showProgress() { 69 | progressBar.setVisibility(View.VISIBLE); 70 | listView.setVisibility(View.INVISIBLE); 71 | } 72 | 73 | @Override public void hideProgress() { 74 | progressBar.setVisibility(View.INVISIBLE); 75 | listView.setVisibility(View.VISIBLE); 76 | } 77 | 78 | @Override public void setItems(List items) { 79 | listView.setAdapter(new ArrayAdapter(this, android.R.layout.simple_list_item_1, items)); 80 | } 81 | 82 | @Override public void showMessage(String message) { 83 | Toast.makeText(this, message, Toast.LENGTH_LONG).show(); 84 | } 85 | 86 | @Override public void onItemClick(AdapterView parent, View view, int position, long id) { 87 | presenter.onItemClicked(position); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /app/src/main/java/com/antonioleiva/daggerexample/app/ui/main/MainComponent.java: -------------------------------------------------------------------------------- 1 | package com.antonioleiva.daggerexample.app.ui.main; 2 | 3 | import com.antonioleiva.daggerexample.app.ActivityScope; 4 | import com.antonioleiva.daggerexample.app.AppComponent; 5 | 6 | import dagger.Component; 7 | 8 | /** 9 | * Created by Miroslaw Stanek on 17.03.15. 10 | */ 11 | @ActivityScope 12 | @Component( 13 | dependencies = AppComponent.class, 14 | modules = MainModule.class 15 | ) 16 | public interface MainComponent { 17 | void inject(MainActivity activity); 18 | 19 | MainPresenter getLoginPresenter(); 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/antonioleiva/daggerexample/app/ui/main/MainModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * 4 | * * * Copyright (C) 2014 Antonio Leiva Gordillo. 5 | * * * 6 | * * * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * * * you may not use this file except in compliance with the License. 8 | * * * You may obtain a copy of the License at 9 | * * * 10 | * * * http://www.apache.org/licenses/LICENSE-2.0 11 | * * * 12 | * * * Unless required by applicable law or agreed to in writing, software 13 | * * * distributed under the License is distributed on an "AS IS" BASIS, 14 | * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * * * See the License for the specific language governing permissions and 16 | * * * limitations under the License. 17 | * * 18 | * 19 | */ 20 | 21 | package com.antonioleiva.daggerexample.app.ui.main; 22 | 23 | import com.antonioleiva.daggerexample.app.interactors.FindItemsInteractor; 24 | 25 | import dagger.Module; 26 | import dagger.Provides; 27 | 28 | @Module 29 | public class MainModule { 30 | 31 | private MainView view; 32 | 33 | public MainModule(MainView view) { 34 | this.view = view; 35 | } 36 | 37 | @Provides 38 | public MainView provideView() { 39 | return view; 40 | } 41 | 42 | @Provides 43 | public MainPresenter providePresenter(MainView mainView, FindItemsInteractor findItemsInteractor) { 44 | return new MainPresenterImpl(mainView, findItemsInteractor); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/src/main/java/com/antonioleiva/daggerexample/app/ui/main/MainPresenter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * 4 | * * * Copyright (C) 2014 Antonio Leiva Gordillo. 5 | * * * 6 | * * * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * * * you may not use this file except in compliance with the License. 8 | * * * You may obtain a copy of the License at 9 | * * * 10 | * * * http://www.apache.org/licenses/LICENSE-2.0 11 | * * * 12 | * * * Unless required by applicable law or agreed to in writing, software 13 | * * * distributed under the License is distributed on an "AS IS" BASIS, 14 | * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * * * See the License for the specific language governing permissions and 16 | * * * limitations under the License. 17 | * * 18 | * 19 | */ 20 | 21 | package com.antonioleiva.daggerexample.app.ui.main; 22 | 23 | public interface MainPresenter { 24 | 25 | public void onResume(); 26 | 27 | public void onItemClicked(int position); 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/com/antonioleiva/daggerexample/app/ui/main/MainPresenterImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * 4 | * * * Copyright (C) 2014 Antonio Leiva Gordillo. 5 | * * * 6 | * * * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * * * you may not use this file except in compliance with the License. 8 | * * * You may obtain a copy of the License at 9 | * * * 10 | * * * http://www.apache.org/licenses/LICENSE-2.0 11 | * * * 12 | * * * Unless required by applicable law or agreed to in writing, software 13 | * * * distributed under the License is distributed on an "AS IS" BASIS, 14 | * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * * * See the License for the specific language governing permissions and 16 | * * * limitations under the License. 17 | * * 18 | * 19 | */ 20 | 21 | package com.antonioleiva.daggerexample.app.ui.main; 22 | 23 | import com.antonioleiva.daggerexample.app.interactors.FindItemsInteractor; 24 | 25 | import java.util.List; 26 | 27 | public class MainPresenterImpl implements MainPresenter, OnFinishedListener { 28 | 29 | private MainView mainView; 30 | private FindItemsInteractor findItemsInteractor; 31 | 32 | public MainPresenterImpl(MainView mainView, FindItemsInteractor findItemsInteractor) { 33 | this.mainView = mainView; 34 | this.findItemsInteractor = findItemsInteractor; 35 | } 36 | 37 | @Override public void onResume() { 38 | mainView.showProgress(); 39 | findItemsInteractor.findItems(this); 40 | } 41 | 42 | @Override public void onItemClicked(int position) { 43 | mainView.showMessage(String.format("Position %d clicked", position + 1)); 44 | } 45 | 46 | @Override public void onFinished(List items) { 47 | mainView.setItems(items); 48 | mainView.hideProgress(); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/src/main/java/com/antonioleiva/daggerexample/app/ui/main/MainView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * 4 | * * * Copyright (C) 2014 Antonio Leiva Gordillo. 5 | * * * 6 | * * * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * * * you may not use this file except in compliance with the License. 8 | * * * You may obtain a copy of the License at 9 | * * * 10 | * * * http://www.apache.org/licenses/LICENSE-2.0 11 | * * * 12 | * * * Unless required by applicable law or agreed to in writing, software 13 | * * * distributed under the License is distributed on an "AS IS" BASIS, 14 | * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * * * See the License for the specific language governing permissions and 16 | * * * limitations under the License. 17 | * * 18 | * 19 | */ 20 | 21 | package com.antonioleiva.daggerexample.app.ui.main; 22 | 23 | import java.util.List; 24 | 25 | public interface MainView { 26 | 27 | public void showProgress(); 28 | 29 | public void hideProgress(); 30 | 31 | public void setItems(List items); 32 | 33 | public void showMessage(String message); 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/antonioleiva/daggerexample/app/ui/main/OnFinishedListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * * 4 | * * * Copyright (C) 2014 Antonio Leiva Gordillo. 5 | * * * 6 | * * * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * * * you may not use this file except in compliance with the License. 8 | * * * You may obtain a copy of the License at 9 | * * * 10 | * * * http://www.apache.org/licenses/LICENSE-2.0 11 | * * * 12 | * * * Unless required by applicable law or agreed to in writing, software 13 | * * * distributed under the License is distributed on an "AS IS" BASIS, 14 | * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * * * See the License for the specific language governing permissions and 16 | * * * limitations under the License. 17 | * * 18 | * 19 | */ 20 | 21 | package com.antonioleiva.daggerexample.app.ui.main; 22 | 23 | import java.util.List; 24 | 25 | public interface OnFinishedListener { 26 | 27 | void onFinished(List items); 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_action_accept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frogermcs/DaggerExample/acacf91daf1ef61fa13767f934abfb634cae3179/app/src/main/res/drawable-hdpi/ic_action_accept.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_action_accounts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frogermcs/DaggerExample/acacf91daf1ef61fa13767f934abfb634cae3179/app/src/main/res/drawable-hdpi/ic_action_accounts.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_action_person.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frogermcs/DaggerExample/acacf91daf1ef61fa13767f934abfb634cae3179/app/src/main/res/drawable-hdpi/ic_action_person.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frogermcs/DaggerExample/acacf91daf1ef61fa13767f934abfb634cae3179/app/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_action_accept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frogermcs/DaggerExample/acacf91daf1ef61fa13767f934abfb634cae3179/app/src/main/res/drawable-mdpi/ic_action_accept.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_action_accounts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frogermcs/DaggerExample/acacf91daf1ef61fa13767f934abfb634cae3179/app/src/main/res/drawable-mdpi/ic_action_accounts.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_action_person.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frogermcs/DaggerExample/acacf91daf1ef61fa13767f934abfb634cae3179/app/src/main/res/drawable-mdpi/ic_action_person.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frogermcs/DaggerExample/acacf91daf1ef61fa13767f934abfb634cae3179/app/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_accept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frogermcs/DaggerExample/acacf91daf1ef61fa13767f934abfb634cae3179/app/src/main/res/drawable-xhdpi/ic_action_accept.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_accounts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frogermcs/DaggerExample/acacf91daf1ef61fa13767f934abfb634cae3179/app/src/main/res/drawable-xhdpi/ic_action_accounts.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_person.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frogermcs/DaggerExample/acacf91daf1ef61fa13767f934abfb634cae3179/app/src/main/res/drawable-xhdpi/ic_action_person.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frogermcs/DaggerExample/acacf91daf1ef61fa13767f934abfb634cae3179/app/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_accept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frogermcs/DaggerExample/acacf91daf1ef61fa13767f934abfb634cae3179/app/src/main/res/drawable-xxhdpi/ic_action_accept.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_accounts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frogermcs/DaggerExample/acacf91daf1ef61fa13767f934abfb634cae3179/app/src/main/res/drawable-xxhdpi/ic_action_accounts.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_person.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frogermcs/DaggerExample/acacf91daf1ef61fa13767f934abfb634cae3179/app/src/main/res/drawable-xxhdpi/ic_action_person.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frogermcs/DaggerExample/acacf91daf1ef61fa13767f934abfb634cae3179/app/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_login.xml: -------------------------------------------------------------------------------- 1 | 20 | 21 | 29 | 30 | 39 | 49 |