FlickrIt lets you search images from Flickr API. It uses the Flickr API key.
- By default the app loads search results for the query "kittens".
- To search, you can use the
SearchViewinside theToolbaron the top right corner. - The app also lets you scroll endlessly.
- The user can pull to refresh to reset/restart search.
FlickrIt is built on top of MVP architecture:
- The searching feature is fulfilled by a
SearchContract. - The
SearchInteractorgets the photo results from the Flickr API via theFlickrApiClient. It contains theSearchModelwhich is the single source of truth of the app. The interactor publishes this model to the presenter. - The
SearchPresentertalks to theSearchInteractor. It renders theSearchState(aka SearchViewModel) on theSearchViewwhenever the interactor publishes it. - The
SearchViewrenders theSearchStateonto theSearchFragmentand also posts actions to theSearchPresenter.
FlickrApiClientlets you use the Flickr search command and returns aNetworkResults<SearchResponse>.ApiClientis a wrapper on top ofOkHttpClientwhich lets you make synchronous/asynchronous requests.ImageServicelets you download images from network.SearchMapperandPhotoMapperhelps transforming the network entities into DTOs.
- Unit tests can be found under
testpackage.
ImageFetcherhelps fetch imageBitmapfrom Memory, Disk or Network (whichever is available first).
Thanks for stopping by! Have a great day :)
