Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 |
Tags
- 웹뷰
- Kotlin
- build
- 코틀린
- cursor
- 안드로이드
- compose
- studio
- 스튜디오
- Github
- error
- ADB
- 안스
- Android
- Gradle
- 유튜브
- WebView
- 의존성주입
- 깃헙
- MVVM
- coroutine
- DI
- 안드로이드 스튜디오
- 에러
- RecyclerView
- 코루틴
- 안드로이드스튜디오
- DAGGER
- hilt
- Retrofit
Archives
- Today
- Total
목록LifecycleEventObserver (1)
코딩하는 일용직 노동자
Activity 가 아닌 Class나 ViewModel class 에 Activity의 라이프사이클을 연결해서 onCreate(), onResume(), onPause(), onStop() 등의 상태변화를 감지하고 처리하는 방법을 알아보겠습니다. 이번 예제에서는 ViewModel 에 연결해보겠습니다. 1. app레벨의 gradle에 아래의 라이브러리들을 추가해줍니다. implementation 'androidx.core:core-ktx:1.12.0' implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.7.0' implementation 'androidx.activity:activity-compose:1.8.2' implementation 'androi..
안드로이드
2024. 3. 5. 16:43