public static class

CustomTile.Builder

extends Object
java.lang.Object
   ↳ cyanogenmod.app.CustomTile.Builder

Class Overview

Builder class for CustomTile objects. Provides a convenient way to set the various fields of a CustomTile

Example:

 CustomTile customTile = new CustomTile.Builder(mContext)
         .setLabel("custom label")
         .setContentDescription("custom description")
         .setOnClickIntent(pendingIntent)
         .setOnSettingsClickIntent(intent)
         .setOnClickUri(Uri.parse("custom uri"))
         .setIcon(R.drawable.ic_launcher)
         .build();
 

Summary

Public Constructors
CustomTile.Builder(Context context)
Constructs a new Builder with the defaults:
Public Methods
CustomTile build()
Create a CustomTile object
CustomTile.Builder hasSensitiveData(boolean bool)
Indicates whether this tile has sensitive data that have to be hidden on secure lockscreens.
CustomTile.Builder setContentDescription(int id)
Set the content description for the custom tile
CustomTile.Builder setContentDescription(String contentDescription)
Set the content description for the custom tile
CustomTile.Builder setDeleteIntent(PendingIntent intent)
Supply a PendingIntent to send when the custom tile is cleared explicitly by the user.
CustomTile.Builder setExpandedStyle(CustomTile.ExpandedStyle expandedStyle)
Set an CustomTile.ExpandedStyle to to be displayed when a user clicks the custom tile
CustomTile.Builder setIcon(Bitmap remoteIcon)
Set a bitmap icon to the custom tile to be utilized instead of icon This will unset setIcon(int) if utilized together.
CustomTile.Builder setIcon(int drawableId)
Set an icon for the custom tile to be presented to the user
CustomTile.Builder setLabel(int id)
Set the label for the custom tile
CustomTile.Builder setLabel(String label)
Set the label for the custom tile
CustomTile.Builder setOnClickIntent(PendingIntent intent)
Set a PendingIntent to be fired on custom tile click
CustomTile.Builder setOnClickUri(Uri uri)
Set a Uri to be broadcasted in an intent on custom tile click
CustomTile.Builder setOnLongClickIntent(PendingIntent intent)
Set a PendingIntent to be fired on custom tile long press.
CustomTile.Builder setOnSettingsClickIntent(Intent intent)
Set a settings Intent to be fired on custom tile detail pane click
CustomTile.Builder shouldCollapsePanel(boolean bool)
Set whether or not the Statusbar Panel should be collapsed when an onClick or onClickUri event is fired.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public CustomTile.Builder (Context context)

Added in API level 1

Constructs a new Builder with the defaults:

Public Methods

public CustomTile build ()

Added in API level 1

Create a CustomTile object

Returns

public CustomTile.Builder hasSensitiveData (boolean bool)

Added in API level 2

Indicates whether this tile has sensitive data that have to be hidden on secure lockscreens.

public CustomTile.Builder setContentDescription (int id)

Added in API level 1

Set the content description for the custom tile

Parameters
id a string resource id to explain content

public CustomTile.Builder setContentDescription (String contentDescription)

Added in API level 1

Set the content description for the custom tile

Parameters
contentDescription a string to explain content

public CustomTile.Builder setDeleteIntent (PendingIntent intent)

Added in API level 2

Supply a PendingIntent to send when the custom tile is cleared explicitly by the user.

See Also

public CustomTile.Builder setExpandedStyle (CustomTile.ExpandedStyle expandedStyle)

Added in API level 1

Set an CustomTile.ExpandedStyle to to be displayed when a user clicks the custom tile

public CustomTile.Builder setIcon (Bitmap remoteIcon)

Added in API level 2

Set a bitmap icon to the custom tile to be utilized instead of icon This will unset setIcon(int) if utilized together.

See Also

public CustomTile.Builder setIcon (int drawableId)

Added in API level 1

Set an icon for the custom tile to be presented to the user

public CustomTile.Builder setLabel (int id)

Added in API level 1

Set the label for the custom tile

Parameters
id a string resource id to be used for the custom tile label

public CustomTile.Builder setLabel (String label)

Added in API level 1

Set the label for the custom tile

Parameters
label a string to be used for the custom tile label

public CustomTile.Builder setOnClickIntent (PendingIntent intent)

Added in API level 1

Set a PendingIntent to be fired on custom tile click

public CustomTile.Builder setOnClickUri (Uri uri)

Added in API level 1

Set a Uri to be broadcasted in an intent on custom tile click

public CustomTile.Builder setOnLongClickIntent (PendingIntent intent)

Added in API level 4

Set a PendingIntent to be fired on custom tile long press. Note: if this is an activity, the host panel will automatically collapse.

public CustomTile.Builder setOnSettingsClickIntent (Intent intent)

Added in API level 1

Set a settings Intent to be fired on custom tile detail pane click

public CustomTile.Builder shouldCollapsePanel (boolean bool)

Added in API level 2

Set whether or not the Statusbar Panel should be collapsed when an onClick or onClickUri event is fired.