Update: Android Widget Themes

Update: Android Widget Themes

Starting in the most recent public build, all Corona developers can now opt to use two new widget themes in their projects. These new themes are styled after the Android “Holo Light” and “Holo Dark” themes which are commonly found on Android devices running recent versions of the OS.

Both of the new themes contain assets up to the @4x scale profile, which means that your widgets should appear crisp and clean on even the highest resolution Android devices like the Nexus 10.


Setting the Themes

The new themes can be set by passing the proper value to the widget.setTheme() API:

And that’s it — all non-skinned widgets throughout the project will appear in the new chosen theme.

Updated Sample Project

To preview the new themes in action, please load the WidgetDemo sample project included with Corona SDK:

CoronaSDK → SampleCode → Interface → WidgetDemo

Previous Android Theme

Note that using the new Holo themes is entirely optional. The previous Android theme files are still available, so if you wish to continue using that theme, be sure to set the theme as follows:

In Summary

Hopefully you can easily integrate these new themes into your existing projects with a minimal amount of repositioning, although some adjustments will be necessary due to slightly differing sizes of the updated styles.

Brent Sorrentino
[email protected]

Brent Sorrentino is a full-time Developer Evangelist and technical writer who assists others with game development, code, and in overcoming other challenges to help them bring their app dreams to life.

  • Kerem
    Posted at 15:59h, 08 August

    Great update! Many thanks.

  • Lerg
    Posted at 20:13h, 26 November

    local function some()

    local function some()

    local function some()

    local function some()