In my project I have an Activity that loads a list of news. When the list is loaded, this Activity is populated with the information of the first item on the list:
But since this loads all the news from the server, I want the user to be able to swap the news with his finger. For example: we start with news[0] and user swipe left, the content change to news[1]. The user swipe left again and the content changes to news[2] and so on... if the user swipes right, then it return to the previous news (news[1]). The header should not have a swipe movement, only the main frame (image and body should change):
What would be the best aproach for this behavior? I was thinking about using a TabLayout with ViewPager but I'm not sure if this is the correct way to do this. If I have something like 100 news this could be a overkill to load 100 fragments in the ViewPager right?
Does android have a better way to do this? How should I do this?