I want to change the color of the status bar when I close the expandable card, if it closes but does not change the color of the status bar,
this is the code:
var mainView = app.views.create(’.view-main’);
document.addEventListener(“backbutton”, onBackKeyDown, false);
function onBackKeyDown() {
var card = app.card.toggle && app.card.open;
if ( card ) {
app.card.close();
app.statusbar.setBackgroundColor("#FFFFFF");
return false;
}
}
$$(’.card-rojo’).on(‘click’,function(){
app.statusbar.setBackgroundColor("#ff3b30");
});
$$(’.card-amarillo’).on(‘click’,function(){
app.card.close();
app.statusbar.setBackgroundColor("#ffcc00");
});
$$(’.card-close’).on(‘click’,function(){
app.statusbar.setBackgroundColor(“FFFFFF”);
});