Skip to content
CrossFly is 100% open sourceFollow us on GitHub
CrossFlyCrossFly
Get started

This page was machine-translated from Portuguese and may contain errors. The Portuguese version is canonical.

Rendering problems

The screen doesn’t reflect what the code did. Format: symptom → cause → fix.

“I changed a value and the screen doesn’t update”

Cause: rendering is on-demand — CrossFly only redraws when requested. Fix: call Component.repaint(); if you changed size/position “from the outside”, also setValidLayout(false) (most framework setters already do this; what you change manually does not). (Ch. 4 §4.6)

Assigned color disappears / component becomes invisible

Cause: color is an int ARGB 0xAARRGGBB and you used 0xRRGGBB (alpha 0). Fix: prefix with 0xFF….

// 0x2196F3  → invisible (alpha 00)
// 0xFF2196F3 → opaque blue

(Ch. 11 — Colors)

Layout doesn’t recompute after swapping children

Cause: the layout wasn’t invalidated. Fix: container.setValidLayout(false); + Component.repaint();.

UI stutters / jitters on an old device

Cause: weak GPU. Fix: check Screen.slowGPU and reduce shadows/gradients/glass effect in that case. (Ch. 8 — Rendering)

Theme changed, but old components didn’t

Cause: the style cache re-resolves via styleVersion (the PalColor colors re-resolve on the next frame) — usually automatic on setColorScheme/setDarkMode. Fix: if something didn’t follow, force restyle() on the window or Component.repaint(). (Light/dark mode)

See also

Was this page helpful?