2010-05-24 17 views

回答

3

最簡單的解決辦法是使用你的佈局文件<include>選項。

定義在佈局文件中常見的頁腳全部由自己 - e.g tab_footer.xml - 然後包含到其他佈局如下:

<include layout="@layout/tab_footer"> 

你可以找出this post on the Android Developers Blog更多<include>。未在文章中提到

一兩件事:如果你想,當你用它來重寫任何layout參數<include>確保您覆蓋layout_widthlayout_height(即使他們不改變),否則你的其它參數值將被默默地忽略。

相關問題