Recently in one of my project we have to create Horizontal Carousel View for banner images. User can swipe left or right to view other banners and there will be bottom page indicators. See the below image of final output.
In android view page we will have different fragments for each page so we will need layout XML for fragment. Add new XML file myfragment_layout.xml in your layout and add following code to it.