This class is used to instantiate layout XML file into its corresponding View objects. It is never be used directly -- use getLayoutInflater() or getSystemService(String) to retrieve a standard LayoutInflater instance that is already hooked up to the current context and correctly configured for the device you are running on.
LayoutInflater与findViewById的用法有很多可比较之处。
如:他们都可以通过id返回View。
LayoutInflater inflater = getLayoutInflater();
View layout = inflater.inflate(R.layout.custom_dialog,null);
Button button = (Button) findViewById(R.id.button);
correctly:
adv. 正确地, 恰当地
adv. He answered the teacher's question correctly . adv. 他正确地回答了老师的问题。retrieve:
vt. 恢复, 挽回, 取回
vt. The company is fighting to retrieve its market share.
correspond:
你说的情况跟她说的相符。