AdapterView的OnItemLongClickListener

来源:互联网 发布:java io read write 编辑:程序博客网 时间:2024/06/06 19:50
onItemLongClickadded in API level 1boolean onItemLongClick (AdapterView<?> parent,                 View view,                 int position,                 long id)Callback method to be invoked when an item in this view has been clicked and held. Implementers can call getItemAtPosition(position) if they need to access the data associated with the selected item.

意思是说如果返回值为true,那么这个长按事件就只会被自己“消费”,否则为false,在被自己消费之后还会被其他的事件(如onItemClick事件)消费。

0 0
原创粉丝点击