How to add my own responsive gesture in android

Hi guys, im a student developing android applications, i wanted to add a custom gesture in my android app such that when matched on the screen, an event is triggered depending on how it was matched and also of which dependencies include the length and weight of the gesture recorded.
