Notice
Recent Posts
Recent Comments
Link
250x250
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 안드로이드
- LifeCycle
- scroll
- viewmodel
- DART
- activity
- Navigation
- 계측
- Coroutines
- 테스트
- binding
- Button
- Dialog
- intent
- 앱
- Compose
- appbar
- livedata
- CustomScrollView
- tabbar
- drift
- Kotlin
- ScrollView
- Flutter
- textview
- android
- data
- textfield
- TEST
- 앱바
Archives
- Today
- Total
목록transformations (1)
Study Record
[안드로이드] LiveData 참고사항
😶 기본 선언 + ViewModel MutableLiveData 는 Mutable 이 붙어있으므로 변경가능하다. LiveData 로 선언된 변수는 값을 직접 변경할 수 없다. class OrderViewModel : ViewModel(){ private val _quantity = MutableLiveData() val quantity: LiveData get() = _quantity } 😶 Transformations.map() LiveData 에 Transformations 메서드를 사용하면 LiveData 의 값을 다른 값으로 변경할 수 있다. private val _price = MutableLiveData() val price: LiveData = Transformations.map(_price..
안드로이드
2023. 8. 2. 21:25