W/View: requestLayout() improperly called by syberos.sdisclient.view.NoScrollGridView{178beaf VFED.VC. .F....ID 0,96-720,446 #7f10019e app:id/gv_gridview} during layout: running second layout pass
原因1:ListView使用时抱着错误无,是因为 ListView属性中有:
android:fastScrollEnabled="true"//(listView默认该属性为true
改为:
android:fastScrollEnabled="false"
这个Bug 为Android系统自身的BUG
参考:点击打开链接
原因2:
listView 重写的onMeasure方法 。且listView中 嵌套的 其它的 自定义 的组件 如 customGridView customTextView ,且在你们重写的 onMeasure() 方法
(个人认为 两个omMeasure冲突了。-我暂时是这么理解的。) 所以报出这个错误。-
解决办法: (我的解决办法)最外层的 listView 不重写onMeasure()方法。开始,我最外层因为不能滑动 还嵌套了ScrollView .导致 ListView的
getView()方法的参数 position值一直为0,,把ScrollView去掉就可以了。 如果导致界面不能滑动 也不能嵌套 ScrollView。
<!--<ScrollView--> <!--android:layout_width="match_parent"--> <!--android:layout_height="match_parent"--> <!--android:fastScrollEnabled="false"--> <!--android:scrollbars="none">--> <syberos.sdisclient.view.RefreshListView android:id="@+id/lv_listview" android:layout_width="match_parent" android:layout_height="match_parent" android:divider="@color/diver_line_color" android:fastScrollEnabled="false" android:dividerHeight="@dimen/distance_fifth" /> <!--</ScrollView>-->
问题仅供参考,欢迎批证,不喜勿喷。