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.

Enums and constants of UIConstants

UIConstants is the hub of shared enums, constants and types. Since Component/Layout/Styles implement UIConstants, these names are accessible without a qualified import inside them. Values verified against the source code (2026 API).

Layout and position

Enum Values
Position START · CENTER · END
Orientation HORIZONTAL · VERTICAL
ScreenSize SIZE (actual dimension) · MIN (smaller side) · MAX (larger side)
RelPos AUTOPOS · AUTOPOSCENTERED · START · CENTER · END · BEFORE · SAMEPOS · AFTER · CENTER_OF · END_OF · KEEPPOS
RelSize AUTOSIZE · FILL · FIT · SAMESIZE · KEEPSIZE
Transition NONE · FADE · SLIDE_LEFT · SLIDE_RIGHT · SLIDE_UP · SLIDE_DOWN · SCALE · SCALE_DOWN

Appearance

Enum Values
ImageSize ORIGINAL · RATIO · STRETCH · FIT · FIT_WIDTH · FIT_HEIGHT · FIT_HALF_WIDTH · FIT_HALF_HEIGHT
LineStyle SOLID · DOTTED
Pressable NO · YES · STICKY

Text input

Enum Values
EditMode NORMAL · DATE · CURRENCY · NUMERIC · TIME · PASSWORD
Capitalise NORMAL · UPPER · LOWER
Keyboard NONE · DEFAULT · NUMERIC · KEYPAD · CALCULATOR · DATE · TIME

EditMode.getKeyboard() maps the mode to the implicit keyboard (DATE→DatePicker, CURRENCY→Keypad calculator, TIME→TimePicker, etc.). See Masks and keyboards.

Non-enum constants

Constant Value Use
LAY_AUTO 0f natural size of the content (in add())
LAY_FILL -1f fills the remaining space (in add())

Colors remain int ARGB — the color constants and utilities are in UIConstants/Styles and ColorUtils (see Colors and the Cheat sheets).

Nested types (functional / marker interfaces)

UIConstants also nests the shared contracts: Action (run(Component)), Paintable, Icon, Scrollable, Checkable, TextComponent, TextInputComponent. That is why they appear as UIConstants.Action etc. (the 2026 migration moved them inside UIConstants).

See also

Was this page helpful?