LayoutInflater
/* XML 전개를 직접 하기
LayoutInflater inflater = (LayoutInflater)getSystemService(
Context.LAYOUT_INFLATER_SERVICE);
LinearLayout linear = (LinearLayout)inflater.inflate(R.layout.layout_inflation, null);
setContentView(linear);
//*/
/* 컨텍스트로부터 전개자 구하기
LayoutInflater inflater = LayoutInflater.from(this);
LinearLayout linear = (LinearLayout)inflater.inflate(R.layout.layout_inflation, null);
setContentView(linear);
//*/
/* View의 정적 메소드 사용하여 전개하기
LinearLayout linear = (LinearLayout)View.inflate(this, R.layout.layout_inflation, null);
setContentView(linear);
//*/
//* 가장 짧은 전개 코드
setContentView(View.inflate(this, R.layout.layout_inflation, null));
[출처] [Android] 레이아웃 전개 (Inflation)|작성자 JSP 프로그래밍