The project contains the following components:
- Ktx (Kotlin synthetic properties for more efficient view binding), Extension functions
- Android Design Library
- MPAndroidChart for displaying charts
- Commonly used third party dependencies (RxJava, retrofit, etc))
- Other setups to support performance and dependency injection (dagger, custom Application, Timber, etc)
To check out the source, simply download/clone the repo
This project does not require any additional setup or special configurations to build or run.
- There are 2 different build types - Debug, and Release. Main difference between the two is Debug build is eligible for logging via timber. Release build will also require generated keystore file.
Unit tests exist under the "test" directory.
The app uses the popular MVVM architecture to allow for separation of logic and ease of testing. In this paradigm, all business logic should live inside presenters (but they can delegate some tasks to other classes that are injected as dependencies). Activities and fragment will act as "views", they should not have any logic other than passing the user events to the presenter and displaying the data. There are also Contract classes that specify the communication interface between the views and presenters.
BaseMvpActivity
: Base class for activities. Includes setup for interactions with presenter.BaseMvpFragment
: Basically the same asBaseMvpActivity
, but for fragments.BasePresenter
: Base class for all presenters. Includes lifecycle setup and common dependencies. Goes along withBaseMvpActivity
andBasMvpFragment
.BaseContract
: Includes interfaces that all views and presenters should implement.
- RxJava/RxAndroid (helps with asynchronous event handling)
- Retrofit/OkHttp (simplifies network requests)
- Timber (better logging tool)
- Mockito (mocks out classes for tests)