2011-06-14 84 views
0

我做了一個擴展linearlayout的類文件,在這個例子中我看到下面的代碼,我不明白什麼是它的需要和重要。請解釋一下FinishLayout示例代碼?

protected void onFinishInflate() 
{ 
    super.onFinishInflate(); 
    ((Activity)getContext()).getLayoutInflater().inflate(R.layout.twotext, this); 
    setItems();//this is my method that i have declared below this code 
} 
+0

哪條線的代碼你不明白嗎? – RedBlueThing 2011-06-14 07:14:44

+0

爲什麼不在文檔中提到..一切都在那裏..並更好地接受答案之前,你問一些其他問題.. – ngesh 2011-06-14 07:15:09

回答

0

當你的佈局通脹complete..to只需在其上設置的項目將被稱爲..

完整的詳細信息,請閱讀文檔...