private void updateComments() { LinearLayout container = (LinearLayout) findViewById(R.id.activity_post_content); container.removeAllViews(); for (FBComment comment : mFBPost.getComments()) { View commentView = getLayoutInflater().inflate(R.layout.view_comment, null); TextView fromView = (TextView) commentView.findViewById(R.id.view_comment_from); fromView.setText(comment.getFromName()); TextView messageView = (TextView) commentView.findViewById(R.id.view_comment_message); messageView.setText(comment.getMessage()); TextView detailsView = (TextView) commentView.findViewById(R.id.view_comment_details); detailsView.setText(StringUtils.convertFBTime(comment.getCreatedTime())); container.addView(commentView); } }