In my Android application I have used a Listview and in each element in the listview have two checkboxes. The problem is, the user can not select those checkboxes using the device trackball. It highlights the entire element when move to select the checkbox with the device trackball and do not let the user to select one of the checkboxes that resides in an element in the list view.

If touch screen moving the finger and click the checkbox is posible. But how can I Let it to be done using the device trackball to move and click the required checkbox.

If someone can help me to achieve this its a great help.....Thanks in Advance...!!!

Edits... Or is this imposible to do so, to work with trackball?????

有帮助吗?

解决方案

Did you call listView.setItemsCanFocus(true)?

其他提示

I have successfully implemented your requirement by setting focusable to false.

<CheckBox
            android:id="@+id/checkBox"
            android:layout_width="wrap_content"
            android:layout_height="fill_parent"
            android:layout_gravity="center_vertical"
            android:focusable="false"
            />

Try it.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top