隐藏APK在launch中显示的方法

当我们的程序在被安装后再次重启系统时系统会自动创建我们的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" /> -->

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值