如何在一个Activity里使用另一个xml布局文件

LayoutInflater factorys = LayoutInflater.from(当前类.this);
final View textEntryView = factorys.inflate(R.layout.你要获取的另一个XML, null);
TextView y_type = (TextView) textEntryView.findViewById(R.id.控件ID);

原文地址:https://www.cnblogs.com/new-comer/p/5304087.html