Popular Articless in Kotlin 👓

GitHub license Android Weekly ktlint Github Followers GitHub forks GitHub watchers Twitter Follow

News App is a sample Android application 📱 showing most popular articles of the world 👓 built to demonstrate use of Modern Android development tools. Dedicated to all Android Developers with ❤️.

You can Install and test latest Popular Articles app from below 👇

Articles App

Build || Run

  • You must login here getting API-KEY and Update x's values in Secret-File with your api key.

About

It simply loads Popular Articles data from API.Peoples will be always loaded from Remote data (from API).

  • Clean and Simple Material UI.
  • Clean and Simple Architecture(MVVVM).

Features

  • user can select country and categories which would like to hear about them in Onboarding Screen.
  • user see headlines from the selected choices,headlines ordred by latest to oldest.
  • user can open headline in browser.
  • user can search headlines with categories choice and can save his favorite articles.

Dummy API is used in this app. JSON response is statically hosted here.

ScreenShots

Architecture

This app uses MVVM (Model View View-Model) architecture.

Built With 🛠

  • Kotlin - First class and official programming language for Android development.
  • Coroutines - For asynchronous and more..
  • Flow - A cold asynchronous data stream that sequentially emits values and completes normally or with an exception.
  • Android Architecture Components - Collection of libraries that help you design robust, testable, and maintainable apps.
    • StateView - Flow APIs that enable flows to optimally emit state updates and emit values to multiple consumers.
    • ViewModel - Stores UI-related data that isn't destroyed on UI changes.
    • DataBinding - that allows you to bind UI components in your layouts to data sources in your app using a declarative format rather than programmatically.
    • Room - SQLite object mapping library.
  • Dependency Injection -
    • Koin DI Version 🗡️
  • Retrofit - A type-safe HTTP client for Android and Java.
  • Coil - An image loading library for Android backed by Kotlin Coroutines.
  • Material Components for Android - Modular and customizable Material Design UI components for Android.
  • Gradle Kotlin DSL - For writing Gradle build scripts using Kotlin.
  • Gradle Refresh Version - Centralize your dependencies in a proper file format.
  • Secrets Gradle Plugin for Android - A Gradle plugin for providing your secrets securely to your Android project.

How to generate lint reports ?

Open terminal and type the following command ./gradlew lint

The lint report will be generated on the following path. app/build/reports

Soon 🎈💪

  • articles will be always loaded from local database. Remote data (from API) and Local data is always synchronized.
  • Try with Hilt-Dagger - Standard library to incorporate Dagger dependency injection into an Android application.

Find this repository useful? ❤️

Support it by joining stargazers for this repository. ⭐
And follow me for my next creations! 🤩

Contributed By: Khaled Sherif

License


Copyright (c) 2020 Khaled  Sherif
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE