Layer that serves as a configurable status bar.
Creates a new StatusBarLayer on the heap and initializes it with the default values.
Text color: GColorBlack
Background color: GColorWhite
Frame: GRect(0, 0, screen_width, STATUS_BAR_LAYER_HEIGHT)
The status bar is automatically marked dirty after this operation. You can call layer_set_frame() to create a StatusBarLayer of a different width.
// Change the status bar width to make space for the action bar
int16_t width = layer_get_bounds(root_layer).size.w - ACTION_BAR_WIDTH;
GRect frame = GRect(0, 0, width, STATUS_BAR_LAYER_HEIGHT);
layer_set_frame(status_bar_layer_get_layer(status_bar), frame);
layer_add_child(root_layer, status_bar_layer_get_layer(status_bar));
A pointer to the StatusBarLayer, which will be allocated to the heap, NULL
if the StatusBarLayer could not be created
Destroys a StatusBarLayer previously created by status_bar_layer_create.
The StatusBarLayer to destroy
Gets the "root" Layer of the status bar, which is the parent for the sub- layers used for its implementation.
The result is always equal to (Layer *) status_bar_layer
.
Pointer to the StatusBarLayer for which to get the "root" Layer
The "root" Layer of the status bar.
Gets background color of StatusBarLayer.
The StatusBarLayer of which to get the color
GColor of background color property
Gets foreground color of StatusBarLayer.
The StatusBarLayer of which to get the color
GColor of foreground color property
Sets the background and foreground colors of StatusBarLayer.
The StatusBarLayer of which to set the colors
The new GColor to set for background
The new GColor to set for text and other foreground elements
Sets the mode of the StatusBarLayer separator, to help divide it from content.
The StatusBarLayer of which to set the separator mode
Determines the separator mode
Values that are used to indicate the different status bar separator modes.
The default mode. No separator will be shown.
A dotted separator at the bottom of the status bar.
The fixed height of the status bar, including separator height.
The fixed height of the status bar, including separator height.
Do you have questions about the Pebble SDK?
Do you need some help understanding something on this page?
You can either take advantage of our awesome developer community and check out the SDK Help forums, or you can send us a message through the website!