2014年7月12日 星期六

LayoutInflater

在學Layout這部分時看到了這段程式碼

LinearLayout linear_layout = (LinearLayout)getLayoutInflater().inflate(R.layout.layout_to_be_inflate,null);

功能是把layout_to_be_inflate這個xml檔生成一個linearlayout物件

當中出現了 LayoutInflater這不知道意義何在的東西

所以就找了一下