Ocultar icono y etiqueta en Actividad (pantalla de presentación)

Here's the part of the Manifest that I believe is important:

<application android:icon="@drawable/icon" 

    <activity android:icon="@drawable/splashicon" 

The splashicon is a 1x1 transparent png. When I try this way, the Application icon renders then fades to the transparent one.

I've tried various combinations of modifying the icon/label section for both activity and application and getting bad results. Removing the icon/label from the activity gives the most preferred result sans icon and label displaying during splash.

How do I get rid of those two items without messing up the icon/label in the app drawer and possibly other locations (haven't tested Market).


I'm not after removing the icon/label from the app drawer (in fact, that is one thing I'm trying to retain).

The issue is that if I run the application in 3.0+, I get the icon and the label in the upper lefthand corner of the splash screen which is not what I'm wanting to see.

An example of an application that performs this behavior properly would be Pulse, Angry Birds Rio, and the like.

One application that I've noticed that falls victim to the same issue I'm having is Wyse PocketCloud Pro. If you run it in Honeycomb, look in the upper left hand corner as it is initially loading. Momentarily you can see the icon/label and it fades.

preguntado el 28 de agosto de 11 a las 01:08

1 Respuestas

You need to be more specific about what you are looking for. I'll try to answer what you may possibly be asking for.

An activity that is being displayed in the launcher must have a label and icon. That's kind-of... well, it wouldn't make sense to not need these. So please don't play games here and try to not have them. You start to look like a malicious app by doing so.

If you don't want your activity to show up at all in the launcher, then don't declare the intent filter for the MAIN action and LAUNCHER category.

If you want the preview window when launching the app to look more like your real window (let's say you hide the title bar), then in the tag in your manifest use android:theme="..." to declare the theme you use so this can be used for the preview. For example, if you are using Theme.NoTitleBar to not have a title bar, do android:theme="@android:style/Theme.NoTitleBar".

If you want to show a splash screen for your app and have the preview window match it, and one of the standard themes does not match enough, then make your own theme and in the manifest specify it for android:theme. This will let you set a custom background color, or even set the background to an image that is your splash screen.

Keep in mind that launching applications should be fast, so having to show a splash screen every time it launches is very not desirable. On a mobile device, there is a good chance this will greatly reduce the amount your app is used because people won't wait for a long time for it.

If you are looking for something else, please update your question to more clearly state what it is.

Respondido 28 ago 11, 06:08

since I'm using Theme.Holo.Light, I used @android:style/Theme.Light.NoTitleBar and it achieved the desired effect. - Robert

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.