一个布局里面引用另一个布局的控件

  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);
原文地址:https://www.cnblogs.com/lucky-star-star/p/3722786.html