Search in sources :

Example 1 with FriendListScreen

use of com.example.mortar.screen.FriendListScreen in project mortar by square.

the class MortarDemoActivity method dispatch.

@Override
public void dispatch(Flow.Traversal traversal, Flow.TraversalCallback callback) {
    Path newScreen = traversal.destination.top();
    String title = newScreen.getClass().getSimpleName();
    ActionBarOwner.MenuAction menu = new ActionBarOwner.MenuAction("Friends", new Action0() {

        @Override
        public void call() {
            Flow.get(MortarDemoActivity.this).set(new FriendListScreen());
        }
    });
    actionBarOwner.setConfig(new ActionBarOwner.Config(false, !(newScreen instanceof ChatListScreen), title, menu));
    container.dispatch(traversal, callback);
}
Also used : Path(flow.path.Path) Action0(rx.functions.Action0) FriendListScreen(com.example.mortar.screen.FriendListScreen) ChatListScreen(com.example.mortar.screen.ChatListScreen) ActionBarOwner(com.example.mortar.android.ActionBarOwner)

Aggregations

ActionBarOwner (com.example.mortar.android.ActionBarOwner)1 ChatListScreen (com.example.mortar.screen.ChatListScreen)1 FriendListScreen (com.example.mortar.screen.FriendListScreen)1 Path (flow.path.Path)1 Action0 (rx.functions.Action0)1