Type Function
Library widget.*
Return value none
Revision Current Public Release (2016.2949)
Keywords widget, theme, set theme
See also widget


Use this function to set the overall theme of the widget library. This should be called immediately after you require() the widget library.


widget.setTheme( themeFile )
themeFile (required)

String. The name of the theme's Lua file, without the .lua extension. Default themes are:

  • "widget_theme_ios7"
  • "widget_theme_android_holo_dark"
  • "widget_theme_android_holo_light"
  • "widget_theme_android"
  • "widget_theme_ios"

You can also build your own theme file or modify an existing one from the framework-widget GitHub repository.


local widget = require( "widget" )

-- Set a default theme
widget.setTheme( "widget_theme_ios7" )

-- Set a custom theme (created by you); assumes that "myTheme.lua" is located inside the core project folder
widget.setTheme( "myTheme" )