简体   繁体   English

我们如何在Android中以编程方式从Drawer / Launcher / Application Manager隐藏图标

[英]How can we hide icon from Drawer / Launcher / Application Manager programatically in android

任何人都可以帮我吗“我们如何通过其他任何实用程序来隐藏或取消隐藏电话中的应用程序图标”

Try this, 尝试这个,

PackageManager p = getPackageManager();
p.setComponentEnabledSetting(getComponentName(), PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);

This will remove launcher icon from drawer, not applicable for application manager. 这将从抽屉中删除启动器图标,不适用于应用程序管理器。

No. This is not possible, for security reasons you cannot hide the app from the app listings. 不能。出于安全原因,您无法从应用列表中隐藏该应用。 The best you can do is to give your app an obscure name or put something like "preferences" behind its title. 最好的办法是给您的应用起一个晦涩的名称,或在其标题后加上“首选项”之类的内容。

remove 去掉

<intent-filter >
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

from the manifest, so your app won't be listed in the launcher anymore ;) 从清单中删除,因此您的应用将不再在启动器中列出;)

Hiding it completely from the appListing in the deeps of the settings shouldn't be possible afaik. 将其完全隐藏在设置深处的appListing中是不可能的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM