2

Background

I know there are already logo and icon (difference is explained here).

The problem

Starting with API 20 ("L"? or maybe Android wear?) , there is now a new one, called "banner". Here's what the documentation says about it:

A drawable resource identifier (in the package's resources) of this component's banner. From the "banner" attribute or, if not set, 0.

So this doesn't give much clues about what it is...

The problem is that I don't know what it is, and can't find any info about it.

What I've tried

I've tried finding about this on the Internet, but because "banner" is such a generic name, I didn't find anything interesting...

Of course, I've also tried searching about this on the documentation of activity (here and here), but didn't find anything...

The question

  1. Where is it used for?

  2. Is it for Android "L" or Android wear ? or maybe both?

  3. Why has Google decide to make it?

  4. Where can I read about it?

  5. Are there any guidelines about it?

  6. Depends on the answers, do you think it will somehow be part of the support library?

Community
  • 1
  • 1
android developer
  • 114,585
  • 152
  • 739
  • 1,270

1 Answers1

7

It's for Android TV.

From the l developer preview reference docs:

A Drawable resource providing an extended graphical banner for its associated item. Use with the application tag (to supply a default banner for all application activities), or with the activity, tag to supply a banner for a specific activity.

The given banner will be used to display to the user a graphical representation of an activity in the Leanback application launcher. Since banners are displayed only in the Leanback launcher, they should only be used with activities (and applications) that support Leanback mode. These are activities that handle Intents of category Intent.CATEGORY_LEANBACK_LAUNCHER.

This must be a reference to a Drawable resource containing the image definition.

Must be a reference to another resource, in the form "@[+][package:]type:name" or to a theme attribute in the form "?[package:][type:]name".

This corresponds to the global attribute resource symbol banner.

You can also read a bit more about it here.

Essentially a banner is just a launcher icon for the leanback launcher. For example, if your app is compatible with both phones/tablets, and android tv, specifying a banner will let you have an alternate (rectangular) icon for the leanback launcher on android tv.

In this image, I specified the banner to be a red shape drawable. By default this will be your apps launcher icon.

Banner Example

I don't think it will be part of any support library, as it's specific to Android L on the TV. But to use it, you will need to be targeting L.

athor
  • 6,848
  • 2
  • 34
  • 37
  • How did you find it? it's not on the "application" documentation: http://developer.android.com/guide/topics/manifest/application-element.html , http://developer.android.com/reference/android/app/Application.html . It's also not available as a content assist item. Searching for the exact (partial) text you've written doesn't show its origin. Also, can you please try to answer the questions I've written? – android developer Aug 31 '14 at 22:35