There is actually a way to know the number of home screens. The 'onOffsetsChanged' call provides to arguments for that porpouse: float xOffset and float xOffsetStep.
xOffset goes from 0 to 1 and xOffsetStep represents the step size for each home scree. So if you configure your home screen with 6 'desktops' xOffsetStep would be 0.2.
So the final way to check the number of screens must be done in that call (by default it sould be always 1) and then: (1/xOffsetStep) + 1.
Hope it helps!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…