将键盘导航模式设置为默认模式

Set keyboard navigation mode as default one

正如 android 开发者博客中所说:

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. For example, if you are using a G1 phone, selecting a widget with the trackball will take you out of touch mode; however, if you touch a button on the screen with your finger, you will enter touch mode. When the user is not in touch mode, we talk about the trackball mode, navigation mode or keyboard navigation...

但是android默认在触摸模式下启动。如何将设备切换到键盘导航模式,或将其设为默认模式?

我正在为特定设备开发应用程序,所以它已经 root,我也可以修改固件。

您可以使用 Instrumentation.setInTouchMode(boolean) 强制 Android 设备进入或退出触摸模式。

new Instrumentation().setInTouchMode(false);

运行 这作为 boot receiver 的一部分可能会实现您正在寻找的东西。