操作多个XML里的控件

首先使用   LayoutInflater mLi = LayoutInflater.from(this);           view2 = mLi.inflate(R.layout.showfoodinfo_chefteach, null);加载layout下面的需要操作的XML文件,然后

showfoodinfo_chefteach_tv1 = (TextView) view2
.findViewById(R.id.showfoodinfo_chefteach_tv1);
showfoodinfo_chefteach_tv1.setText("测试");

就直接可以操作那个XML文件里的对应的控件了



posted on 2013-08-03 10:07  just__chao  阅读(185)  评论(0编辑  收藏  举报

导航