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 | 29 | 30 | 31 |
Tags
- LifeCycle
- 테스트
- Kotlin
- Compose
- ScrollView
- tabbar
- 앱바
- binding
- textfield
- textview
- drift
- Navigation
- scroll
- appbar
- Flutter
- viewmodel
- TEST
- data
- CustomScrollView
- Dialog
- DART
- Coroutines
- 앱
- android
- livedata
- 계측
- Button
- 안드로이드
- intent
- activity
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