コード例 #1
0
  /** 设置帖子详情 */
  private void setFavoriteNoteDetailView() {
    if (noteDetail == null) return;

    noteDetailTitleView.setText(noteDetail.getContentTitle());
    noteDetailContentView.setText(noteDetail.getContentTextData());
    noteDetailNameView.setText(noteDetail.getCreateUsername());
    noteDetailDateView.setText(noteDetail.getCreateDate());

    if (noteDetail.getIsCollected() == 0) {
      noteDetaiFavoriteView.setImageResource(R.drawable.fd_restaurant_collection_disable);
    } else if (noteDetail.getIsCollected() == 1) {
      noteDetaiFavoriteView.setImageResource(R.drawable.fd_restaurant_collection_enable);
    }

    //		noteForwardCountView.setText("转发("+noteDetail.getCollectCount()+")");
    noteFavoriteCountView.setText("收藏(" + noteDetail.getCollectCount() + ")");
    List<FDImage> noteDetailImages = noteDetail.getPicList();
    if (noteDetailImages != null && noteDetailImages.size() > 0) {
      noteDetailImageView.setVisibility(View.VISIBLE);
      FDHorizontalListViewAdapter photoAdapter =
          new FDHorizontalListViewAdapter(this, noteDetailImages, false);
      noteDetailImageView.setAdapter(photoAdapter);
    } else {
      noteDetailImageView.setVisibility(View.GONE);
    }
  }
コード例 #2
0
  /**
   * 微信朋友圈分享参数
   *
   * <p>WechatMoment share params
   */
  private WechatMoments.ShareParams getWechatMomentsShareParams() {
    if (noteDetail == null) return null;
    WechatMoments.ShareParams sp = new WechatMoments.ShareParams();
    // 任何分享类型都需要title和text
    sp.title = noteDetail.getContentTitle();
    sp.text = noteDetail.getContentTextData();
    sp.shareType = Platform.SHARE_TEXT;

    return sp;
  }