How set ListView not clickable How set ListView not clickable android android

How set ListView not clickable


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.


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

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


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;}