i am currently developing a pebble application for my ios app which has three media buttons on a action bar. Now in certain scenarios i have to disable or hide fastfarward/previous(<>) buttons, So that they are not visible to user. Could some one help me out in acheiving this as there is no proper information in the api docs. For your information i have even tried calling "action_bar_layer_clear_icon" but it was of no use.
Asked
Active
Viewed 327 times
1 Answers
0
You're on the right path with the action_bar_layer_clear_icon function. For some simple example code, suppose you create a Window Layout in CloudPebble: window "mywindow" containing actionbar layer "s_actionbarlayer_1" (the default name). Upload an icon for the select button as a resource and display it by default when the layout is first shown. Then you can clear that icon when the button is pressed by calling action_bar_layer_clear_icon from the event handler:
void my_handler(void) {
action_bar_layer_clear_icon(s_actionbarlayer_1, BUTTON_ID_SELECT);
}
void my_config_provider(void *context) {
window_single_click_subscribe(BUTTON_ID_SELECT, (ClickHandler)my_handler);
}
int main(void) {
show_mywindow();
action_bar_layer_set_click_config_provider(s_actionbarlayer_1, my_config_provider);
app_event_loop();
}

Technicalleigh
- 1
- 1