This repository contains an application with some widget implementations as well as usage examples for these widgets and for the widgets of the Widget library.
At startup, it shows a list of items. Clicking on an item opens a new page showing a widget or a set of widgets. In each of these pages, a button allows to go back to the main list.
For each page, a package exists in the source with the same name.
(Example for the Label
page: com.microej.demo.widget.label
.)
The package contains the page and some widgets if necessary.
Each page class contains 2 methods:
getContentWidget()
that creates the page content (the hierarchy of widgets and containers),populateStylesheet(CascadingStylesheet)
that creates the styles for the widgets in the page.
Here are the pages:
Label
: demonstrates the simpleLabel
widget from the widget library.AutoscrollLabel
: demonstrates a label which autoscroll when the label text is longer than label length.Image Widget
: demonstrates how to display an image usingImageWidget
from the widget library.Animated image
: demonstrates anAnimatedImage
widget.Slider with value
: demonstrates a slider with displayed value.Slider with progress
: demonstrates a slider with progress.Circular Slider
: demonstrates a circular slider.Double Temperature Slider
: demonstrates a double slider with a dynamic gradient.Button
: demonstrates different styles of the simpleButton
widget from the widget library.Checkbox
: demonstrates aCheckbox
widget.Radio Button
: demonstrates aRadioButton
widget.Toggle
: demonstrates aToggle
widget animated when its state changes.Progress Bar
: demonstrates aProgressBar
widget.Indeterminate Progress Bar
: demonstrates anIndeterminateProgressBar
widget.Keyboard
: demonstrates a keyboard widget.Circular Indeterminate Progress
: demonstrates aCircularIndeterminateProgress
widget.Circular Dotted Progress
: demonstrates aCircularDottedProgress
widget.Circular Progress
: demonstrates aCircularProgress
widget.Circular Progress With Gradient
: demonstrates aCircularProgressWithGradient
widget.Wheel
: demonstrates aWheel
widget.WheelWithHighlight
: demonstrates aWheelWithHighlight
widget, where the selected item is highlighted with a larger font.ScrollingTextOnCircle
: demonstrates aScrollingTextOnCircle
widget, which draws a scrolling text on a circle.Carousel
: demonstrates aCarousel
widget.List
: demonstrates theList
container from the widget library.Grid
: demonstrates theGrid
container from the widget library.Fixed Grid
: demonstrates theFixedGrid
container from the widget library.Flex
: demonstrates theFlex
container from the widget library.Dock
: demonstrates theDock
container from the widget library.Split
: demonstrates aSplit
container.Scrollable List
: demonstrates aScrollableList
container.Scrollable Text
: demonstrates displaying a long, scrollable text.Snap Scroll
: demonstrates a scroll that snaps on its children.Secret Scroll
: demonstrates a container with an hidden child that can be shown by scrolling.Buffered Scroll
: demonstrates a scroll that uses the display buffer to scroll faster.Alphabet Scroll
: demonstrates a scroll that can be navigated using an index.Selectable List
: demonstrates a list of items that are selectable with an animation.Line Chart
: demonstrates aLineChart
widget.Bar Chart
: demonstrates aBarChart
widget.
-
MICROEJ SDK 6.
-
A VEE Port that contains:
- EDC-1.3 or higher.
- BON-1.4 or higher.
- MICROUI-3.4 or higher.
- DRAWING-1.0 or higher.
This example has been tested on:
- IntelliJ IDEA 2023.3.3.
- STM32F7508-DK VEE Port 2.2.0.
By default, the sample will use the STM32F7508-DK VEE Port.
Refer to the Select a VEE Port documentation for more information.
Configuration options can be found in: configuration/common.properties
.
- Make sure the configuration option
ej.microui.memory.imagesheap.size
is set to24000
andej.microui.memory.imagesheap.size
is set to42000
.
In IntelliJ IDEA or Android Studio:
- Open the Gradle tool window by clicking on the elephant icon on the right side,
- Expand the
Tasks
list, - From the
Tasks
list, expand themicroej
list, - Double-click on
runOnSimulator
, - The application starts, the traces are visible in the Run view.
Alternative ways to run in simulation are described in the Run on Simulator documentation.
Make sure to properly setup the VEE Port environment before going further. Refer to the VEE Port README for more information.
In IntelliJ IDEA or Android Studio:
- Open the Gradle tool window by clicking on the elephant on the right side,
- Expand the
Tasks
list, - From the
Tasks
list, expand themicroej
list, - Double-Click on
runOnDevice
. - The device is flashed. Use the appropriate tool to retrieve the execution traces.
Alternative ways to run on device are described in the Run on Device documentation.
All dependencies are retrieved transitively by gradle.
N/A
None.
Copyright 2020-2024 MicroEJ Corp. All rights reserved.
Use of this source code is governed by a BSD-style license that can be found with this software.