WallpaperDescription.Builder
public
static
final
class
WallpaperDescription.Builder
extends Object
java.lang.Object | |
↳ | android.app.wallpaper.WallpaperDescription.Builder |
Builder for the immutable WallpaperDescription
class
Summary
Public constructors | |
---|---|
Builder()
Creates a new, empty |
Public methods | |
---|---|
WallpaperDescription
|
build()
Creates and returns the |
WallpaperDescription.Builder
|
setContent(PersistableBundle content)
Set the additional content required to render this wallpaper. |
WallpaperDescription.Builder
|
setContextDescription(CharSequence contextDescription)
Set the link text for the action associated with this wallpaper. |
WallpaperDescription.Builder
|
setContextUri(Uri contextUri)
Set the Uri for the action associated with this wallpaper, to be shown as a link with the wallpaper information. |
WallpaperDescription.Builder
|
setDescription(List<CharSequence> description)
Set the description for this wallpaper. |
WallpaperDescription.Builder
|
setId(String id)
Set the id for this wallpaper. |
WallpaperDescription.Builder
|
setThumbnail(Uri thumbnail)
Set the thumbnail Uri for this wallpaper. |
WallpaperDescription.Builder
|
setTitle(CharSequence title)
Set the title for this wallpaper. |
Inherited methods | |
---|---|
Public constructors
Public methods
build
public WallpaperDescription build ()
Creates and returns the WallpaperDescription
represented by this builder.
Returns | |
---|---|
WallpaperDescription |
setContent
public WallpaperDescription.Builder setContent (PersistableBundle content)
Set the additional content required to render this wallpaper.
When setting additional content (asset id, etc.), best practice is to set an ID as well. This allows WallpaperManager and other code to distinguish between different wallpapers handled by this component.
Parameters | |
---|---|
content |
PersistableBundle : additional content, or an empty bundle for none |
Returns | |
---|---|
WallpaperDescription.Builder |
setContextDescription
public WallpaperDescription.Builder setContextDescription (CharSequence contextDescription)
Set the link text for the action associated with this wallpaper.
Parameters | |
---|---|
contextDescription |
CharSequence : the link text, or null for default text |
Returns | |
---|---|
WallpaperDescription.Builder |
setContextUri
public WallpaperDescription.Builder setContextUri (Uri contextUri)
Set the Uri for the action associated with this wallpaper, to be shown as a link with the wallpaper information.
Parameters | |
---|---|
contextUri |
Uri : the action Uri, or null for no action |
Returns | |
---|---|
WallpaperDescription.Builder |
setDescription
public WallpaperDescription.Builder setDescription (List<CharSequence> description)
Set the description for this wallpaper. Each array element should be shown on a different line.
Parameters | |
---|---|
description |
List : the description, or an empty list for none |
Returns | |
---|---|
WallpaperDescription.Builder |
setId
public WallpaperDescription.Builder setId (String id)
Set the id for this wallpaper.
IDs are used to distinguish among different instances of wallpapers rendered by the same component, and should be unique among all wallpapers for that component.
Parameters | |
---|---|
id |
String : the id, or null for none |
Returns | |
---|---|
WallpaperDescription.Builder |
setThumbnail
public WallpaperDescription.Builder setThumbnail (Uri thumbnail)
Set the thumbnail Uri for this wallpaper.
Parameters | |
---|---|
thumbnail |
Uri : the thumbnail Uri, or null for none |
Returns | |
---|---|
WallpaperDescription.Builder |
setTitle
public WallpaperDescription.Builder setTitle (CharSequence title)
Set the title for this wallpaper.
Parameters | |
---|---|
title |
CharSequence : the title, or null for none |
Returns | |
---|---|
WallpaperDescription.Builder |