Try code below to detect touch events.
mView.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
//show dialog here
return false;
}
});
To show dialog use Activity method showDialog(int). You have to implement onCreateDialog(). See documentation for details.