I would like to implement the navigation between items of a recyclerview using the swipe gesture, i.e the gmail app. That way user doesn't have to go back to the list an click to the next item to get to its details view. I can't find a tutorial on how to achieve this.
Asked
Active
Viewed 562 times
3
-
If what you want is to create a navigation drawer there are plenty of resources online to do that. – Feb 14 '17 at 11:42
-
Hi @UtsavShrestha. What I want is not a navigation drawer. I can hardly believe that the navigation drawer can do what I'm looking for. – DeKekem Feb 14 '17 at 12:29
2 Answers
1
From what you are saying the best choice you have is a ViewPager instead of RecyclerView. Maybe you can achieve the effect with RecyclerView, but it will be harder and its purpose is different. The purpose of a ViewPager is what you seek if you want to swipe through like pages.
Looking at the gmail app, google have implemented their own swipe left/right effect for the recycler's views. You can find libraries that can achieve this. It has actually already been talked about it here so just take a look: StackOverflow Swipe to Delete Gmail RecyclerView

Community
- 1
- 1

T.Dimitrov
- 157
- 2
- 7
-
Hi @T.Dimitrov. I'm not talking about swipe do delete or archive, but swipe to go from one email message to another as described [here](https://developer.android.com/design/patterns/swipe-views.html) – DeKekem Feb 15 '17 at 07:29
-
http://stackoverflow.com/questions/18413309/how-to-implement-a-viewpager-with-different-fragments-layouts this will work perfectly, every fragment is your next email. You will be able to swipe them. You should manage it programatically after a click over the recycle from the previous sreen from where to start. Hope it helps – T.Dimitrov Feb 15 '17 at 08:34