@Override protected void deleteFeedComplete(FeedItem feedItem) { mFeedLvAdapter.getDataSource().remove(feedItem); mFeedLvAdapter.notifyDataSetChanged(); updateForwardCount(feedItem, -1); Log.d(getTag(), "### 删除feed"); }
/** 更新View的显示内容</br> */ private void updateViewContent() { // 被转发的feed的第一张图片url if (!TextUtils.isEmpty(mForwardImage)) { final String iconUrl = mForwardImage; Log.d("", "### 转发的图片 = " + iconUrl); mFeedIcon.setTag(iconUrl); mImageLoader.displayImage(iconUrl, mFeedIcon); } else if (TextUtils.isEmpty(getForwardFeedId())) { mFeedIcon.setImageBitmap(null); mFeedText.setText(""); } }
@Override protected void onCreate(Bundle arg0) { super.onCreate(arg0); Bundle extraBundle = getIntent().getExtras(); Object forwardItem = extraBundle.getParcelable(Constants.FEED); if (forwardItem != null && forwardItem instanceof FeedItem) { mForwardedFeeditem = (FeedItem) (forwardItem); parseForwardData(mForwardedFeeditem); } else { Log.e(TAG, "### 转发的数据出错"); } // 更新view的显示内容 updateViewContent(); isForwardFeed = true; // 转发 mPostPresenter.setForwardFeed(true); }
/** 准备feed数据</br> */ protected FeedItem prepareFeed() { FeedItem mNewFeed = new FeedItem(); mNewFeed.text = mEditText.getText().toString().trim(); mNewFeed.locationAddr = getLocationAddr(); mNewFeed.location = mLocation; // 移除添加图标 mImageSelectedAdapter.getDataSource().remove(Constants.ADD_IMAGE_PATH_SAMPLE); for (String url : mImageSelectedAdapter.getDataSource()) { // 图片地址 mNewFeed.imageUrls.add(new ImageItem("", "", url)); } // 话题 mNewFeed.topics.addAll(mSelecteTopics); // @好友 mNewFeed.atFriends.addAll(mSelectFriends); // 发表的用户 mNewFeed.creator = CommConfig.getConfig().loginedUser; mNewFeed.type = mNewFeed.creator.permisson == Permisson.ADMIN ? 1 : 0; Log.d(TAG, " @@@ my new Feed = " + mNewFeed); return mNewFeed; }
@Override protected void initLocationLayout() { Log.d(TAG, "### 转发不需要地理位置"); }