想实现一个功能,在当前页面布局上再加载一个xml作为它的子类,最后终于找到了,谢谢作者们啊嘿嘿
// 加载子Layout
View mBarView = View.inflate(this, R.layout.main_panel, null);
// 找到容器
LinearLayout panel_center = (LinearLayout) findViewById(R.id.panel_center);
// 加上View 结束
panel_center.addView(mBarView);