public class

StatusbarIconItem

extends Object
implements Parcelable
java.lang.Object
   ↳ com.samsung.android.knox.custom.StatusbarIconItem

Class Overview

This class defines a custom item for status bar icons.

Since
API level 15
Version 2.4

Summary

Nested Classes
class StatusbarIconItem.AttributeColour Class for attribute and corresponding color. 
Constants
int STATUSBAR_ICON_BATTERY_BARS Statusbar Battery Bars Icon.
int STATUSBAR_ICON_BATTERY_TEXT Statusbar Battery Percentage Text Icon.
int STATUSBAR_ICON_CLOCK_TEXT Statusbar Clock Text Icon.
int STATUSBAR_ICON_MOBILE_BARS Statusbar Mobile Signal Bars Icon.
int STATUSBAR_ICON_SMART_STAY Statusbar Smart Stay Icon.
int STATUSBAR_ICON_WIFI_BARS Statusbar Wi-Fi Signal Bars Icon.
[Expand]
Inherited Constants
From interface android.os.Parcelable
Public Constructors
StatusbarIconItem(int icon, AttributeColour[] attributeColor)
Class constructor.
Public Methods
int describeContents()
Not implemented.
StatusbarIconItem.AttributeColour getAttributeColour(int index)
This method gets the AttributeColour for specified index within AttributeColour array.
AttributeColour[] getAttributeColourArray()
This method gets the AttributeColour Array, internal member assigned in the constructor.
int getIcon()
This method gets the Icon, internal member assigned in the constructor.
void setAttributeColour(int index, int attribute, int color)
This method sets the AttributeColour for specified index within AttributeColour array.
String toString()
This method returns the string representation of this class instance.
void writeToParcel(Parcel out, int flags)
This method flatten this StatusbarIconItem object into a Parcel (out).
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Constants

public static final int STATUSBAR_ICON_BATTERY_BARS

Since: API level 28

Statusbar Battery Bars Icon.

Constant Value: 2 (0x00000002)

public static final int STATUSBAR_ICON_BATTERY_TEXT

Since: API level 28

Statusbar Battery Percentage Text Icon.

Constant Value: 3 (0x00000003)

public static final int STATUSBAR_ICON_CLOCK_TEXT

Since: API level 28

Statusbar Clock Text Icon.

Constant Value: 1 (0x00000001)

public static final int STATUSBAR_ICON_MOBILE_BARS

Since: API level 28

Statusbar Mobile Signal Bars Icon.

Constant Value: 4 (0x00000004)

public static final int STATUSBAR_ICON_SMART_STAY

Since: API level 28

Statusbar Smart Stay Icon.

Constant Value: 6 (0x00000006)

public static final int STATUSBAR_ICON_WIFI_BARS

Since: API level 28

Statusbar Wi-Fi Signal Bars Icon.

Constant Value: 5 (0x00000005)

Public Constructors

public StatusbarIconItem (int icon, AttributeColour[] attributeColor)

Since: API level 15

Class constructor.

Parameters
icon The status bar icon whose attributes/color is being set.
attributeColor An array of attributes and corresponding colors.
Usage

 StatusbarIconItem.AttributeColour[] batteryColors = new AttributeColour[2];

 batteryColors[0] = new StatusbarIconItem.AttributeColour(20, 0xFF8BCC15);

 batteryColors[1] = new StatusbarIconItem.AttributeColour(40, 0xFFFF3100);

 StatusbarIconItem batteryBarItem = new StatusbarIconItem(STATUSBAR_ICON_BATTERY_BARS, batteryColors);

 
Since
API level 15
Version 2.4

Public Methods

public int describeContents ()

Since: API level 15

Not implemented.

Returns
  • Always 0.
Since
API level 15
Version 2.4

public StatusbarIconItem.AttributeColour getAttributeColour (int index)

Since: API level 15

This method gets the AttributeColour for specified index within AttributeColour array.

Returns
  • AttributeColour for specified index within AttributeColour array.
Since
API level 15
Version 2.4

public AttributeColour[] getAttributeColourArray ()

Since: API level 15

This method gets the AttributeColour Array, internal member assigned in the constructor.

Returns
  • AttributeColour array assigned in the constructor.
Since
API level 15
Version 2.4

public int getIcon ()

Since: API level 15

This method gets the Icon, internal member assigned in the constructor.

Returns
  • Icon value assigned in the constructor.
Since
API level 15
Version 2.4

public void setAttributeColour (int index, int attribute, int color)

Since: API level 15

This method sets the AttributeColour for specified index within AttributeColour array.

Parameters
index Reference to element to be set in AttributeColour array.
attribute The relevant attribute for status bar icon.
color The specified color.
Since
API level 15
Version 2.4

public String toString ()

Since: API level

This method returns the string representation of this class instance.

Returns
  • String representation of this class instance.
Since
API level 15
Version 2.4

public void writeToParcel (Parcel out, int flags)

Since: API level 15

This method flatten this StatusbarIconItem object into a Parcel (out).

Parameters
out The parcel where the data is written.
flags Not used.
Since
API level 15
Version 2.4