resize

Type Event
Revision Release 2024.3703
Keywords resize

Overview

A resize event occurs when the width or height of the app's view has been changed. This event should be used to re-layout an app's contents to fit its new bounds.

The following situations can trigger a resize event:

Resize event listeners can only be set up via the Runtime object.

Properties

Example

-- Called when the app's view has been resized
local function onResize( event )
    -- re-layout the app's contents here
end

-- Add the "resize" event listener
Runtime:addEventListener( "resize", onResize )