当前位置: 代码迷 >> Android >> Android中BaseAdapter的一部分点击事件
  详细解决方案

Android中BaseAdapter的一部分点击事件

热度:103   发布时间:2016-05-01 20:45:23.0
Android中BaseAdapter的部分点击事件
今天同事问了我一个关于ListView的问题,设置完ItemClickListener之后想要部分内容可以点击部分内容不可以点击,看了一下他使用的adapter是BaseAdapter,然后去查找了一下SDK,其中有一个函数
boolean isEnabled(int position)
Returns true if the item at the specified position is not a separator.

public boolean isEnabled (int position)

Since: API Level 1
Returns true if the item at the specified position is not a separator. (A separator is a non-selectable, non-clickable item). The result is unspecified if position is invalid. An ArrayIndexOutOfBoundsException should be thrown in that case for fast failure.
Parameters

position Index of the item
Returns

True if the item is not a separator

问题顺利解决
  相关解决方案