GitXplorerGitXplorer
y

CheeseRoom

public
30 stars
1 forks
0 issues

Commits

List of commits on branch master.
Unverified
9e0b8758efade163f4c1f3e53340f64e2b6a6510

Update dependencies

yyaraki committed 5 years ago
Unverified
b384c352e6c25c1887ac6dd02065d47df89d63b7

Update dependencies

yyaraki committed 6 years ago
Unverified
37ed85d5562866c751cc7dcb3f8d4853470c4dc0

Migrate to AndroidX

yyaraki committed 6 years ago
Unverified
0522b402e24cacc5193575b93ab5fe6ba6e35aad

Remove unnecessary file

yyaraki committed 6 years ago
Unverified
7f8ac7908a74610e6a98abde7cde0058e18f6026

Update dependencies

yyaraki committed 6 years ago
Unverified
da57015436bde68f46abd9ca0f33238ea93cc7f2

Import

yyaraki committed 7 years ago

README

The README file for this repository.

CheeseRoom

This is a sample of Room.

The project has 5 modules.

  • app-kotlin: CheeseRoom written in Kotlin
  • app-java: CheeseRoom written in Sample
  • app-start: CheeseRoom codelab in Kotlin
  • common: This module has data such as cheese images
  • playground: Demonstrates some techniques of Room

Structure of the App

UI

  • MainActivity
    • CheeseListFragment: shows the list of cheeses
      • CheeseListViewModel
    • CheeseDetailFragment: shows the detail of a selected cheese. User can mark it favorite.
      • CheeseDetailViewModel

Data Source

See Guide to App Architecture for the overall design of this layer.

  • CheeseRepository
    • CheeseApi : Web API (It actually returns a constant data, but just pretend that it is a synchronous network call.)
    • CheeseDatabase : The main database

Database

The database has only 1 table.

  • Cheese: table
    • id: primary key, integer
    • name: text
    • favorite: boolean

Codelab

  1. Choose 'app-start' from the drop-down menu of the configurations.
  2. Read MainActivity.kt, CheeseListFragment.kt, and CheeseDetailFragment.kt.
  3. Finish TODOs in Cheese.kt.
  4. Finish TODOs in CheeseDatabase.kt.
  5. Finish TODOs in CheeseDao.kt.
  6. Finish TODOs in CheeseRepository.kt.
  7. Finish TODOs in CheeseListViewModel.kt and CheeseDetailViewModel.kt.
  8. Run CheeseDatabaseTest

What Next?

GithubBrowserSample