コード例 #1
0
  @Override
  public void onAvotrClick(PostMessage postMsg, int position) {

    Intent intent = new Intent(getActivity(), MeActivity.class);
    intent.putExtra("userName", postMsg.getPostMsgUser().getNickName());
    intent.putExtra("userId", postMsg.getPostMsgUser().getUserId());
    intent.putExtra("userAvatar", postMsg.getPostMsgUser().getAvatar());

    intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
    startActivity(intent);
  }
コード例 #2
0
  @Override
  public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
    if (Utils.isNetworkConnected(getActivity())) {
      Intent intent = new Intent(getActivity(), PostDetailActivity.class);
      intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
      if (position < 0) {
        return;
      }

      if (view == footerView) {
        return;
      }

      PostMessage post = (PostMessage) parent.getAdapter().getItem(position);
      intent.putExtra("postId", post.getPostId());
      intent.putExtra("requestFrom", getPageName());
      intent.putExtra("l1DestFloor", post.getPostMsgFloorNum());
      startActivity(intent);
    } else {
      ToastTools.toast(getActivity(), "请先连接网络喵~", Toast.LENGTH_SHORT, true);
    }
  }