public class XWalkNavigationHistory
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
XWalkNavigationHistory.Direction
The direction for web page navigation.
|
Constructor and Description |
---|
XWalkNavigationHistory(java.lang.Object bridge) |
Modifier and Type | Method and Description |
---|---|
boolean |
canGoBack()
Test whether XWalkView can go back.
|
boolean |
canGoForward()
Test whether XWalkView can go forward.
|
void |
clear()
Clear all history owned by this XWalkView.
|
int |
getCurrentIndex()
Get the index for current navigation item.
|
XWalkNavigationItem |
getCurrentItem()
Get the current item which XWalkView displays.
|
XWalkNavigationItem |
getItemAt(int index)
Get a specific item given by index.
|
boolean |
hasItemAt(int index)
Test whether there is an item at a specific index.
|
void |
navigate(XWalkNavigationHistory.Direction direction,
int steps)
Navigates to the specified step from the current navigation item.
|
int |
size()
Total size of navigation history for the XWalkView.
|
public int size()
public boolean hasItemAt(int index)
index
- the given index.public XWalkNavigationItem getItemAt(int index)
index
- the given index.public XWalkNavigationItem getCurrentItem()
public boolean canGoBack()
public boolean canGoForward()
public void navigate(XWalkNavigationHistory.Direction direction, int steps)
direction
- the direction of navigation.steps
- go back or foward with a given steps.public int getCurrentIndex()
public void clear()