android 如何定制Launcher主菜单中应用程序图标在主菜单中的显示顺序

编辑Launcher2/res/xml/default_toppackage.xml文件:
<toppackages xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher2bird13gb"> 
<app
launcher:topPackageName="com.yahoo.mobile.client.android.odp"
launcher:topClassName="com.yahoo.mobile.client.android.odp.YahooODP"
launcher:topOrder="4"
/>
<app
launcher:topPackageName="com.yahoo.mobile.client.android.im"
launcher:topClassName="com.yahoo.mobile.client.android.im.YahooMessenger"
launcher:topOrder="5"
/> 
<app
launcher:topPackageName="com.yahoo.mobile.client.android.mail"
launcher:topClassName="com.yahoo.mobile.client.android.mail.activity.YahooMail"
launcher:topOrder="6"
/>
<app
launcher:topPackageName="com.yahoo.mobile.client.android.news"
launcher:topClassName="com.yahoo.mobile.client.android.news.activity.Main"
launcher:topOrder="7"
/>
<app
launcher:topPackageName="com.yahoo.mobile.client.android.finance"
launcher:topClassName="com.yahoo.mobile.client.android.finance.activity.Main"
launcher:topOrder="10"
/> 
</toppackages>
按照上面的格式来编辑,写明想要预制app的packageName,ClassName,以及order的值(从0开始)
备注:如果是运营商项目,会有resource_overlay机制,以OP02/SPEC0200/SEGA为例,Launcher2主菜单中特定app的顺序,是以如下路径的default_toppackage.xml文件的内容为准:
alps/mediatek/source/operator/OP02/SPEC0200/SEGA/OverLayResource/packages/apps/Launcher2/res/xml/default_toppackage.xml

你可能感兴趣的:(android 如何定制Launcher主菜单中应用程序图标在主菜单中的显示顺序)