接到任务去调查如何定制Android的Home,在网上查了一下资料。本来以为很难的,但是居然只是简单的修改manifest.xml文件。参考[url]http://blog.youkuaiyun.com/sijiangong/archive/2009/08/12/4440037.aspx[/url],只要把 android.intent.category.LAUNCHER 改为 android.intent.category.HOME,居然就可以把程序变成Home。
试着把HelloWorld改了一下,在启动模拟器后,单机Home键,就可以得到如下的效果。
[img]http://dl.iteye.com/upload/attachment/401770/8076b23f-cd39-3e83-935c-c1081739c506.jpg[/img]
不过如果真的定制,还需要在自己的Home应用可以调用别的应用。
如果想要真正控制用户的界面,需要采用下边链接的方法。
[url]http://hi.baidu.com/lvqiyong/blog/item/a5410e890ed459c1fc1f10ff.html[/url]
这个需要自己编译Android,制作img。下次再研究。我还没有学会编译呢。 :cry:
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".MyHome" android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
试着把HelloWorld改了一下,在启动模拟器后,单机Home键,就可以得到如下的效果。
[img]http://dl.iteye.com/upload/attachment/401770/8076b23f-cd39-3e83-935c-c1081739c506.jpg[/img]
不过如果真的定制,还需要在自己的Home应用可以调用别的应用。
如果想要真正控制用户的界面,需要采用下边链接的方法。
[url]http://hi.baidu.com/lvqiyong/blog/item/a5410e890ed459c1fc1f10ff.html[/url]
这个需要自己编译Android,制作img。下次再研究。我还没有学会编译呢。 :cry: