Restaurants - A simple app which displays a list of restaurants from a stored JSON, ordered by opening status, favorites and filter chosen from the dropdown

Related tags

App Restaurants
Overview

Android Assignment

Authored by Prafulla Thottasseri

A simple app which displays a list of restaurants from a stored JSON, ordered by opening status, favorites and filter chosen from the dropdown.

The list item displays the restaurant name, opening status and favorite/not indicator. A restaurant can be marked favorite/removed as favorite by clicking on the heart icon in the list. On selection of an item it shows the details screen. Item details include the restaurant name, opening status, rating, distance, delivery costs and minimum order amount and favorite status.

  • The app is written entirely in Kotlin, using Android KTX. Android KTX is a set of Kotlin extensions that optimizes Jetpack architecture components and Android platform APIs for more concise and idiomatic Kotlin code.
  • The app is built using MVVM architecture with dependency injection using Hilt.
  • The app uses a single Activity with multiple Fragments. Transitions between fragments use the Navigation component and transition animation actions.
  • The screens use fragment layouts, are created using ConstraintLayout and Data Binding, and are scrollable when required to support smaller screen sizes.
  • JSON data from the sample JSON is saved into the Room database using coroutines and is surfaced to the UI through ViewModel.
  • GSON library is used for JSON parsing.
  • A Room database is used to save the information from JSON locally and handle sorting.
  • AppCompat is used to preserve key app functionality on older versions of Android.
  • The app UI is built to support phone and tablet.
  • Few tests are added for testing the database operations in RestaurantsDao and RestaurantDetailHostActivity and can be extended further. These are instrumented tests and need a device/emulator.
  • Lint check and ktlint plugin is used for optimizations and code styling.

The app has the following packages:

  1. di: It handles the dependency injection using Hilt.
  2. model: It contains the RestaurantRepository class and database package with relevant classes for saving the JSON data to a Room database.
  3. ui: It contains a RestaurantDetailHostActivity, adapter, fragments, util packages needed for the UI implementation.
  4. viewmodel: It contains the shared viewmodel called RestaurantsViewModel class that surfaces data to the UI via LiveData object. This is shared by the RestaurantListFragment and RestaurantDetailFragment.

Please note the below:

  • Please note that the distance, delivery and minimum cost are displayed as in the JSON and not converted to any metric systems.
  • Upgrading to latest espresso version in gradle gives dependency conflicts hence using 3.3.0 - https://github.com/android/android-test/issues/861
You might also like...
A simple covid-19 response application to give users an idea of the severity of their covid-19 status and profer steps to take based on the severity.
A simple covid-19 response application to give users an idea of the severity of their covid-19 status and profer steps to take based on the severity.

COVID-19 Response 🎡 A simple covid-19 response application to give users an idea of the severity of their covid-19 status and profer steps to take ba

Todo List Application is an android app that allows building a todo list and basic todo items management functionality including adding new items, editing and deleting an existing item
Todo List Application is an android app that allows building a todo list and basic todo items management functionality including adding new items, editing and deleting an existing item

Todo List Application is an android app that allows building a todo list and basic todo items management functionality including adding new items, editing and deleting an existing item

An app which displays questions from Stack Exchange from it's api. Can search questions with tags as well. Uses MVVM architecture, dependency injection, coroutines, retrofit2 for network calls

Stack Exchange app What the app does? Shows a list of trending questions from stack exchange api Can search for the desires question. Can add tags to

Tmdb - An Android app which displays data from The Movie Database API
Tmdb - An Android app which displays data from The Movie Database API

TMDB - The Movie Database This is my first android app! This project is an Andro

Application to solve a personal problem, which was the wish to have a simple app that handles a market list with prices, quantity and total price
Application to solve a personal problem, which was the wish to have a simple app that handles a market list with prices, quantity and total price

Market List Application that handles a market list offline in device's storage system. The list can be just pasted in a big edit text field and the ap

Tidy up your Android status bar before taking screenshots for the Play Store
Tidy up your Android status bar before taking screenshots for the Play Store

DEPRECATED This project no longer works on recent versions of Android. Use Android's build-in Demo mode instead. For the curious, more information abo

Android-Study-Jams - Timely is basically an application which displays Live Time-Table for different semesters in Bhilai Institute Of Technology Simple Workout App which contains list of workouts.
Simple Workout App which contains list of workouts.

MAD Assignment-2 Title : Simple-Workout-App Description : Simple Android App contains list workouts and keep track of progress based on workout Build

Android-TODO-LIST-VIPER - Android TODO LIST VIPER
Android-TODO-LIST-VIPER - Android TODO LIST VIPER

Android TODO List VIPER VIPER is an architectural approach for iOS mobile app de

Owner
Prafulla Thottasseri
Prafulla Thottasseri
HideDroid is an Android app that allows the per-app anonymization of collected personal data according to a privacy level chosen by the user.

HideDroid An Android App for preserving user privacy HideDroid is an Android app that allows the per-app anonymization of collected personal data acco

null 100 Dec 12, 2022
A news application through which you can learn and browse all the news that interests you by choosing the country and type of news with the ability to browse and add some news to your favorites

MY-NEWS-Android A news application through which you can learn and browse all the news that interests you by choosing the country and type of news wit

Mahmoud ELramady 0 Nov 11, 2021
RedditNews - A simple application to display the top news from the Reddit API site and save your favorites to a local database.

RedditNews - A simple application to display the top news from the Reddit API site and save your favorites to a local database. Arch

null 1 Aug 28, 2022
News-App - A news app Which displays news with the help of JSON data

News-App This is a news app Which displays news with the help of JSON data

Lalith Sharma 0 Feb 16, 2022
Easy and quick contact management with no ads, handles groups and favorites too.

Simple Contacts A simple app for creating or managing your contacts from any source. The contacts can be stored on your device only, but also synchron

Simple Mobile Tools 621 Dec 26, 2022
An Android app to stream and download your media stored in Google Drive in an Awesome way !!

⚡ Thunder : An Android app to stream and download your media stored in Google Drive in an Awesome way !! (Just Movies for now) ?? Getting Started : Le

null 278 Jan 5, 2023
Dynamic-UI-From-JSON - A Sample Android app to show dynamic UI generation from Json

Dynamic UI from JSON Functionality The app's functionality includes: The app gen

Rafsan Ahmad 12 Dec 16, 2022
An app that displays the list of top headlines and when the user clicks on a news story

News Feed Android App (Summary) This app works as an app that shows the recent n

Olaore Fouad 0 Dec 17, 2021
This is a simple app to help get or set your Slack status from the command line.

Slack Status This is a simple app to help get or set your Slack status from the command line. The app is a Spring Boot app written in Kotlin. It uses

Steven Noto 1 Oct 16, 2021
TMDbHub - Listing movies using the TMDb API. You can filter results, view details, and save them to a collection

TMDb Hub Listing movies using the TMDb API. You can filter results, view details

David Varga 4 Dec 30, 2021