I've designed one application. It lists all the installed application's on device or emulator which is you're using.See this. It's my result from emulator. In that List the that i can checked the item when i select checkbox only. But, i can't select any item by pressing that item. Am design this program extends by Activity only. And, also am using Adapter for listing that. How can i select the item by pressin开发者_StackOverflowg item. How can i done this? Advance thanks.
Because your list view contains a checkbox, android is letting the user interact with that view rather than "selecting the item". In other words, the click is being handled by the view which contains the checkbox rather than the listview.
You could try handling the touch event in the view and then calling the parent activity and asking it to select the item.
Set OnClickMethod to your selected layout then change background of selected layout.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:onClick="ChangeBackGround">
instead your listview
精彩评论