java.lang.IllegalStateException: Fragment not attached to Activity
not attached to Activity--> 프래그먼트에서 viewpager로 pagetAdapter를 사용 할 경우 getItem으로 newInstance 를 하면서 새로운 메모리를 생성하게 되면서 발생 하는 문제.--> 주로 getString() 등을 사용할 때 발생 한다. 새로운 context가 발생하였지만, 제대로 구성 하지 않아서 발생.--> 간단히 해결 하는 방법 Context 를 메인 액티비티의 것을 사용 해야 한다..
[안드로이드 공부]/프래그먼트
2017.12.28 12:02
[안드로이드] 프래그먼트에서 뷰 제거 확실하게 하기 -You must call removeView()
Caused by: java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.뷰페이져에 달린 얘들에서 디스트로이 뷰 하면서 제거 해줘야 한다. @Override public void onDestroyView() {&nbs..
[안드로이드 공부]/프래그먼트
2015.12.14 12:06
공지사항
최근에 올라온 글
- Total
- 193,054
- Today
- 142
- Yesterday
- 313