requestLayout() improperly called by…view.NoScrollGridView during layout: running second layout pass

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>-->

问题仅供参考,欢迎批证,不喜勿喷。
E DCS>CommonEventRuleListManager[main#dcs-thread-DcsWorker]: getUploadPolicy: cache does not have 20110 201101 launch_time_consuming 08-06 15:26:25.541040 6101 6267 D DCS>CommonRecorder[main#dcs-thread-DcsWorker]: Common Record event failed. DCS reject event: [appId=20110,logTag=201101,eventId=launch_time_consuming] . Pls check server config. 08-06 15:26:25.541095 6191 6191 D StackPagedViewEx[u0]: requestLayout com.oplus.quickstep.layout.grid.OplusGridRecentsView.requestLayout:0 android.view.ViewExtImpl.hookRequestLayout:656 android.view.View.requestLayout:28958 android.view.ViewExtImpl.hookRequestLayout:656 android.view.View.requestLayout:28958 android.view.ViewExtImpl.hookRequestLayout:656 android.view.View.requestLayout:28958 08-06 15:26:25.541152 6191 6191 D StackPagedViewEx[u0]: mIsLayoutValid true->false caller=com.oplus.quickstep.views.StackPagedViewEx.requestLayout:20 com.oplus.quickstep.layout.grid.OplusGridRecentsView.requestLayout:0 android.view.ViewExtImpl.hookRequestLayout:656 android.view.View.requestLayout:28958 android.view.ViewExtImpl.hookRequestLayout:656 android.view.View.requestLayout:28958 android.view.ViewExtImpl.hookRequestLayout:656 08-06 15:26:25.541457 3384 3543 D CompactWindowManagerService: triggerCompatWindowState canEnterCompactWindowMode: false 08-06 15:26:25.541470 3384 3543 D OplusVFXScreenEffectFeature: notifySFCompatWindowStateChange entered false 08-06 15:26:25.541516 3384 3543 D FSS_FoldScreenBlackCoverController: displayChangeToOn, dc:Display{#0 state=ON size=1264x2780 ROTATION_0} 08-06 15:26:25.541595 6191 22197 I NotificationListener[u0]: title and text is null, title:null,text:null,notification:StatusBarNotification(pkg=com.oplus.olc user=UserHandle{0} id=0 tag=null key=0|com.oplus.olc|0|null|1000: Notification(channel=LOGKIT_CHANNEL shortcut=null contentView=null vibrate=null sound=null defaults=0 flags=ONGOING_EVENT|GROUP_SUMMARY|CAN_COLORIZE color=0x00000000 groupKey=com.oplus.olc.notification vis=PRIVATE)) 08-06 15:26:25.541603 3384 3543 D FSS_FoldScreenBlackSurfaceStrategy: checkFinishFolding post clearBlackCover, triggerByAllDrawn:false, deviceFolding=false, waitingForHintMaskShown = false, foldingScreenAllDrawn:true, display.state=2, screenOnFully=true, isMatchDefaultState:false, aodShowing:false, screenOn:true, dc:Display{#0 state=ON size=1264x2780 ROTATION_0}, call by:com.android.server.wm.FoldScreenBlackCoverPolicy.checkFinishFolding:66 com.android.server.wm.FoldScreenBlackCoverController.checkFinishFolding:146 com.android.server.wm.FoldScreenBlackCoverController.displayChangeToOn:69 com.android.server.wm.FoldScreenSwitchingManager.displayChangeToOn:188 com.android.server.wm.DisplayContentExtImpl.displayChangeToOn:1072 08-06 15:26:25.541609 6191 6191 D LauncherRootView[u0]: LauncherRootView onLayout 08-06 15:26:25.541630 6191 6191 D StackPagedViewEx[u0]: PagedView.onLayout() 08-06 15:26:25.541797 2120 2547 D [PREVIEW]: SF obtain preview_adapter: 0 08-06 15:26:25.541806 2120 2547 D [PREVIEW]: TabletPreviewAdapter::parallel world 0 08-06 15:26:25.541848 6191 6191 D StackPagedViewEx[u0]: mIsLayoutValid false->true caller=com.oplus.quickstep.views.StackPagedViewEx.onLayout:14 com.android.quickstep.views.RecentsView.onLayout:39 com.android.quickstep.views.OplusRecentsViewImpl.onLayout:46 android.view.View.layout:26209 android.view.ViewGroup.layout:6664 android.widget.FrameLayout.layoutChildren:332 android.widget.FrameLayout.onLayout:270 08-06 15:26:25.541942 6191 6191 I LauncherRecentsView[u0]: setCurrentPageIfNeed mScroller.isFinished=false,pageScrollChanged=false,orientationChange=false 08-06 15:26:25.541950 6191 11157 D OplusTaskIconCacheImpl[u0]: OplusTaskIconCacheImpl#getCacheEntry(), task=[com.oplus.logkit.collect.activity.CollectActivity id=1574 m=1 u=0 lAT=171313478 dId=0] null getBitmapInfo, icon=com.oplus.icons.OplusFastBitmapDrawable@8c4fd6a, defaultWidth=210, defaultHeight=210, width=210, height=210 08-06 15:26:25.542048 3384 3552 D AppProfilerExtImpl: Skipped pss collection for CPU busy 08-06 15:26:25.542119 6191 22197 I NotificationListener[u0]: isGroupHeader is true, notification:StatusBarNotification(pkg=com.oplus.olc user=UserHandle{0} id=0 tag=null key=0|com.oplus.olc|0|null|1000: Notification(channel=LOGKIT_CHANNEL shortcut=null contentView=null vibrate=null sound=null defaults=0 flags=ONGOING_EVENT|GROUP_SUMMARY|CAN_COLORIZE color=0x00000000 groupKey=com.oplus.olc.notification vis=PRIVATE)) 08-06 15:26:25.542166 6101 6267 D DCS>AbandonEventRuleTableHelper[main#dcs-thread-DcsWorker]: insert package: 20110_201101_launch_time_consuming true 08-06 15:26:25.542228 6191 22197 I Launcher.Badge[u0]: BadgeDataProviderCompatVP#onNotificationFullRefreshInner, activeNotifications size = 2activeNotifications = [StatusBarNotification(pkg=com.oplus.olc user=UserHandle{0} id=1 tag=null key=0|com.oplus.olc|1|null|1000: Notification(channel=LOGKIT_CHANNEL shortcut=null contentView=null vibrate=null sound=null defaults=0 flags=ONGOING_EVENT|NO_CLEAR|FOREGROUND_SERVICE|CAN_COLORIZE color=0x00000000 groupKey=com.oplus.olc.notification vis=PRIVATE)), StatusBarNotification(pkg=com.oplus.olc user=UserHandle{0} id=2 tag=null key=0|com.oplus.olc|2|null|1000: Notification(channel=SCREENRECORD_CHANNEL shortcut=null contentView=null vibrate=null sound=null defaults=0 flags=ONGOING_EVENT|NO_CLEAR|FOREGROUND_SERVICE|CAN_COLORIZE color=0x00000000 groupKey=com.oplus.olc.notification vis=PRIVATE))] 08-06 15:26:25.542237 6191 6191 I OplusPageIndicator[u0]: onGlobalLayout isFolderHost = false, disableUpdatePivot = falsemPressFeedbackHelper.isPressingAnim() false 08-06 15:26:25.542255 6191 6191 I OplusPageIndicator[u0]: updatePivot() getExtraIndicatorPivotY = 0 08-06 15:26:25.542343 6191 6191 D OplusPageIndicator[u0]: setPivotY -1133.0; caller = com.android.la 解释
08-13
E FATAL EXCEPTION: Timer-0 Process: com.bw.dome1231, PID: 9780 android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:7760) at android.view.ViewRootImpl.requestLayout(ViewRootImpl.java:1225) at android.view.View.requestLayout(View.java:23107) at android.view.View.requestLayout(View.java:23107) at android.view.View.requestLayout(View.java:23107) at android.view.View.requestLayout(View.java:23107) at android.view.View.requestLayout(View.java:23107) at android.view.View.requestLayout(View.java:23107) at android.view.View.requestLayout(View.java:23107) at android.view.View.requestLayout(View.java:23107) at androidx.recyclerview.widget.RecyclerView.requestLayout(RecyclerView.java:4412) at android.view.View.requestLayout(View.java:23107) at android.view.View.requestLayout(View.java:23107) at android.view.View.requestLayout(View.java:23107) at android.widget.ImageView.setImageDrawable(ImageView.java:571) at androidx.appcompat.widget.AppCompatImageView.setImageDrawable(AppCompatImageView.java:112) at androidx.appcompat.widget.AppCompatImageHelper.setImageResource(AppCompatImageHelper.java:95) at androidx.appcompat.widget.AppCompatImageView.setImageResource(AppCompatImageView.java:102) at com.bw.dome1231.fragment.OnlineFragment$1.run(OnlineFragment.java:55) at java.util.TimerThread.mainLoop(Timer.java:562) at java.util.TimerThread.run(Timer.java:512) 2025-12-31 16:06:58.684 9780-9805 EGL_emulation com.bw.dome1231 E tid 9805: eglSurfaceAttrib(1493): error 0x3009 (EGL_BAD_MATCH)
01-01
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值