I have 2 fragments per screen in FragmentPagerAdapter. Currently, I am having 4 fragments at all, 2 per screen and one swipe move only to next fragment, making it look like 3 screens. Therefore, I need to have 3 indicator dots. Obviously, I have to do setCount(int count), as library by default will use number of fragments in adapter.
Although, it is impossible to have 3 of them due to check in setCount(int count).
public void setCount(int count) {
if (this.count != count) {
...
Where, int DEFAULT_CIRCLES_COUNT = 3.
In summary, this doesn't allow to set number of indicator dots as 3, and therefore, to forbid library to automatically set number of indicator dots, based on ViewPager, if number of fragments in ViewPager is different.
I have 2 fragments per screen in FragmentPagerAdapter. Currently, I am having 4 fragments at all, 2 per screen and one swipe move only to next fragment, making it look like 3 screens. Therefore, I need to have 3 indicator dots. Obviously, I have to do
setCount(int count)
, as library by default will use number of fragments in adapter. Although, it is impossible to have 3 of them due to check insetCount(int count)
.In
initCountAttribute
, there is next code:Where,
int DEFAULT_CIRCLES_COUNT = 3
. In summary, this doesn't allow to set number of indicator dots as 3, and therefore, to forbid library to automatically set number of indicator dots, based on ViewPager, if number of fragments in ViewPager is different.