-
-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add navigation interface to make slide navigation consistent between …
- Loading branch information
1 parent
dbae320
commit 8757d41
Showing
4 changed files
with
147 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
library/src/main/java/com/heinrichreimersoftware/materialintro/app/IntroNavigation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package com.heinrichreimersoftware.materialintro.app; | ||
|
||
interface IntroNavigation { | ||
/** | ||
* Tries to go to the given position and will stop when {@code canGoForward()} or | ||
* {@code canGoBackward()} returns {@code false}. | ||
* | ||
* @param position The position the pager should go to. | ||
* @return {@code true} if the pager was able to go the complete way to the given position, | ||
* {@code false} otherwise. | ||
*/ | ||
boolean goToSlide(int position); | ||
|
||
/** | ||
* Tries to go to the next slide if {@code canGoForward()} returns {@code true}. | ||
* | ||
* @return {@code true} if the pager was able to go to the next slide, {@code false} otherwise. | ||
*/ | ||
boolean nextSlide(); | ||
|
||
|
||
/** | ||
* Tries to go to the previous slide if {@code canGoForward()} returns {@code true}. | ||
* | ||
* @return {@code true} if the pager was able to go to the previous slide, {@code false} | ||
* otherwise. | ||
*/ | ||
boolean previousSlide(); | ||
|
||
/** | ||
* Tries to go to the last slide and will stop when {@code canGoForward()} returns | ||
* {@code false}. | ||
* | ||
* @return {@code true} if the pager was able to go the complete way to the last slide, | ||
* {@code false} otherwise. | ||
*/ | ||
boolean goToLastSlide(); | ||
|
||
/** | ||
* Tries to go to the first slide and will stop when {@code canGoBackward()} returns | ||
* {@code false}. | ||
* | ||
* @return {@code true} if the pager was able to go the complete way to the first slide, | ||
* {@code false} otherwise. | ||
*/ | ||
boolean goToFirstSlide(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters