All Projects → thuytrinh → flickr-android

thuytrinh / flickr-android

Licence: other
A small sample app to showcase architecting app using Clean Architecture and MVVM

Programming Languages

kotlin
9241 projects
java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to flickr-android

News Sample App
A sample news app which demonstrates clean architecture and best practices for developing android app
Stars: ✭ 334 (+1236%)
Mutual labels:  room, clean-architecture, dagger2, rxjava2, retrofit2, architecture-components
Roomrxjava
Room with Rxjava Example
Stars: ✭ 130 (+420%)
Mutual labels:  room, dagger2, rxjava2, retrofit2, dagger2-android
AndroidCleanArchitecture
Android Project with clean android architecture contain Dagger, Retrofit, Retrofit, Android archtecture components, LiveData with MVVM architecture
Stars: ✭ 22 (-12%)
Mutual labels:  dagger2, rxjava2, retrofit2, dagger2-android, architecture-components
Fountain
Android Kotlin paged endpoints made easy
Stars: ✭ 175 (+600%)
Mutual labels:  room, dagger2, rxjava2, retrofit2, architecture-components
Githubprojectbrowser
This is a sample Android Project that is based on Clean Architecture
Stars: ✭ 64 (+156%)
Mutual labels:  room, clean-architecture, dagger2, retrofit2, architecture-components
Theatre
Pet project using Clean Architecture + MVVM + Reactive Extensions + Android Architecture Components. The data are fetched from LondonTheatreDirect API. 🎭
Stars: ✭ 577 (+2208%)
Mutual labels:  data-binding, clean-architecture, dagger2, rxjava2, dagger2-android
paybill-manager
Your personal finance manager
Stars: ✭ 46 (+84%)
Mutual labels:  clean-architecture, dagger2, retrofit2, dagger2-android, architecture-components
Mvvmarms
Android MVVM Architecture Components based on MVPArms and Android Architecture Components.
Stars: ✭ 425 (+1600%)
Mutual labels:  room, dagger2, rxjava2, retrofit2, dagger2-android
movies
An example approach for modularization, reactive clean architecture and persistancy.
Stars: ✭ 110 (+340%)
Mutual labels:  room, clean-architecture, dagger2, retrofit2, architecture-components
mvp-android-template
MVP Android Template to give you a Quick Head Start for your next Android Project. It implements MVP Architecture using Dagger2, Room, RxJava2 , Retrofit2
Stars: ✭ 20 (-20%)
Mutual labels:  room, dagger2, rxjava2, retrofit2, dagger2-android
Wanandroid
🏄 基于Architecture Components dependencies (Lifecycles,LiveData,ViewModel,Room)构建的WanAndroid开源项目。 你值得拥有的MVVM快速开发框架:https://github.com/jenly1314/MVVMFrame
Stars: ✭ 410 (+1540%)
Mutual labels:  room, gson, dagger2, retrofit2, architecture-components
Base Mvvm
App built to showcase basic Android View components like ViewPager, RecyclerView(homogeneous and heterogeneous items), NavigationDrawer, Animated Vector Drawables, Collapsing Toolbar Layout etc. housed in a MVVM architecture
Stars: ✭ 18 (-28%)
Mutual labels:  room, dagger2, rxjava2, retrofit2, architecture-components
Pursuit-Core-Android
Pursuit Core Android
Stars: ✭ 45 (+80%)
Mutual labels:  room, dagger2, rxjava2, retrofit2
Kotlin Mvvm Architecture
Android Architecture Design Patterns using Kotlin, MVVM, Dagger2, LiveData, Room, MediatorLiveData, NetworkBoundResources, Retrofit, AndroidX, ViewModels, Dependency Injection using Dagger2, Repository pattern.
Stars: ✭ 126 (+404%)
Mutual labels:  room, dagger2, retrofit2, dagger2-android
Muvi
Very simple project to show a collection of Movie from MovieDb with a minimalist design
Stars: ✭ 46 (+84%)
Mutual labels:  room, clean-architecture, dagger2, rxjava2
Android tmdb clean architecture
Showcase of clean architecture concepts along with Continuous Integration and Development for modular Android applications. Includes test suits (functional and unit tests) along with code coverage.
Stars: ✭ 63 (+152%)
Mutual labels:  room, clean-architecture, dagger2, retrofit2
Tdcapp
Sample app which access the TDC (The Developer's Conference) REST API.
Stars: ✭ 55 (+120%)
Mutual labels:  room, clean-architecture, rxjava2, architecture-components
Android Clean Architecture Mvvm Dagger Rx
Implemented by Clean Architecture, Dagger2, MVVM, LiveData, RX, Retrofit2, Room, Anko
Stars: ✭ 138 (+452%)
Mutual labels:  room, clean-architecture, dagger2, retrofit2
Coolweather
Weather App that uses Android best practices. Android Jetpack, clean architecture. Written in Kotlin
Stars: ✭ 154 (+516%)
Mutual labels:  room, clean-architecture, retrofit2, architecture-components
GuildWars2 APIViewer
Guild Wars 2 API Viewer: An Android application used for viewing various Guild Wars 2 API endpoint responses. Developed utilizing MVVM architecture, in conjunction with Databinding, Dagger 2, Retrofit 2, and RxJava 2.
Stars: ✭ 53 (+112%)
Mutual labels:  data-binding, dagger2, rxjava2, retrofit2

flickr-android

Build Status

A small sample app to showcase architecting app using Clean Architecture and MVVM

Overview

Does it support tablet UI as well as UI for different orientation?

Yes. On phone devices, the gallery will show photos in a grid of 2 columns in portrait. But in landscape, column count will be 4.

Phone UI

For tablet devices, more column will be added.

Tablet UI

Does it handle configuration changes?

Yes. For example, when you rotate the device from portrait to landscape, the app won't fetch photos from Flickr again. I used the approach of using retained fragments which is mentioned in https://developer.android.com/guide/topics/resources/runtime-changes.html#RetainingAnObject.

Does it have a good architecture?

I used Clean Architecture and MVVM to drive a scalable, testable code-base. The project is divided into 3 modules:

  • domain: Contains components to perform business logic like Repository interfaces (e.g. PhotoRepository, QueryRepository), and interactors (e.g. GetPhotos). This module is completely independent from Android SDK. So that makes sure that any changes, for example, related to changing network layer, or data storage will not affect this business layer. Executing unit tests is fast because it's just a Java/Kotlin module.
    • Main technologies: Kotlin, RxJava.
  • data: Contains implementations of the Repository interfaces from the domain module. This module depends on Android SDK. This is where I implemented networking layer to access Flickr's public API as well as SQLite-related storage layer to store fetched photos.
    • Main technologies: Retrofit, Immutables, Gson, OkHttp, Room and RxJava.
  • app: Basically, a presentation layer. This place is where MVVM comes to play. This module contains view controllers (e.g. RecentPhotosFragment) and ViewModels (e.g. RecentPhotosViewModel). ViewModels are absolutely testable.
    • Main technologies: Data Binding Library, RxJava and RxAndroid.

On top of that, package hierarchy is organized by features: core, recent, and photodetails.

To understand more about this Clean Architecture approach, you can read further in following links:

Does it have unit tests?

Yes, however as I don't have much time, I only covered few most important classes which are:

  • PhotoRepositoryImpl
  • RecentPhotosViewModel
  • QueryRepository

Unit tests for the remaining classes can be written in the same way as those 3 classes.

Does it have a good way to send data across Activities?

Yes. To show a higher resolution photo, PhotoDetailsActivity only takes a photo id from RecentPhotosActivity. This is to avoid the TransactionTooLargeException which easily happens since Android 7 if we send a large amount of data between Android components. That photo id is then used to retrieve more infos about photo via PhotoRepository. PhotoRepository is backed behind by a good caching mechanism. After we fetch a list of photos from Flickr, they will be put into a memory cache to quickly access later on PhotosDetailsActivity. However, if somehow the app is killed by the system after being pushed into background, given a photo id, the app can retrieve the photo back via a SQLite-based database (implemented via Room).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].