Skip to content

πŸ€— My first Android application I ever created! It is a simple personal πŸ“¦ Inventory Management Android App to demonstrate the usage of Room Database, UI layout design, and RecyclerView.

Notifications You must be signed in to change notification settings

rektplorer64/Android-Inventory_App

Repository files navigation

logo

SIDE PROJECT

Generic Inventory App

A simple Android application that help you remember your belongings!

Project Hero Image

🚩 Motivations

After finishing the first year of study at Mahidol University, the Faculty of ICT, I was equipped with knowledge and skills in Java programming language and desire to put Android knowledge from self-study (via Udacity) to a better use. I decided to create an application that allows me to understand the underlying Android application framework even more.

The application that I choose to build is a simple personal inventory manager.

πŸ˜€ Features

  • Persistent local inventory database via an early version of Room Database
  • Image Storage for each item
  • Item tagging by a color or terms
  • Responsive layout
    • Dual-pane for tablet
    • Single-pane for vertical form-factor devices and phones
  • Customizable item list view (Grid/List)
  • Detailed item search and filters
    • Search by
      1. Keyword in either item name/description/ID
      2. Date Created
      3. Date Modified
      4. Has any image or not
      5. Quantity of the item
      6. Tags
    • Sort by
      1. Item ID
      2. Item Name
      3. Item Description
      4. Date Created
      5. Date Modified
      6. Color Accent
      7. Quantity
      8. Rating
  • User Reviewing (Mimicked)
  • Online Data Synchronization Out of the project scope during that time

πŸ›  Implementation

DISCLAIMER: This app has no clean architecture whatsoever because IT IS MY FIRST APP. Plus, during that time, there were literally no design guideline recommended by Google available.

  1. AsyncTask - for item search and sorting in the background thread
  2. Material Design Component - Most of the UI elements are based on Google's Material Design.
  3. RecyclerView
    • There are multiple types of RecyclerViewAdapter that are implemented.
    • To change the list item layout at runtime (e.g. Full-height card to small card), there are nasty method calls that force the layout to be redrawn that could lead to performance impacts.
    • During the time of development, multi-selection in RecyclerView needed to be implemented manually. Therefore, there might be some glitches.
  4. Fragment - They allow some layouts to be reused from time-to-time. For example, the item detail modal (pop-up) when clicking an item in a search result.
    • It is used to implement Circular revealing User Interface.
    • It allows me to create a dual-pane User Interface layout for the tablet form-factor because I do not have to have redundant part of source code for different layouts.
    • Manual Fragment Transaction is used heavily in this project because there were not any abstraction provided by the framework.
  5. Preference - For the search and filter page, the search and filter settings that user has adjusted are automatically saved and restored for the user.
  6. Room Database - Basically, SQLite used internally in an Android application to store data persistently on disk.
    • I actually designed a simple relational model for this app too.
    • The database is lazily initialized when the app runs for the first time. Data will be randomly generated at first launch.

πŸŽ“ What I learned from this project

  1. I should have thought carefully regarding how to organize each piece of code.
  2. Abstraction and Encapsulation is important because it reduces clutters and duplicate code significantly.
  3. Always perform CPU intensive task in the background thread.
  4. You should always be careful when dealing with multi-threads. Sometimes it leads to weird bugs that sometimes magically disappear and appear back-and-forth.
  5. Java is not as hard as I thought it would be.
  6. Room Database is a way better than good ol' Database Cursor.

πŸ–Ό Screenshots

There are two panes that uses the screen real-estate efficiently. There are two panes that uses the screen real-estate efficiently.

The item list can be changed in terms of the appearance, and the number of columns.

Compact List view Small List view Full image height List view

This page also support vertical layout. Vertical List

There are also another page for Search and Filter! You can also change the layout too. Just like the main list page! If you look carefully, you will see that the search keyword is being made bold in the result list.

One-column Search Results Two-column Search Results
Search page with 1 list column Search page with 2 list columns

πŸ“½ Demos

Item List Item rating Image Persistence Item Detail Editing Screen Rotation Searching UI

About

πŸ€— My first Android application I ever created! It is a simple personal πŸ“¦ Inventory Management Android App to demonstrate the usage of Room Database, UI layout design, and RecyclerView.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages