Reputation: 125
I am A beginner at android. I have created an app which loads news from JSON to recycler view. I want to open an activity when the user swipes from left to right. I tried different methods but it doesn't work for me. Please help.
Upvotes: 2
Views: 902
Reputation: 483
The better option is to use one Activity & other Fragments. And then use Viewpager for swipe between fragments. Follow below link:
https://developer.android.com/training/animation/screen-slide
Upvotes: 0
Reputation: 33
You have to create an activity first and put a view pager in it and switch between fragments : ( its better to use fragments at this kind of situations, u can swipe between ur fragments by using android view pager )
Here is a great link that gonna help you :
Have a good day
Upvotes: 1