在android的development目錄中有一個Demo是Launcher的實例Home
路徑爲:development/samples/Home
也可以這樣找:grep "android.intent.category.HOME" development/samples/ -snr
以下是個人的小小總結:
1.註冊兩個廣播接收器:Wallpaper和Application
2.設置壁紙
3.加載帶有Launcher標籤的ApplicationInfo並保存在ArrayList<ApplicationInfo> 中
4.Demo中是使用GridView控件顯示應用程序圖標,所以這一步是將ApplicationInfo綁定到該控件中
5.通過讀取xml文件加載favorite
6.AllAppButton控件的功能綁定
7.launcher中AllAppButton點擊時動畫效果所涉及到的變量,函數初始化