gpt4 book ai didi

android - 什么是触摸模式,为什么它对 ActivityTestRule 类很重要?

转载 作者:IT老高 更新时间:2023-10-28 23:13:11 27 4
gpt4 key购买 nike

ActivityTestRule类在其构造函数中接受 initialTouchMode 参数。类(class)引用(或在线任何地方)中没有解释这一点,除非如下:

initialTouchMode - true if the Activity should be placed into "touch mode" when started

“触摸模式”究竟是什么意思?在 ActivityTestRule 中设置 initialTouchMode 有什么影响? true 还是 false? (我看到这个参数的默认值是false)。

最佳答案

触摸模式会影响 View 焦点和选择的工作方式。

The touch mode is a state of the view hierarchy that depends solely on the user interaction with the phone. By itself, the touch mode is something very easy to understand as it simply indicates whether the last user interaction was performed with the touch screen.

...

In touch mode, there is no focus and no selection.

http://android-developers.blogspot.com/2008/12/touch-mode.html

关于android - 什么是触摸模式,为什么它对 ActivityTestRule 类很重要?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35970006/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com