How do you create an Android View Pager with a dots indicator?
问题 Probably many of you (as me), have problem with creating ViewPager with bottom dots, like this: How do you create such an Android ViewPager? 回答1: All we need are: ViewPager, TabLayout and 2 drawables for selected and default dots. Firstly, we have to add TabLayout to our screen layout, and connect it with ViewPager . We can do this in two ways: Nested TabLayout in ViewPager <android.support.v4.view.ViewPager android:id="@+id/photos_viewpager" android:layout_width="match_parent" android:layout