Example usage for android.widget AdapterView performItemClick

List of usage examples for android.widget AdapterView performItemClick

Introduction

In this page you can find the example usage for android.widget AdapterView performItemClick.

Prototype

public boolean performItemClick(View view, int position, long id) 

Source Link

Document

Call the OnItemClickListener, if it is defined.

Usage

From source file:com.grottworkshop.gwsswipelayout.SwipeLayout.java

private void performAdapterViewItemClick(MotionEvent e) {
    ViewParent t = getParent();// ww  w  . j a  v a  2 s  .  co m
    while (t != null) {
        if (t instanceof AdapterView) {
            AdapterView view = (AdapterView) t;
            int p = view.getPositionForView(SwipeLayout.this);
            if (p != AdapterView.INVALID_POSITION
                    && view.performItemClick(view.getChildAt(p), p, view.getAdapter().getItemId(p)))
                return;
        } else {
            if (t instanceof View && ((View) t).performClick())
                return;
        }
        t = t.getParent();
    }
}