-
Notifications
You must be signed in to change notification settings - Fork 85
How to use Appearance
This sdk documentation is deprecated and will not be updated. Check out our new docs at https://sdk.buildfire.com/docs/appearance/
Use this property to modify the appearance of the plugin and sometimes the surrounding platform
Use this to hide and show the Header in the Control Panel - Control section. Use this in your control content,
arguments
-
value
(bool) 'true'/'false' examplebuildfire.appearance.setHeaderVisibility(false);
Use this to force showing the title bar on the app emulator or the mobile app. this function only works inside the widget.
Use this to force hiding the title bar on the app emulator or the mobile app. this function only works inside the widget.
use this to retrive the appTheme object in the callback as follows
{
"appName":"test App",
"colors":{"backgroundColor":"#0b0c0b",
"titleBar":"#09a3ee",
"titleBarTextAndIcons":"#ffffff",
"headerText":"#09a3ee",
"bodyText":"#3765c1",
"icons":"#09a3ee",
"primaryTheme":"#09a3ee",
"successTheme":"#14cb5d",
"infoTheme":"#69d5ff",
"warningTheme":"#faba41",
"dangerTheme":"#ed4b4b",
"defaultTheme":"#0677ae",
"footerMenuBackgroundColor":"#f05524",
"footerMenuIconColor":"#f19969"
},
"fontId":"Helvetica",
"fontName":"Helvetica"
}
It's possible that the appearance settings can change after the app has been loaded. If you wish to keep track of these changes, override the buildfire.appearance.triggerOnUpdate function with your own custom function. Within your custom function you can make an additional call to buildfire.appearance.getAppTheme and update the styling of your plugin as necessary.
buildfire.appearance.triggerOnUpdate = function(){
buildfire.appearance.getAppTheme(function(err, appTheme){
//apply theme changes here
});
}
Called when plugin content is fully loaded. Hides the buildfire spinner and makes the plugin immediately available.