开发者

Android ListView and Keyboard

开发者 https://www.devze.com 2023-02-09 04:25 出处:网络
I have created a custom ListView with custom rows. They work just fine when using the touchscreen; however, when I attempt to click on the items in the row with the keyboard D-Pad nothing ha开发者_如何

I have created a custom ListView with custom rows. They work just fine when using the touchscreen; however, when I attempt to click on the items in the row with the keyboard D-Pad nothing ha开发者_如何学Pythonppens. By that I mean my OnClickListener is not called. Does anyone know of any good references or tutorials on how to add keyboard support for new custom rows in a ListView?


Use setOnItemClickListener instead of setOnClickListener

Edit
Use an attribute like on your list item

android:focusable="false"
0

精彩评论

暂无评论...
验证码 换一张
取 消