diff --git a/app/src/main/java/com/avontell/pagerindicatorbinderexample/MainActivity.java b/app/src/main/java/com/avontell/pagerindicatorbinderexample/MainActivity.java index cb44c0d..f4211c7 100644 --- a/app/src/main/java/com/avontell/pagerindicatorbinderexample/MainActivity.java +++ b/app/src/main/java/com/avontell/pagerindicatorbinderexample/MainActivity.java @@ -20,6 +20,7 @@ protected void onCreate(Bundle savedInstanceState) { setContentView(R.layout.activity_main); // EXAMPLE WITH BASIC DRAWABLE RESOURCES --------------------------------------------------- + // INCLUDES PROGRESS STYLE ----------------------------------------------------------------- // Grab the views ViewPager viewPager = (ViewPager) findViewById(R.id.view_pager_one); @@ -42,9 +43,24 @@ protected void onCreate(Bundle savedInstanceState) { indicatorContainer, selectedImage, unselectedImage); + // Set whether you want a progress style sample.setProgressStyle(true); + // EXAMPLE WITHOUT PROGRESS STYLE ---------------------------------------------------------- + + LinearLayout indicatorContainerDefault = (LinearLayout) findViewById(R.id.indicator_default); + + // Bind the view pager to the indicatorContainer + IndicatorBinder defaultInd = new IndicatorBinder().bind(this, + viewPager, + indicatorContainerDefault, + selectedImage, + unselectedImage); + + // Set whether you want a progress style + defaultInd.setProgressStyle(false); + // EXAMPLE WITH TABS ----------------------------------------------------------------------- // Create each tab TextView diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 1660d38..47aa5af 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -27,13 +27,25 @@ android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="30dp" - android:layout_below="@+id/view_pager_one" - android:layout_centerHorizontal="true" android:layout_marginTop="8dp" android:gravity="center_horizontal" - android:id="@+id/indicator_cont"> + android:id="@+id/indicator_cont" + android:layout_below="@+id/indicator_default" + android:layout_alignParentLeft="true" + android:layout_alignParentStart="true"> + +