This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| When we do a longer running async operation that returns the callback on an Activity | |
| like | |
| Asynctask<T,U, K> | |
| AsyncTask is only for operations between the background thread and Main UI Thread. | |
| the methods are | |
| void onPreExecute(){} | |
| K doInBackground(T type1){ | |
| .. | |
| return type3_Object; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.android.volley.toolbox.HurlStack; | |
| import com.squareup.okhttp.OkHttpClient; | |
| import java.io.IOException; | |
| import java.net.HttpURLConnection; | |
| import java.net.URL; | |
| /** | |
| * An {@link com.android.volley.toolbox.HttpStack HttpStack} implementation which | |
| * uses OkHttp as its transport. | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://source.android.com/source/index.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| How ButterKnife actually works? | |
| Java Annotation Processing | |
| Annotation processing is a tool build in javac for scanning and processing annotations at compile time. | |
| You can define your own annotations and a custom processor to handle them. | |
| Annotations are scanned and processed at compile time. | |
| An Annotation Processor reads java code, process its annotations and generate java code in response. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Guide for Dagger 2.0 (Revised Edition 5): | |
| The steps are the following: | |
| 1.) add Dagger to your build.gradle files: | |
| top level build.gradle: | |
| . | |
| // Top-level build file where you can add configuration options common to all sub-projects/modules. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://stackoverflow.com/questions/27036933/how-to-set-up-dagger-dependency-injection-from-scratch-in-android-project | |
| http://siphon9.net/loune/2015/04/dagger-2-0-android-migration-tips/ | |
| https://github.com/google/dagger/issues/107#issuecomment-71524636 | |
| https://github.com/square/dagger/issues/379 | |
| http://code.tutsplus.com/tutorials/dependency-injection-with-dagger-2-on-android--cms-23345 | |
| https://github.com/joesteele/dagger2-component-scopes-test/blob/master/app/src/main/java/net/joesteele/daggercomponentstest/MainActivity.java | |
| http://frogermcs.github.io/dagger-1-to-2-migration/ | |
| https://github.com/google/dagger/tree/master/examples/android-activity-graphs | |
| https://speakerdeck.com/ogaclejapan/dagger2-has-been-released |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://medium.com/@artem_zin/m-model-from-mvc-mvp-in-android-flow-and-mortar-bd1e50c45395#.fx16i7o50 | |
| http://magenic.com/Blog/Post/6/An-MVP-Pattern-for-Android | |
| https://medium.com/ribot-labs/approaching-android-with-mvvm-8ceec02d5442#.pkip2bkyo | |
| http://fernandocejas.com/2014/09/03/architecting-android-the-clean-way/ | |
| http://hannesdorfmann.com/android/mosby/ | |
| https://plus.google.com/communities/114285790907815804707 | |
| http://programmers.stackexchange.com/questions/133134/is-model-view-presenter-mvp-scheme-useful-for-android |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //BasePresenter.java | |
| public interface BasePresenter<V extends BaseView> { | |
| /** | |
| * Set or attach the view to this presenter | |
| */ | |
| public void attachView(V view); | |
| /** | |
| * Will be called if the view has been destroyed. Typically this method will |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //BasePresenter.java | |
| public interface BasePresenter<V extends BaseView> { | |
| /** | |
| * Set or attach the view to this presenter | |
| */ | |
| public void attachView(V view); | |
| /** | |
| * Will be called if the view has been destroyed. Typically this method will |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class FlowLayout extends ViewGroup { | |
| public static final int HORIZONTAL = 0; | |
| public static final int VERTICAL = 1; | |
| private int horizontalSpacing = 0; | |
| private int verticalSpacing = 0; | |
| private int orientation = 0; | |
| private boolean debugDraw = false; |