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. Dialog Theme

I've extended Theme.Dialog to use a different color as per the sample
in the ApiDemos project but for some reason it does not use the theme
properly in my project. I created a new project and it works perfectly
fine there. The main problem here is that it does not show as floating
in my project. Instead, it sets the rest of the screen black except
for what would be the dialog window, where it uses the correct colors,
etc... Any ideas? I am beating my head against the wall here. Thanks
in advance.

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

2. Detecting hardware specs or phone model

Hi all,
I'm working on a game containing a 3D engine, and I would like to
change some parameters automatically depending on the hardware
capabilities.
For that I need a way to check the platform directly from the
software.
Does anyone know a way to achieve that?

Thanks for any information.

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

3. can anyone explain liblights and the lights.h interface? are there examples?

4. Software Keyboard Strange Behaviour

5. Avoid relaunching Emulator when App runs from eclipse

6. ActivityGroup , onKeyDown and ListView

7. How can I sort items in the ListView?