Understanding touch system

79 views Asked by At

I have started learning the android touch system and have gone through this video on youtube. Though I did understand a lot of things but when I started referring the source code of the following code on github.com for SwipeListView, I started having doubts about the flow of execution of the Touch System. The code tries to create a custom Listview with views that are swipeable. So, I have the following doubts that I would appreciate if someone could clarify.

In the custom ListView in the init(), we set up a class as a touchListener, but in the onInterceptTouchEvent(), we have to explicitly call the onTouch() Method. I tried to log the Motion events called for different actions but am not able to understand the flow of execution. I would really appreciate if someone could explain the functionalities that are implemented and the return values that are returned. I am having a tough time understanding the way it is implemented.

I would also appreciate if someone could direct me to a post/blog/example which will help me understand the Touch System that can be implemented when writing a custom view implemented from scratch like the above where a list view is overridden.

0

There are 0 answers