当我们的程序在被安装后再次重启系统时系统会自动创建我们的APK程序,在所有的APK程序都安装完后系统会最后安装Luncher2.apk应用程序,Luncher2.apk就是我们的系统界面应用程序,它会检测系统已经安装的应用软件的包名,然后把这些应用软件的图标和名称给解析出来然后显示在应用程序列表里,用GridView显示了出来,这里如果我们不想让我们的应用程序的图标在Luncher里显示的话,有一个很简单的方法,就是仅修改AndroidManifest.xml文件即可。
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.testicon"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.testicon.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<!-- <category android:name="android.intent.category.LAUNCHER" /> -->
</intent-filter>
</activity>
</application>
</manifest>
注释掉 此行代码即可: <!-- <category android:name="android.intent.category.LAUNCHER" /> -->