layoutUpdated

Typemessage
Dictionarylibrary.responsivelayout
LibraryResponsiveLayout
Syntax
layoutUpdated <pMediaQueryArray>
Associationscom.livecode.library.responsivelayout, card
Summary

Message sent to card after UI update.

Parameters
NameTypeDescription
pMediaQueryArray

An array containing the result of the mediaQuery() function for the current card.

Example
local sTheme
on layoutUpdated pMediaQueryArray

   if pMediaQueryArray["systemDarkMode"] is not sTheme then
      put pMediaQueryArray["systemDarkMode"] into sTheme

      # Theme dark
      if pMediaQueryArray["systemDarkMode"] then
         set the backgroundColor of this card to 32, 32, 32
         set the foregroundColor of this card to 185, 185, 185

         // ...
      else # Theme Light
         set the backgroundColor of this card to 243, 243, 243
         set the foregroundColor of this card to 26, 26, 26

         // ...
      end if
   end if
end layoutUpdated
Description

Use the layoutUpdated message if you want to create layout rules after the library finishes wrapping the user interface.