Giter Site home page Giter Site logo

ranjithnaidu / android-playbook Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 351 KB

An experiment with the Android App

Kotlin 100.00%
kotlin-android dependency-injection rxjava2 retorfit2 unit-testing koin mvvm mvvm-android mvvm-databing databinding repository-pattern mockito-junit-test

android-playbook's Introduction

Android-Playbook

This project demonstrates the app architecture of a master-detail user flow on android.

All the endpoints used by the app are given below:
What's the app about?

The app displays a list of posts and allows the user to click on it by opening a bottom sheet with the following details:

  • Post Title (This is supplied from the master list)
  • Post Body (This is a description of the post and is also supplied from the master list)
  • Number of Comments for the post (This is loaded from the api upon opening the page)
  • Author name (This is also loaded from the api upon opening the page)

Please find the Screeshots below:

Screenshot_1558520659 Screenshot_1558520670 Screenshot_1558520666

App Architecture

This app is entirely written in Kotlin.

MVVM has been used in the app to keep the business logic away from the activities and fragments. LiveData and Data Binding was used as required to bind the views and data elements. Repository layer has been partially implemented in order to handle data operations especially with comments and authors endpoints where a huge chunck of data is given by the API not fully required by the viewModels.

Koin is used for Dependency injection (Dagger2 could also be used here)

The job of services is to interact with the apis and convert the responses into models which can be used by the rest of the app.Retrofit2, Okhttp and RxJava Adapter has been used to automatically convert the api responses into Rx observables.

Junit and nhaarman's mockito-kotlin library has been used for Unit-testing.

For any queries please contact [email protected]

android-playbook's People

Watchers

 avatar  avatar

Forkers

lovelyefyyucui

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.