Skip to content

Starter project for the GymLog application. Really it is just an Empty Views activitiy with room and view bindings added to the build.gradle file. I used Kotlin for the build.gradle file so be aware the syntax might be a bit different though you shouldn't need to change it...

Notifications You must be signed in to change notification settings

Andrew-Ryer/HW04_Gymlog_V3_0_0

 
 

Repository files navigation

GymLog Application

All of the associated videos are linked in this Panopto folder. It may be necessary to log in to your CSUMB account to view the videos. The goal of this project is to work through all the steps necessary to create an app that uses the Room database wrapper for persistence and that allows users to log in. If I am feeling brave I will add in a recycler view too.

Overview and plan

intro video This is the overall view of the final product. Once I get the login screen setup and working, including the logout features, I will record this video. Anything afer this (editing logs, more user info, etc. Will be shown in their respective video).

Video 01: Setup

  1. Create a gitignore file
  2. Create a branch
  3. make the initial layout

Video 02: Basic functions

  1. Add viewBindings
  2. Wire up the button
  3. Read information from the display
  4. Log our info
  5. Test the display

Video 03: Add the Database

  1. Add the room dependancies
  2. create the POJO entity objects
    • for now just a GymLog
  3. Create the database interface
  4. Create the GymLog DAO
  5. Make the repository
    • Requires lots of lambdas and auto-completes

Video 04: Use the Database

  1. Create a type converter
  2. Use the Room Repo to write/read logs.

Video 05: fix the problems

  1. Add a singleton to fix the non main thread issue
  2. Show the app inspector
  3. Write a log to the DB
  4. show it in app inspector!
  5. add a toString

Video 06: Update display

  1. Fix it so an empty string will not insert a log
  2. Clean up the toString()
  3. Use the retrieved records to update the display.

Video 07: Add users

  1. Create a User POJO
  2. User DAO
  3. Update the DB repo to allow user operations
  4. Update gymLog to have a userId field

Video 08: add a login screen

  1. Why aren't we getting default users.
    • i.e. why is the callback not working?
  2. Add a login screen

Video 09: add menu and logout function.

  1. Add a menu to facilitate logging in and out
  2. Add logout function
  3. Add alertDialog for logout.

Video 10: update our login screen

  1. Make login screen use database

Video 11: Update login screen to use LiveData

  1. UserDao --> return LiveData
  2. GymLogRepository --> return LiveData
  3. update Login method

Video 13:

  1. Add user preferences to store login info
  2. Make MainActivity sort by user

Bugs to fix

  1. User login is not persisting... wtf?
  2. display is not updating immediatly...
    • Issue is with asynch so adding a recycler will fix it...

Add a recycler

  1. Update the GymLog DAO to return liveData
  2. Create the viewHolder
  3. Create the adapter
  4. Update MainActivity to have a recycler view
  5. profit?

About

Starter project for the GymLog application. Really it is just an Empty Views activitiy with room and view bindings added to the build.gradle file. I used Kotlin for the build.gradle file so be aware the syntax might be a bit different though you shouldn't need to change it...

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%