用 Activity获取当前UI layout中的 view
1,View view = findViewById(R.id.layout_id);
layout_id为xml文件中指定的组件id.
2,View view = mActivity.getWindow()
.getDecorView().findViewById(android.R.id.content);
--------------------------------------------------------------------------------------
LayoutInfalter的获取方法
1. LayoutInflater inflater = mActivity.getLayoutInflater();
2. LayoutInflater inflater = LayoutInflater.from(context);
3. LayoutInflater inflater = (LayoutInflater)context.getSystemService (Context.LAYOUT_INFLATER_SERVICE);