Are you wanting to do this in a particular view (eg: a scrollview), or do you want to detect it at the activity level? I haven't tried this myself, but I imagine you would want to implement a gesture recognizer. If you search the forums for gesture recognizer, you should find some info...
- Colin.