https://ask.csdn.net/questions/166840
如果某布局文件A,include了布局文件B,A中某控件和B中某控件id一样时,通过布局文件A得到的id对应的控件是排在前面的控件。除非给布局文件B一个id,然后先通过id找到该布局文件
View layout = getLayoutInflater().inflate(R.layout.head, null);
RelativeLayout head= (RelativeLayout)layout.findViewById(R.id.index_linear_foot);
//设置背景图片
head.setBackgroundResource(R.drawable.head);