Closed ydcool closed 10 years ago
低于Jellybean版本报如下错误: 01-20 08:53:00.141: E/AndroidRuntime(24005): java.lang.NoSuchMethodError: android.view.ViewTreeObserver.removeOnGlobalLayoutListener 01-20 08:53:00.141: E/AndroidRuntime(24005): at com.markmao.pulltorefresh.widget.XListView$1.onGlobalLayout(XListView.java:107)
已修正: 将107行代码替换如下: if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) { observer.removeGlobalOnLayoutListener(this); } else { observer.removeOnGlobalLayoutListener(this); }
感谢反馈!发一个request吧,我直接合并到里面。
低于Jellybean版本报如下错误: 01-20 08:53:00.141: E/AndroidRuntime(24005): java.lang.NoSuchMethodError: android.view.ViewTreeObserver.removeOnGlobalLayoutListener 01-20 08:53:00.141: E/AndroidRuntime(24005): at com.markmao.pulltorefresh.widget.XListView$1.onGlobalLayout(XListView.java:107)
已修正: 将107行代码替换如下: if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) { observer.removeGlobalOnLayoutListener(this); } else { observer.removeOnGlobalLayoutListener(this); }