コード例 #1
0
  public BindedDisplayList<Message> getMessageDisplayList(final Peer peer) {
    if (!messagesLists.containsKey(peer)) {
      BindedDisplayList<Message> list =
          (BindedDisplayList<Message>) modules.getDisplayListsModule().getMessagesSharedList(peer);
      list.setBindHook(
          new BindedDisplayList.BindHook<Message>() {
            @Override
            public void onScrolledToEnd() {
              modules.getMessagesModule().loadMoreHistory(peer);
            }

            @Override
            public void onItemTouched(Message item) {}
          });
      messagesLists.put(peer, list);
    }

    return messagesLists.get(peer);
  }
コード例 #2
0
  public BindedDisplayList<Dialog> getDialogsDisplayList() {
    if (dialogList == null) {
      dialogList =
          (BindedDisplayList<Dialog>) modules.getDisplayListsModule().getDialogsSharedList();
      dialogList.setBindHook(
          new BindedDisplayList.BindHook<Dialog>() {
            @Override
            public void onScrolledToEnd() {
              modules.getMessagesModule().loadMoreDialogs();
            }

            @Override
            public void onItemTouched(Dialog item) {}
          });
    }

    return dialogList;
  }