android.support.test.rule.ActivityTestRule类(参见
here)在其构造函数中使用一个initialTouchMode参数.这不是在类参考(或任何地方在线)中解释,除了如下:
initialTouchMode – true if the Activity should be placed into “touch mode” when started
“触摸模式”究竟是什么意思?在ActivityTestRule中将initialTouchMode设置为true还是false的含义是什么? (我看到这个参数的默认值为false).
解决方法
触摸模式影响视图焦点和选择的工作方式.
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