Search code examples
androiduser-interfaceswipe

how to swipe image horizontally and do actions when (swipe)left in between in android


I am working on an app in which i want to swipe image horizontally and while making swiping to half it would do some action and it would regain its original position. this is to be done in both ways left and right swipe.for an example gmail app uses this, in which when we swipe it half and left it, it will regain its same position. but in similar terms i also want to make some function call. please suggest me what to do. for this i have tried something swipe features but i am not getting it properly.


Solution

  • If I got ur question correct, this is the solution

    http://developer.android.com/training/implementing-navigation/lateral.html#horizontal-paging