Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/developer-guide/Advanced-Theming.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ SoftKey, Touch, Bar, Title, Right, Native
|textUiid
|Overrides the text component UIID for `SpanLabel`, `SpanButton`, `MultiButton`, and `SpanMultiButton` instances when provided as a theme constant.

|useLargerTextScaleBool
|When `true`, UIManager applies the larger text accessibility scale from `Display.getLargerTextScale()` when `Display.isLargerTextEnabled()` is enabled.

|dialogTransitionOutImage
|Default transition https://www.codenameone.com/javadoc/com/codename1/ui/Image.html[Image] for dialog, causes a https://www.codenameone.com/javadoc/com/codename1/ui/animations/Timeline.html[Timeline] transition effect

Expand Down
26 changes: 26 additions & 0 deletions docs/developer-guide/Miscellaneous-Features.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,32 @@ Display.getInstance().sendMessage(new String[] {"someone@gmail.com"}, "Subject o

NOTE: Some features such as attachments etc. don't work correctly in the simulator but should work on iOS/Android

=== Larger Text Accessibility

Codename One can adapt to the operating system’s larger text accessibility setting. The https://www.codenameone.com/javadoc/com/codename1/ui/Display.html[Display] APIs expose two signals: `isLargerTextEnabled()` indicates whether the user has enabled larger text, and `getLargerTextScale()` returns the scale factor that should be applied to fonts.

If you want the theme system to automatically scale its fonts when larger text is enabled, enable the https://www.codenameone.com/javadoc/com/codename1/ui/plaf/UIManager.html[UIManager] setting:

[source,java]
----
UIManager.getInstance().setUseLargerTextScale(true);
----

You can also enable this behavior in the theme by setting the `useLargerTextScaleBool` theme constant to `true`.

If you need to apply the scale manually for custom fonts or layout calculations, read the values directly:

[source,java]
----
Display display = Display.getInstance();
if (display.isLargerTextEnabled()) {
float scale = display.getLargerTextScale();
Font base = UIManager.getInstance().getLookAndFeel().getDefaultStyle().getFont();
Font scaled = base.derive(base.getHeight() * scale, base.getStyle());
someComponent.getUnselectedStyle().setFont(scaled);
}
----

=== Contacts API

The contacts API provides us with the means to query the phone’s address book, delete elements from it and create new entries into it. To get the platform specific list of contacts you can use
Expand Down