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 | 31 |
Tags
- CoordinatorLayout
- HTTP
- room
- 백준
- 알고리즘
- Coroutine
- Behavior
- recyclerview
- 알림
- activity
- notification
- hilt
- Navigation
- CollapsingToolbarLayout
- onMeasure
- BOJ
- 안드로이드
- kotlin
- 코틀린
- Android
- CustomView
- onLayout
- ViewModel
- View
- sqlite
- lifecycle
- AppBarLayout
- Algorithm
- DataBinding
- LiveData
Archives
- Today
- Total
목록lifecycleScope (1)
개발일지

ViewModelScope ViewModel마다 존재하는 Scope이다. ViewModel이 삭제되면 자동으로 취소된다. class ExampleViewModel : ViewModel() { init { viewModelScope.launch { /* ViewModel이 사라지면 종료된다. */ } } } LifeCycleScope LifeCycle 객체마다 존재하는 Scope이다. Create, Start, Resume 3가지의 Mode를 지원하고 Active상태(화면에 보이는 상태)일 때만 수행된다. class CoroutineFragment : BaseFragment(R.layout.fragment_coroutine) { private var count = 0 private val logList b..
Android (안드로이드)/Lifecycle
2021. 3. 24. 10:50