I have list view with. User can open dialog on full screen Window.FEATURE_NO_TITLE)
that overlay this list view. When user touches the background of this dialog it closes.
I need to delegate this touch event to list view. I mean, after MotionEvent.ACTION_DOWN
on bg i need to close dialog (it works fine), and start MotionEvent.ACTION_DOWN
on list view.
I tried something like this:
((LinearLayout) findViewById(R.id.dialog_bg)).setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
MotionEvent motionEvent = MotionEvent.obtain(event);
activity.findViewById(R.id.fr_projects_list).dispatchTouchEvent(motionEvent);
close();
break;
default:
break;
}
return false;
}
});
It starts ACTION_DOWN
on list view. But thats all. ACTION_MOVE and others doesn't work =/