}
public void init() {
ToolbarView group = toolbarUi.addGroup();
new ToolbarButtonViewBuilder().setText("Recent").applyTo(
group.addClickButton(), new ToolbarClickButton.Listener() {
@Override
public void onClicked() {
focusFrame.focus(blipSelector.selectMostRecentlyModified());
}
});
new ToolbarButtonViewBuilder().setText("Next Unread").applyTo(
group.addClickButton(), new ToolbarClickButton.Listener() {
@Override
public void onClicked() {
BlipView focusedBlip = focusFrame.getFocusedBlip();
if (focusedBlip == null) {
focusedBlip = blipSelector.getOrFindRootBlip();
boolean isRead = reader.isRead(focusedBlip);
focusFrame.focus(focusedBlip);
if (isRead) {
focusFrame.focusNext();
}
} else {
focusFrame.focusNext();
}
}
});
new ToolbarButtonViewBuilder().setText("Previous").applyTo(
group.addClickButton(), new ToolbarClickButton.Listener() {
@Override
public void onClicked() {
focusFrame.moveUp();
}
});
new ToolbarButtonViewBuilder().setText("Next").applyTo(
group.addClickButton(), new ToolbarClickButton.Listener() {
@Override
public void onClicked() {
focusFrame.moveDown();
}
});
// Fake group
group = toolbarUi.addGroup();
new ToolbarButtonViewBuilder().setText("").applyTo(group.addClickButton(), null);
}