开发者

Hide Icon and label in Activity (splash screen)

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

<application android:icon="@drawable/icon" 
             android:label="TestApplication" 
             android:theme="@android:style/Theme.Holo.Light">

    <activity android:icon="@drawable/splashicon" 
              android:label=""
              android:name=".Splash">

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).

Edit:

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 tha开发者_StackOverflowt 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜