A simple application for viewing news with multimodule architecture, MVVM, paging, unit tests.
GlobalNews requires a minimum API level of 23. Clone the repository. To request news, you will need an API key, i.e. global_news_api_key
from GNews. If you don't have an account yet, you will need to create one to request an API key.
In the root directory of your project, inside the local.properties file (create it if it is not available), include the following lines:
# Get this from GNews
global_news_api_key=<insert>
global_news_base_url="https://gnews.io/api/v4/"
- Kotlin a statically typed, object-oriented programming language running on top of Java Virtual Machine and developed by JetBrains.
- MVVM (Jetpack ViewModel + LiveData) an architectural pattern that improves the separation of tasks, it allows you to separate the logic of the user interface from the business logic of the app.
- Multi module allows you to split the application into features. A feature is a logically complete, maximally independent program module that solves a specific user problem, with clearly defined external dependencies, and which is relatively easy to reuse in another program.
- Single Activity an architecture that has only one activity acting as a container for fragments
- Paging Library helps you load and display small chunks of data at a time.
- Dagger 2 for dependency injection.
- Retrofit a REST Client for Android which makes it relatively easy to retrieve and upload JSON (or other structured data) via a REST based webservice.
- Room persistence library which provides an abstraction layer over SQLite to allow for more robust database access while harnessing the full power of SQLite.
- Cicerone is a lightweight library that makes the navigation in an Android app easy.
- Material Design 3 an adaptable system of guidelines, components, and tools that support the best practices of user interface design.
- View Binding is a feature that allows you to more easily write code that interacts with views..
- Coroutines lightweight threads. This allows us to write asynchronous non-blocking code in a consistent manner
- Flow an addition to Kotlin coroutines for asynchronous processing of data streams that are executed sequentially.
- ViewModel to store and manage UI-related data in a lifecycle conscious way.
- Unit tests to test individual parts of the application.
- Android KTX which helps to write more concise, idiomatic Kotlin code.
- Shimmer is an Android library that provides an easy way to add a shimmer effect to any view in your Android app.
Copyright (C) 2022 Stanislav Aleshin [email protected]
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.