コード例 #1
0
  @Override
  protected void onListItemClick(ListView l, View v, int position, long id) {

    if (position <= 1) {

      String entity = null;

      switch (position) {
        case 0:
          entity = "http://getsocialize.com";
          break;
      }

      CommentUtils.showCommentView(
          this,
          Entity.newInstance(entity, "Socialize"),
          new OnCommentViewActionListener() {

            @Override
            public void onError(SocializeException error) {
              error.printStackTrace();
            }

            @Override
            public void onRender(CommentListView view) {}

            @Override
            public void onReload(CommentListView view) {}

            @Override
            public void onPostComment(Comment comment) {}

            @Override
            public void onCreate(CommentListView view) {}

            @Override
            public void onCommentList(
                CommentListView view, List<Comment> comments, int start, int end) {}

            @Override
            public void onBeforeSetComment(Comment comment, CommentListItem item) {}

            @Override
            public void onAfterSetComment(Comment comment, CommentListItem item) {}
          });
    } else {
      Class<?> activityClass = activities[position - 1];
      if (activityClass != null) {
        Intent intent = new Intent(this, activityClass);
        startActivity(intent);
      }
    }
  }