This is a simple app that presents the user with a scrollable stream of images from Flickr Recent photos API. The app doesn't require any dangerous permissions or to logging in.
The code has been kept modular, extensible, and testable by using interfaces for all third-party libraries and design patterns including IOC/dependency injection where ever needed. This extensibility and modularity greatly help in swapping various concrete implementations and eases app maintenance. More on good android design principles here.
I have marked some issues I faced while writing unit test cases to investigate/study/resolve for myself as TODO. The unit tests written so far can be found under ~app/src/test.
I look forward to your feedback and comments on the code, architecture improvements and/or any general suggestions.
Select Open Existing Project
from the options. To install Android Studio
please follow the instructions here
After the project has been successfully imported it will build itself automatically.
Connect the mobile device and press the Run 'app'
button from Run menu
.
Please also note the min supported API level is 23 (Android 6.0, Jelly Bean)
.
More instructions here
- Column width 100
- Field instance members are prefixed with 'm' e.g. mTextView
- Static members are prefixed with 's'
- Constants are private (unless needed elsewhere), static and all in uppercase, e.g. FADE_ANIMATION_OUT_MILLIS
String ids:
<activity/fragment/view/global>_<activity_name>__<string name>
e.g. activity_home_welcome_message
If a string is used in multiple places, use the 'global' prefix rather than the screen name.
Layout ids:
<activity/fragment/view>_<activity_name>_<type>_<description>
e.g. activity_home_textview_welcome_message
Retrofit
- https://github.com/square/retrofitButterknife
- https://github.com/JakeWharton/butterknifeEventBus
- https://github.com/greenrobot/EventBusPicasso
- https://github.com/square/picassogson
- https://github.com/google/gsonJUnit
- https://github.com/junit-team/junit4Mockito
- https://github.com//mockito/mockitoHamcrest
- https://github.com/hamcrest/JavaHamcrestRobolectric
- https://github.com/robolectric/robolectric