- 调用Activity的getLayoutInflater()方法
LayoutInflater inflater = getLayoutInflater();
**View view = inflater.inflate(R.layout.xx);
- LayoutInflater inflater=LayoutInflater.from(context);
- LayoutInflater inflater=
(LayoutInflater)context.getSystemService(Context.LAYOUTINFLATER_SERVICE);