Skip to content

Commit 60fbace

Browse files
Editing.
1 parent f3bae80 commit 60fbace

File tree

1 file changed

+3
-1
lines changed
  • content/learning-paths/smartphones-and-mobile/build-android-selfie-app-using-mediapipe-multimodality

1 file changed

+3
-1
lines changed

content/learning-paths/smartphones-and-mobile/build-android-selfie-app-using-mediapipe-multimodality/5-view-model-setup.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ layout: learningpathall
1010

1111
The `ViewModel` class is a [business logic or screen level state holder](https://developer.android.com/topic/architecture/ui-layer/stateholders). It exposes state to the UI and encapsulates related business logic.
1212

13-
The main advantage of using View Model is that it caches state and persists it through configuration changes. This means that the UI does not have to fetch data again when navigating between activities, or following configuration changes, such as screen rotation.
13+
The main advantage of using `ViewModel` is that it caches state and persists it through configuration changes. This means that the UI does not have to fetch data again when navigating between activities, or following configuration changes, such as screen rotation.
1414

1515
## Introduce Jetpack Lifecycle dependency
1616

17+
You can now bring in the Jetpack Lifecycle libraries.
18+
1719
1. Navigate to `libs.versions.toml` and append the following line to the end of `[versions]` section. This defines the version of the Jetpack Lifecycle libraries that you will be using.
1820

1921
```toml

0 commit comments

Comments
 (0)