hikage-widget-material
This is a Hikage extension dependency for Google Material (MDC) component-related features.
Configure Dependency
You can add this module to your project using the following method.
SweetDependency (Recommended)
Add dependency in your project's SweetDependency
configuration file.
libraries:
com.highcapable.hikage:
hikage-widget-material:
version: +
Configure dependency in your project build.gradle.kts
.
implementation(com.highcapable.hikage.hikage.widget.material)
Traditional Method
Configure dependency in your project build.gradle.kts
.
implementation("com.highcapable.hikage:hikage-widget-material:<version>")
Please change <version>
to the version displayed at the top of this document.
Function Introduction
This dependency inherits the available components from Google Material (MDC), which you can directly reference to use in Hikage.
The following example
LinearLayout(
lparams = LayoutParams(matchParent = true) {
topMargin = 16.dp
},
init = {
orientation = LinearLayout.VERTICAL
gravity = Gravity.CENTER
}
) {
MaterialTextView {
text = "Hello, World!"
textSize = 16f
gravity = Gravity.CENTER
}
MaterialButton {
text = "Hello, World!"
textSize = 16f
gravity = Gravity.CENTER
}
TextInputLayout(
lparams = LayoutParams {
topMargin = 16.dp
},
init = {
minWidth = 200.dp
hint = "Enter your text"
}
) {
TextInputEditText()
}
}