File
▸
New
▸
Import Project
and selecting the
build.gradle
file in the root package.
If you've been following along up to this point, you should already be familiar with
the code. If you're just getting started, here's a quick recap:
• The
data
package contains two packages:
db
and
model
.
db
contains
QuestionDatabase
, which implements your Room database. The
model
package
contains your entities,
Question
and
Answer
. It also includes
Repository
, which
helps your ViewModels interact with your DAOs.
• The
view
package contains all your activities:
MainActivity
,
QuestionActivity
and
ResultActivity
.
• The
viewmodel
package contains the ViewModels of your class:
MainViewModel
and
QuestionViewModel
.
Once the starter project finishes loading and building, run the app on a device or
emulator.
Do'stlaringiz bilan baham: |