requestLayout() improperly called by…view.NoScrollGridView during layout: running second layout pass
2017-04-01 11:41
489 查看
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.RefreshListViewandroid: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>-->
问题仅供参考,欢迎批证,不喜勿喷。
相关文章推荐
- W/View: requestLayout() improperly called by androidapp:id/toolbar_title} during second layout pass:
- spinner requestlayout() improperly called by during layout running second layout pass
- requestLayout() improperly called by android.widget.TextView
- android W/View: requestLayout() improperly called by xxxView
- requestLayout() improperly called by
- Android View的second layout pass
- requestLayout() improperly called by 出现后的解决方法
- running second layout pass
- requestLayout() improperly called by android.widget.GridView{43cefbd VFED.VC.. .F...... 0,0-2190,319
- 关于RecyclerView: No adapter attached; skipping layout
- iOS9-by-Tutorials-学习笔记六:UIStackView-Auto-Layout-Changes
- 关于Androidstudio中NavigationView出现的问题(No resource identifier found for attribute 'headerLayout' )及解决方法
- 准备看下layout的结果出现Exception raised during rendering: No tab known for tag null
- 使用Recyclerview 遇到No adapter attached; skipping layout 问题
- RecyclerView has no LayoutManager
- returns a number of second with no user activity (called in an OnTimer event of a TTimer component).
- Caused by: android.view.InflateException: android.support.design.widget.CoordinatorLayout
- 玄学之坑:RecyclerView: No adapter attached; skipping layout
- at com.example.actionbar.view.NoScrollGridView.onMeasur (NoScrollGridView 异常?
- eclipse报 No XML content. Please add a root view or layout to your document. 错误的解决办法