ViewConfiguration.getScaledTouchSlop () 返回值意义

博客提到在滑动操作中,手的移动距离需大于返回的距离值,控件才会开始移动,这涉及到滑动交互的距离判定条件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

表示滑动的时候,手的移动要大于这个返回的距离值才开始移动控件。
2025-07-06 16:25:10.644 936-936 ViewConfiguration com.android.launcher3 E Tried to access UI constants from a non-visual Context:com.android.quickstep.inputconsumers.OtherActivityInputConsumer@d0ca171UI constants, such as display metrics or window metrics, must be accessed from Activity or other visual Context. Use an Activity or a Context created with Context#createWindowContext(int, Bundle), which are adjusted to the configuration and visual bounds of an area on screen java.lang.IllegalArgumentException: Tried to access UI constants from a non-visual Context:com.android.quickstep.inputconsumers.OtherActivityInputConsumer@d0ca171 at android.view.ViewConfiguration.get(ViewConfiguration.java:510) at com.android.quickstep.inputconsumers.OtherActivityInputConsumer.<init>(OtherActivityInputConsumer.java:163) at com.android.quickstep.TouchInteractionService.createOtherActivityInputConsumer(TouchInteractionService.java:709) at com.android.quickstep.TouchInteractionService.newBaseConsumer(TouchInteractionService.java:692) at com.android.quickstep.TouchInteractionService.newConsumer(TouchInteractionService.java:587) at com.android.quickstep.TouchInteractionService.onInputEvent(TouchInteractionService.java:493) at com.android.quickstep.TouchInteractionService.lambda$5N8OpQhfWV7_tkhenf8Ys3ECXWs(Unknown Source:0) at com.android.quickstep.-$$Lambda$TouchInteractionService$5N8OpQhfWV7_tkhenf8Ys3ECXWs.onInputEvent(Unknown Source:2) at com.android.systemui.shared.system.InputChannelCompat$InputEventReceiver$1.onInputEvent(InputChannelCompat.java:81) at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:220) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:335) at android.os.Looper.loop(Looper.java:183) at android.app.ActivityThread.main(ActivityThread.java:7660) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
最新发布
07-07
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值