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
- MaterialButton
- 안드로이드
- ViewModel
- OutlinedButton
- firebasefunctions
- androidstudio
- nav_graph
- Activity
- ArrayList
- Kotlin
- 밑줄
- ROOM
- FRAGMENT
- lifecyclescope
- 코틀린
- 안드로이드스튜디오
- 팝업액티비티
- 랜덤ID
- firebase
- button
- RealtimeDB
- textview
- 안드로이드 스튜디오
- Imageview
- EditText
- 뷰바인딩
- BottomSheetDialog
- Dialog
- Android
- ButtonWithButton
Archives
- Today
- Total
안드로이드 앱 개발
BottomNavigationView에서 transaction already commit called 오류 본문
코틀린(Kotlin)공부
BottomNavigationView에서 transaction already commit called 오류
스텝바이스텝안드로이드 2021. 3. 28. 21:52전역 변수에
var fragmentTransaction = fragmentManager.beginTransaction()
선언을 하고
commit()을 한 후에 다시 transaction을 생성해줘야 한다고 한다.
example
fragmentTransaction.add(R.id.frame_container, fragmentCustomers).commit()
fragmentTransaction = fragmentManager.beginTransaction()
fragmentTransaction.add(R.id.frame_container, fragmentHome).commit()
fragmentTransaction = fragmentManager.beginTransaction()
fragmentTransaction.add(R.id.frame_container, fragmentMemo).commit()
아니면 전역변수 생성없이
supportFragmentManager.beginTransaction().add(R.id.frame_container, fragmentCustomers).commit()
supportFragmentManager.beginTransaction().add(R.id.frame_container, fragmentMemo).commit()
supportFragmentManager.beginTransaction().add(R.id.frame_container, fragmentHome).commit()
'코틀린(Kotlin)공부' 카테고리의 다른 글
CheckBox에 setOnCheckedChangeListner 달기 (0) | 2021.04.15 |
---|---|
Coroutine 사용 방법 (0) | 2021.04.09 |
BottomSheetDialog_Modal - Kotlin (0) | 2021.03.29 |
for문 - Kotlin (0) | 2021.03.29 |
Data Class 만들기 (0) | 2021.03.28 |