How set ListView not clickable

Just override isEnabled(position) in your adapter and return false

@Override
public boolean isEnabled(int position) {
    return false;
}

Here it is, following the comment:

One way to do so is: ListView.setOnClickListener(null); OR

You can add android:focusable="false" android:focusableInTouchMode="false" OR

another way in the layout android:listSelector="@android:color/transparent"

Cheers.


android:listSelector="@android:color/transparent"

it changes the on-clicked color to same as when it is not clicked! so it appears as if it is plain text...it's a work around.


override the below method. Return false to say all the items are not clickable.

 @override
  public boolean areAllItemsEnabled() {
    return false;
  }

And override below method to return which item is not clickable

public boolean isEnabled(int position) {
    if(position == your_item_pos) {
          return false;
    }
    return true;
}