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
- 계측
- CustomScrollView
- 안드로이드
- Compose
- Navigation
- 앱
- Coroutines
- livedata
- android
- activity
- Kotlin
- viewmodel
- intent
- Dialog
- binding
- ScrollView
- 테스트
- tabbar
- textview
- DART
- data
- LifeCycle
- Flutter
- textfield
- appbar
- scroll
- Button
- TEST
- drift
- 앱바
Archives
- Today
- Total
목록argument (1)
Study Record
[안드로이드] Navigation 을 이용한 Fragment 데이터 전달, Safe Arg
😶 개요 Fragment 사이의 데이터 전달은 Bundle 을 이용한다. Bundle 을 사용하면 key, value 값으로 데이터를 저장하면 해당 Fragment 에서 argmnent 변수로 Bundle 객체를 참고할 수 있다. Bundle 객체로 Fragment 로 데이터 전달하기 val bundle = Bundle().apply { this.putInt("test1", 3) this.putString("test2", "testtest") } StartFragment().apply { arguments = bundle } 전달받은 데이터 해당 Fragment 에서 확인하기 arguments?.getInt("test1") arguments?.getString("test2") 하지만 Bundle 객체를 ..
안드로이드
2023. 6. 27. 19:17