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

  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);

 

posted @ 2014-05-12 09:20  伟大的臭猪猪  阅读(260)  评论(0编辑  收藏  举报