Skip to content

Commit 3cc0d68

Browse files
authored
Document new theme constants and UI features (#4052)
1 parent 7a81fc1 commit 3cc0d68

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

docs/developer-guide/Advanced-Theming.asciidoc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,12 +261,24 @@ SoftKey, Touch, Bar, Title, Right, Native
261261
|hideLeftSideMenuBool
262262
|Hides the side menu icon that appears on the left side of the UI
263263

264+
|hideRightSideMenuBool
265+
|Hides the toolbar menu icon that appears on the right side of the title area
266+
264267
|ignorListFocusBool
265268
|Hide the focus component of the list when the list doesn't have focus
266269

267270
|infiniteImage
268271
|The image used by the infinite progress component, the component will rotate it as needed
269272

273+
|infiniteMaterialDesignSize
274+
|Size (in millimeters) of the generated material design spinner when `InfiniteProgress` runs in material mode. Defaults to 6.667mm
275+
276+
|infiniteMaterialImageSize
277+
|Size (in millimeters) of the generated spinner image when no custom `infiniteImage` is provided. Defaults to 7mm
278+
279+
|infiniteDefaultColor
280+
|Hex RGB color used for the auto-generated material spinner when `infiniteImage` isn't supplied. Defaults to `777777`
281+
270282
|includeNativeBool
271283
|True to derive from the platform native theme, false to create a blank theme that only uses the basic defaults
272284

@@ -306,6 +318,9 @@ SoftKey, Touch, Bar, Title, Right, Native
306318
|menuButtonTopBool
307319
|When set to true this flag aligns the menu button to the top portion of the title. Defaults to false
308320

321+
|landscapeTitleUiidBool
322+
|When true the toolbar swaps to landscape-specific UIIDs (such as `ToolbarLandscape`/`BackCommandLandscape`) for layout and icon styling
323+
309324
|menuHeightPercent
310325
|Allows positioning and sizing the menu
311326

@@ -342,6 +357,9 @@ SoftKey, Touch, Bar, Title, Right, Native
342357
|menuWidthPercent
343358
|Allows positioning and sizing the menu
344359

360+
|iosStyleBackArrowBool
361+
|Renders the back command using the iOS-style chevron arrow (with a small icon gap) when the toolbar shows back text
362+
345363
|minimizeOnBackBool
346364
|Indicates whether the form should minimize the entire application when the physical back button is pressed (if available) and no command is defined as the back command. Defaults to true
347365

@@ -357,6 +375,12 @@ SoftKey, Touch, Bar, Title, Right, Native
357375
|paintsTitleBarBool
358376
|Indicates that the StatusBar UIID should be added to the top of the form to space down the title area, as is the case on iOS 7+ where the status bar is painted on top of the UI
359377

378+
|rightSideMenuImage
379+
|Overrides the default icon used for the right-side toolbar menu button
380+
381+
|rightSideMenuPressImage
382+
|Optional pressed-state icon for the right-side toolbar menu button
383+
360384
|popupCancelBodyBool
361385
|Indicates that a cancel button should appear within the combo box popup
362386

docs/developer-guide/The-Components-Of-Codename-One.asciidoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,12 @@ This will show the dialog on the right hand side of the screen, which is pretty
395395

396396
NOTE: The `InteractionDialog` can only be shown at absolute or popup locations. This is inherent to its use case which is "non-blocking". When using this component you need to be very aware of its location.
397397

398+
To make popup behaviour feel natural on touch devices you can call `setDisposeWhenPointerOutOfBounds(true)` so the dialog auto-dismisses as soon as the user taps outside the title or content area. Internally the dialog listens for pointer pressed/released events and will call `dispose()` for you when the interaction happens beyond its bounds, so you no longer need to wire that logic manually.
399+
400+
By default the dialog is placed on the form's layered pane, but you can switch between the global layered pane and form-specific layered pane using `setFormMode(boolean)`. Setting form mode to `true` keeps the dialog coupled with the showing form even when the global layered pane is used elsewhere in your app.
401+
402+
Finally, recent updates added animation toggles so you can fine-tune presentation. `setAnimateShow(boolean)` turns the show/dispose animations on or off, while `setRepositionAnimation(boolean)` enables a "grow/shrink" reposition effect during those animations when you want a more dynamic transition.
403+
398404
[[label-section]]
399405
=== Label
400406

@@ -765,12 +771,14 @@ These varying looks are implemented via a combination of layouts, theme constant
765771
There are several theme constants related that can manipulate some pieces of this functionality:
766772

767773
- `textComponentErrorColor` a hex RGB color which defaults to null in which case this has no effect. When defined this will change the color of the border and label to the given color to match the material design styling. This implements the red border underline in cases of error and the label text color change
774+
- `textComponentErrorLineBorderBool` toggles the material-style underline that appears on validation errors. Set it to `false` if you prefer to supply a different border when errors are shown
768775

769776
- `textComponentOnTopBool` toggles the on top mode which makes things look like they do on Android. This defaults to true on Android and false on other OS's. This can also be manipulated via the `onTopMode(boolean)` method in `InputComponent` however the layout will only use the theme constant
770777

771778
- `textComponentAnimBool` toggles the animation mode which again can be manipulated by a method in `InputComponent`. If you want to keep the UI static without the floating hint effect set this to false. Notice this defaults to true only on Android
772779

773780
- `textComponentFieldUIID` sets the UIID of the text field to something other than `TextField` this is useful for platforms such as iOS where the look of the text field is different within the text component. This allows us to make the background of the text field transparent when it's within the `TextComponent` and make it different from the regular text field
781+
- `inputComponentErrorMultilineBool` makes error labels multi-line by default so longer validation messages can wrap instead of being clipped
774782

775783

776784
[[button-section]]
@@ -1049,6 +1057,8 @@ To customize everything you need to customize the UIID's for `MultiLine1`, `Mult
10491057

10501058
You can customize the individual `UIID's` thru the API directly using the `setIconUIID`, `setUIIDLine1`, `setUIIDLine2`, `setUIIDLine3`, `setUIIDLine4` & `setEmblemUIID`.
10511059

1060+
Recent versions also include a badge overlay that can be rendered in the corner of the main icon. Use `setBadgeText()` to display a value (for example a notification count) and `setBadgeUIID()` if you need a custom UIID instead of the default `Badge` styling. When you need to inspect or adjust the badge style programmatically, `getBadgeStyleComponent()` returns the component whose styles are applied to the badge so you can tweak padding, colors or borders before showing the `MultiButton`.
1061+
10521062

10531063
=== SpanButton
10541064

0 commit comments

Comments
 (0)