I am using Flipper as parent and Listview as child. My problem here is the flipping and clicking of item in listview. When I flip to next page (by dragging from right to left) I accidentally click a list Item.

**How will I disable the onClick of listview when I already made a gesture for flipping?**

Code:

Flipper Ontouch:

```
public boolean dispatchTouchEvent(MotionEvent touchevent) {
        super.dispatchTouchEvent(touchevent);
        switch (touchevent.getAction()) {
        case MotionEvent.ACTION_DOWN: {
        lastX = touchevent.getX();
        break;
    }
    case MotionEvent.ACTION_UP: {
        float currentX = touchevent.getX();
        if (lastX - 100 > currentX) {
            if (result_pageNum < max_pageNum) {
                result_pageNum++;
                if (vf.getDisplayedChild() == 0) {
                    listView[1].setClickable(false);
                    setListView(1);
                } else {
                    listView[0].setClickable(false);
                    setListView(0);
                }
                vf.setInAnimation(this, R.anim.in_from_right);
                vf.setOutAnimation(this, R.anim.out_to_left);
                vf.showNext();
            }
        } else if (lastX + 100 < currentX) {
            if (result_pageNum > 0) {
                result_pageNum--;
                if (vf.getDisplayedChild() == 1) {
                    listView[0].setClickable(false);
                    setListView(0);
                } else {
                    listView[1].setClickable(false);
                    setListView(1);
                }
                vf.setInAnimation(this, R.anim.in_from_left);
                vf.setOutAnimation(this, R.anim.out_to_right);
                vf.showPrevious();
            }
        }
        break;
    }
    }
    return false;
}

```

listView onClick:

```
private void listView_onClick() {
    for (int i = 0; i < listView.length; i++) {
        listView[i].setOnItemClickListener(new OnItemClickListener() {
            public void onItemClick(AdapterView<?> parent, View view,
                    int position, long id) {
                // When clicked, show a toast with the TextView text

Toast.maketext(this,"Working!",Toast.LENGTH_LONG).show();

            }
        });
    }

}

```