LayoutInflater factorys = LayoutInflater.from(mContext); View textEntryView = factorys.inflate(R.layout.scroll_fresh, null); comment_layout = (LinearLayout)textEntryView.findViewById(R.id.LinearLayout_comment); comment_ediText = (EditText)comment_layout.findViewById(R.id.comment_edit); btnCommentSent = (Button)comment_layout.findViewById(R.id.sentComment); btnCommentSent.setOnClickListener(btnCommentSentListener); btnCommentCancle = (Button)comment_layout.findViewById(R.id.cancleComment); btnCommentCancle.setOnClickListener(btnCommentCancleListener);