1、activity的onCreate()方法中添加初始化的fragment 2、fragment放置位置的佈局中必須有一個視圖容器 程序例子中, res/layout/news_articles.xml 文件提供了視圖容器。
www.lupaworld.com