Simple Android app, displaying list of latest news from chosen news sources. Main features:
- 70 news sources in 9 categories
- Share an article function
- Support both portrait and landscape screen orientation
- Two pane mode for tablets
App built with MVI architecture.
Presentation layer is done a bit different from classic MVP. There is Model class instance in Presenter, that holds current view state. Presenter does not send any commands to view, instead of this, presenter changes Model
properties, and than View render
changes. View input events sent to presenter through event
method.
Domain layer works much more like MVP + Clean Architecture approach. Business logic is represented by use cases and repositories. Repositories work with data layer and handle entities mapping. Domain layer knows nothing about Android SDK.
Data layer works directly with Android specific tools: network calls, DB queries (In this case app persistent storage made with Realm) and stuff like that.
You can find unit test here. Current code coverage is about 40%.
App has Analytics module, that used to gather user events and record different metrics. There is AnalyticsKit interface, that can be implemented using any of your favorite app metrics tools, like Fabric, Firebase, AppMetrica or whatever. With this approach you can use any number of metrics tools in any combination, and easy add or remove them.
This app uses News API to retrieve data. You must provide your own api key in order to build the app. Paste it to project gradle.properties in variable named ApiKey
.
- Moxy
- RxJava
- RxAndroid
- RxBinding
- RxKotlin
- Realm
- Kotlin Realm Extensions
- Retrofit
- Dagger 2
- Glide
- Hawk
- Timber
- RecyclerView Animators
- Mockito-Kotlin
Copyright 2017-2018 Ivan Antsiferov
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.