- What is this
- Screenshots
- What is this
- Components
- Context Menus
- Layouts
- Renderers
- XML Layouts
- Themeing
- Animations
- Drawables
- Concurrency
Note: currently, not all sections are documented. I'm working on this.
This is a Android-like View based system for Java, written in Kotlin, with Material Design Views. This makes it easy to implement material UI on desktop with Kotlin/Java. You can write layouts in XML or Kotlin, compile and theme them within seconds and get your UI off the ground.
Check these out:
A basic implementation using radio buttons, image drawables, buttons, and snackbars
An example of using a dark theme, with a visible context menu
An example of using a card with multiple button actions, centered in a frame with no wrap enabled
More screenshots/examples available under git-assets/
There are tons of components built into the standard library, with the option to easily create your custom views as required.
The basis for all other components, and have a number of properties including states, min and max sizes, visibility, backgrounds, translations, context menu, etc. All other views must implement this base view. Custom views may define other attributes, programmatically or through XML for XML layout compatibility. See src/com.asdev/libjam/md/view/View.kt
for a full list of properties.
A standard button element. Has two built-in themes: flat
and raised
. Have two additional parameters: text
, the text to display in this button, and type
, referencing the theme/type of this button (Either BUTTON_TYPE_RAISED
or BUTTON_TYPE_FLAT
).
Usage: val button = Button(text = "button text", type = BUTTON_TYPE_RAISED)
See: src/com/asdev/libjam/md/view/ButtonView.kt
A standard text input element. Has a number of customizable properties, including text color, text font, input max length, etc. By default, has one construction parameter: label
, the input hint to display.
Usage: val input = TextInputField(label = "Default hint text")
See: src/com/asdev/libjam/md/view/ButtonView.kt
Currently, there are two progress views available: circular progress views (showing indefinite progress), and progress bars (showing definite and indefinite progress). Both can be customized in terms of color, animation speed, etc.
Usage:
val progress_circle = CircularProgressView() // no paramters by default, use method accessors
val progress_bar = ProgressView() // no parameters by default
See: src/com/asdev/libjam/md/view/CircularProgressView.kt
, src/com/asdev/libjam/md/view/ProgressView.kt