I am relatively new to android.
I have to design an Activity that has a 2 * 4 grid.
Each grid item will have an image view and a text view
On swiping left or right the user will move to a different page but the UI will remain the same.
Just the data set to the grid will change.
I want the number of pages to be configurable.
Also I want to reuse the same xml file for UI instead of creating two new xml files for the other 2 pages.
Which is the best possible way and the most efficient way to implement this and any examples on how to do this ? Any help will be appreciated. Thank you
I think you can use ViewPager
with Fragment
. You can see in this example https://developer.android.com/training/animation/screen-slide.html