fikrirazzaq / AndroidArchitecture

Sample Posts Android App using Architecture Components

Home Page:https://jsonplaceholder.typicode.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Android Architecture

This project is built with kotlin. All data are collected from https://jsonplaceholder.typicode.com/.

I apply modern architecture for Android App in this project. This application contains features to retrieve all posts data, view post detail & comments and send new post. I'm using Kotlin Udacity and rifqimfahmi's repository as reference. In addition, I use git-karma for the commit messages conventions. There are still room for improvements, so I'm open for any feedback. Sharing with one another helps us all grow and learn. ✌️

Api Service

@GET("posts")
fun getAllPostsAsync(): Deferred<List<NetworkPost>>

@POST("posts")
fun addPostAsync(@Body body: PostBody): Deferred<Response<NetworkPost>>

@GET("comments")
    fun getCommentsByPostIdAsync(@Query("postId") postId: String): Deferred<List<NetworkComment>>

Navigation

The navigation between fragments is implemented using Navigation Component. Image below shows a visual representation of a navigation graph that contains two actions (both arrows) to different destinations (postDetailFragment and createPostFragment).

Libs Dependencies

Repository Created & Maintained By

Fikri Razzaq

#Flutter Enthusiast, #Android Developer.