How to hide activity from menu?

by f...@r@0n » Mon, 12 Oct 2009 02:48:48 GMT


Sponsored Links
 Hello guys,

Does anybody know how to hide activity icon from menu? I am trying to
write simple multiview application. So, I have two activities there,
the first (main) activity starts the second one. However, my second
activity icon is visible in installed apps menu grid and can be
started from menu as separate standalone app :)
Is there any special activity tag I can use in manifest to hide icon?

Thanks.

Br,
 Faraon

--~--~---------~--~----~------------~-------~--~----~



How to hide activity from menu?

by Mark Murphy » Mon, 12 Oct 2009 03:07:02 GMT


 


In the AndroidManifest.xml file, both of your activities probably have
an <intent-filter> element that looks like:

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

That tells Android to put an icon in the Launcher for that activity.
Remove that <intent-filter> from any activity that is not supposed to be
in the Launcher.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://twitter.com/commonsguy 

Need Android talent? Ask on HADO!  http://wiki.andmob.org/hado 

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


How to hide activity from menu?

by f...@r@0n » Mon, 12 Oct 2009 22:35:01 GMT


 Yeah, removing LAUNCHER category works fine. This is what I need.

Such kind of things always happen when copy-paste code without clear
understanding what you are doing. Will try to avoid this in future :)

Thanks again!

f...@r@0n
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. ListView items in Activity Persist on G1 keyboard slideout, but not Dialog list items

Romain,

There has been a bug in 1.0 and 1.1. that the onPrepareDialog is not
properly called after a configuration change happened. Has this been
fixed?

2. Get unread messages in inbox

Hi,
Is it possible to get the unread sms messages? I know that I can get
all messages using the content://sms/inbox uri, but how do I check
whether it is unread?

Thank you,
//Kaloer
--~--~---------~--~----~------------~-------~--~----~

3. android' is not recognized as an internal or external command,

4. how to get cpu usage from system api

5. Using Intents

6. Using Android Radar in map application

7. 500kb OPML parsing issues