PackageManager p = getPackageManager();
p.setComponentEnabledSetting(getComponentName(), PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
Note that the icon may not be gone until the next reboot.
More Related Contents:
- Action bar icon showing solid gray square in android
- How to display count of notifications in app launcher icon [duplicate]
- Android Push Notifications: Icon not displaying in notification, white square shown instead
- Set icon for Android application
- How to set different label for launcher rather than activity title?
- Actionbar notification count icon (badge) like Google has
- Is there a way to add a badge to an application icon in Android?
- How can I create a custom home-screen replacement application for Android?
- How to start/ launch application at boot time Android
- How to make a launcher
- How to set default app launcher programmatically?
- Why is my smallIcon for Notifications always greyed out?
- How do you change the launcher logo of an app in Android Studio?
- ActionBarSherlock – How to set the padding of each actionbar’s icon?
- How to change Toolbar home icon color
- Android icon vs logo
- The application icon does not show on action bar
- Is there any way to dynamically change an app icon like Calendar app does?
- PhoneGap Android: How to force Application to use icons from asset\www\res instead res\drawable folder?
- Widget not updated on launcher restart
- Widgets don’t respond when re-added through code
- Action Bar icon size
- How to show an icon in the status bar when application is running, including in the background?
- How to force an app icon on Android O? (Prevent the launcher from adapting it)
- How to override the enter activity animation if it is stated by launcher
- Which WebSocket library to use in Android app? [closed]
- How can you pass multiple primitive parameters to AsyncTask?
- Add a Progress Bar in WebView
- Execution failed for task ‘:app:transformClassesWithDexForDebug’ while implementing Google sign in for Android
- Configuration with name ‘default’ not found. Android Studio