yannecer / NCalendar

一款安卓日历,仿miui,钉钉,华为的日历,万年历、365、周日历,月日历,月视图、周视图滑动切换,农历,节气,Andriod Calendar , MIUI Calendar,小米日历
Apache License 2.0
1.59k stars 314 forks source link

factual_scroll_view #42

Closed z469441432 closed 5 years ago

z469441432 commented 5 years ago
  com.necer.view.ChildLayout$ViewException
  at com.necer.view.ChildLayout.traverseView(ChildLayout.java:77)
  at com.necer.view.ChildLayout.addView(ChildLayout.java:62)
  at com.necer.calendar.NCalendar.onFinishInflate(NCalendar.java:135)
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:763)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
  at *.*.*.*.views.CustomePopupwindow.<init>(CustomePopupwindow.java:45)
  at *.*.*.*.fragment.HistoryFragment.onCreateView(HistoryFragment.java:62)
  at android.support.v4.app.Fragment.performCreateView(Fragment.java:2346)
  at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1428)
  at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1759)
  at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1827)
  at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:797)
  at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2596)
  at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2383)
  at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2338)
  at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2245)
  at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:703)
  at android.os.Handler.handleCallback(Handler.java:733)
  at android.os.Handler.dispatchMessage(Handler.java:95)
  at android.os.Looper.loop(Looper.java:136)
  at android.app.ActivityThread.main(ActivityThread.java:5017)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:515)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
  at dalvik.system.NativeStart.main(Native Method)

Calender在popupwindow,父布局和子布局全都没有使用任何滑动布局。不知为何Inflater.inflate时候会卡顿一下,并抛出一个异常

z469441432 commented 5 years ago

看了源码是在找一个tag为factual_scroll_view的view,没有找到,然后就递归去找,最后递归找不到就抛异常,但是异常没有说明原因

yannecer commented 5 years ago

NCalendar内部有多个实现了NestedScrollingChild的view是需要指定滑动的目标view是哪个,才需要用到这个tag,如果你使用的时候出现了这个问题,可以检查一下NCalendar内部是否有实现了NestedScrollingChild的view,而且,这个嵌套滑动的日历放在Popupwindow中,有点不太合适,Popupwindow中使用日历,一般是单独使用月日历MonthCalendar