widget.setTheme()

Type Function
Library widget.*
Return value none
Revision Release 2022.3683
Keywords widget, theme, set theme
See also widget

Overview

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

Syntax

widget.setTheme( theme )
theme (required)

String. The theme name. Valid options include:

  • "widget_theme_android_holo_dark"
  • "widget_theme_android_holo_light"
  • "widget_theme_ios7"
  • "widget_theme_android" (legacy)
  • "widget_theme_ios" (legacy)

Example

local widget = require( "widget" )

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