如题,崩溃log如下:
java.lang.ClassCastException: android.view.AbsSavedState$1 cannot be cast to android.widget.ScrollView$SavedState
at android.widget.ScrollView.onRestoreInstanceState(ScrollView.java:1806)
at android.view.View.dispatchRestoreInstanceState(View.java:14042)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3018)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3024)
at android.view.View.restoreHierarchyState(View.java:14020)
at android.app.Fragment.restoreViewState(Fragment.java:645)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:926)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1079)
at android.app.BackStackRecord.run(BackStackRecord.java:852)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1485)
at android.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:493)
at android.support.v13.app.FragmentStatePagerAdapter.finishUpdate(FragmentStatePagerAdapter.java:167)
at android.support.v4.view.ViewPager.populate(ViewPager.java:1106)
at android.support.v4.view.ViewPager.populate(ViewPager.java:952)
at android.support.v4.view.ViewPager$3.run(ViewPager.java:251)
at android.support.v4.view.ViewPager.completeScroll(ViewPager.java:1849)
at android.support.v4.view.ViewPager.onInterceptTouchEvent(ViewPager.java:1978)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2000)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2523)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2114)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2523)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2114)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2523)
상위 VIEW의 여러 하위 클래스를 상속할 때 설정된 뷰의 ID가 반복되기 때문에 형식 변환 예외가 발생합니다. 중복된 아이디를 수정해주세요
제목과 같은 인터페이스를 사용했는데 문제가 없는 코드가 게시되어야 합니다.