質問

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