Add ViewPagerIndicator to Android Studio

UPDATE Based on the answer given by Jürgen ‘Kashban’ Wahlmann, it is now possible to add ViewPagerIndicator via gradle: Top Level Build.gradle: buildscript { repositories { maven { url “http://dl.bintray.com/populov/maven” } mavenCentral() } } allprojects { repositories { maven { url “http://dl.bintray.com/populov/maven” } mavenCentral() } } App’s build.gradle: compile ‘com.viewpagerindicator:library:2.4.1@aar’ Also, based on the answer … Read more

Android ViewPager with bottom dots

No need for that much code. You can do all this stuff without coding so much by using only viewpager with tablayout. Your main Layout: <RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:app=”http://schemas.android.com/apk/res-auto” android:layout_width=”match_parent” android:layout_height=”wrap_content”> <android.support.v4.view.ViewPager android:id=”@+id/pager” android:layout_width=”match_parent” android:layout_height=”match_parent”> </android.support.v4.view.ViewPager> <android.support.design.widget.TabLayout android:id=”@+id/tabDots” android:layout_alignParentBottom=”true” android:layout_width=”match_parent” android:layout_height=”wrap_content” app:tabBackground=”@drawable/tab_selector” app:tabGravity=”center” app:tabIndicatorHeight=”0dp”/> </RelativeLayout> Hook up your UI elements inactivity or fragment as follows: Java … Read more