Navigation through the listView should occur using the navigation keys, that is, there is no touch screen in the device. It is necessary that the first item is automatically highlighted after the application starts, I write listView.setSelection(0);
, but at startup touch mode is enabled. Checked listview.isInTouchMode()
returns true
. Further, if you press the keys, everything works as it should.
You can, of course, enable focus in touch mode, and call the same thing that happens when you select the first item. But these are crutches. How can I turn off touch mode in the listview? Or, alternatively, is it possible to call onItemSelected of the corresponding listener? If so, how?