Code example for AdapterView.OnItemClickListener

Methods: onItemClick

0
    	if (enabled)
    	{ 
    		if (secondaryOnClickListener != null)
    			secondaryOnClickListener.onClick(view);
    		if (onItemClickListener != null && getLastIndex() != -1)
    			onItemClickListener.onItemClick(null, getChildAt(getLastIndex()), getLastIndex(), getLastIndex() / colCount);
    	} 
    } 
    public boolean onLongClick(View view)
    { 
    	if (!enabled)
    		return false; 
        int index = getLastIndex();
        if (index != -1)
        { 
            dragged = index;
            animateDragged(); 
            return true; 
        } 
        return false; 
    }