-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
30 additions
and
5 deletions.
There are no files selected for viewing
21 changes: 18 additions & 3 deletions
21
android/app/src/main/java/net/pengcook/android/presentation/making/RecipeMakingViewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,22 @@ | ||
package net.pengcook.android.presentation.making | ||
|
||
import androidx.lifecycle.LiveData | ||
import androidx.lifecycle.MutableLiveData | ||
import androidx.lifecycle.ViewModel | ||
import net.pengcook.android.presentation.making.listener.RecipeMakingEventListener | ||
|
||
class RecipeMakingViewModel : ViewModel() { | ||
// TODO: Implement the ViewModel | ||
} | ||
class RecipeMakingViewModel : ViewModel(), RecipeMakingEventListener { | ||
val titleContent = MutableLiveData<String>() | ||
|
||
val categorySelectedValue = MutableLiveData<String>() | ||
|
||
val ingredientContent = MutableLiveData<String>() | ||
|
||
val difficultySelectedValue = MutableLiveData<String>() | ||
|
||
val introductionContent = MutableLiveData<String>() | ||
|
||
override fun onNavigateToStep() { | ||
// TODO: Implement navigation logic | ||
} | ||
} |
14 changes: 12 additions & 2 deletions
14
...id/app/src/main/java/net/pengcook/android/presentation/making/step/StepMakingViewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,17 @@ | ||
package net.pengcook.android.presentation.making.step | ||
|
||
import androidx.lifecycle.LiveData | ||
import androidx.lifecycle.MutableLiveData | ||
import androidx.lifecycle.ViewModel | ||
import net.pengcook.android.presentation.making.step.listener.StepEventListener | ||
|
||
class StepMakingViewModel : ViewModel() { | ||
// TODO: Implement the ViewModel | ||
class StepMakingViewModel : ViewModel(), StepEventListener { | ||
private val _stepNumber = MutableLiveData<String>() | ||
val stepNumber: LiveData<String> get() = _stepNumber | ||
|
||
val introductionContent = MutableLiveData<String>() | ||
|
||
override fun onNavigateToNextStep() { | ||
TODO("Not yet implemented") | ||
} | ||
} |