diff --git a/README.md b/README.md index 4c30cc6..943bbca 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,8 @@ indicator.attachToPager(pager, new ViewPagerAttacher()); | spi_dotMinimumSize | The minimum dot size for the corner dots. This size is lower or equal to ```spi_dotSize``` and greater or equal to the internal calculation for the corner dots. | Internal calculation based on ```spi_dotSize```, ```spi_dotSelectedSize``` and ```spi_dotSpacing``` | | spi_orientation | Visible orientation of the dots | LinearLayoutManager.HORIZONTAL | | spi_firstDotDrawable | Custom drawable of the first dot, color is tinted and size is changed like standard dots. If first dot is also the last one then this value is taken into account. | `null` | -| spi_lastDotDrawable | Custom drawable of the last dot, color is tinted and size is changed like standard dots. | `null` | +| spi_lastDotDrawable | Custom drawable of the last dot, color is tinted and size is changed like standard dots. | `null` | +| spi_selectedDotDrawable | Custom drawable of the selected dot, color is tinted and size is changed like standard dots. | `null` | ## TODO 1. Some extreme customizations may work incorrect. diff --git a/demo/src/main/res/drawable/baseline_play_arrow_24.xml b/demo/src/main/res/drawable/baseline_play_arrow_24.xml new file mode 100644 index 0000000..e3fd2e9 --- /dev/null +++ b/demo/src/main/res/drawable/baseline_play_arrow_24.xml @@ -0,0 +1,5 @@ + + + diff --git a/demo/src/main/res/layout/activity_main.xml b/demo/src/main/res/layout/activity_main.xml index 21fb6cb..f0ab6cb 100644 --- a/demo/src/main/res/layout/activity_main.xml +++ b/demo/src/main/res/layout/activity_main.xml @@ -58,7 +58,8 @@ app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toBottomOf="@id/pager_title2" app:spi_dotColor="@color/dotNormal" - app:spi_dotSelectedColor="@color/dotHighlight" /> + app:spi_dotSelectedColor="@color/dotHighlight" + app:spi_selectedDotDrawable="@drawable/baseline_play_arrow_24"/> = Build.VERSION_CODES.LOLLIPOP) { dotDrawable.setTint(paint.getColor()); diff --git a/scrollingpagerindicator/src/main/res/values/attrs.xml b/scrollingpagerindicator/src/main/res/values/attrs.xml index 38e55cb..ebcd339 100644 --- a/scrollingpagerindicator/src/main/res/values/attrs.xml +++ b/scrollingpagerindicator/src/main/res/values/attrs.xml @@ -19,5 +19,6 @@ +