专题答案列表显示发布时间

This commit is contained in:
chenjuntao
2019-01-26 11:32:20 +08:00
parent 13ac4658d9
commit b7db66e90b
2 changed files with 19 additions and 0 deletions

View File

@ -8,6 +8,7 @@ import android.view.ViewGroup;
import com.gh.base.OnListClickListener;
import com.gh.common.constant.ItemViewType;
import com.gh.common.util.NewsUtils;
import com.gh.gamecenter.PersonalHomeActivity;
import com.gh.gamecenter.R;
import com.gh.gamecenter.adapter.viewholder.FooterViewHolder;
@ -121,6 +122,11 @@ public class AskSubjectAdapter extends ListAdapter<AnswerEntity> {
mContext.startActivity(ArticleDetailActivity.getIntent(mContext, new CommunityEntity(entity.getCommunityId(), ""), entity.getId(), mEntrance, path));
}
});
if (entity.getTime() != null && entity.getTime() != 0) {
binding.endDesc.setText(NewsUtils.getFormattedTime(entity.getTime()));
}
holder.itemView.setOnClickListener(v -> {
if ("answer".equals(entity.getType())) {
mContext.startActivity(AnswerDetailActivity.getIntent(mContext, entity.getId(), mEntrance, path));