Components
Spinner
Option for your additional loading indicator
Spinner is a component to indicate a loading state or progress state of a page or section.
Usage
The following is code to implement spinner component.
Static in xml
<com.telkom.legion.component.spinner.LgnSpinnerandroid:layout_width="@dimen/dimen_32dp"android:layout_height="@dimen/dimen_32dp"android:layout_marginStart="@dimen/dimen_16dp"android:layout_marginTop="@dimen/dimen_16dp"app:variant="primary" />
Dynamic using Kotlin*
...with(binding) {containerBase.addView( //ViewGroup for Dynamic LayoutLgnSpinner(requiredContext()).apply {//Your View's customization here},LinearLayout.LayoutParams( //For example we use viewgroup LinearLayoutLinearLayout.LayoutParams.WRAP_CONTENT,LinearLayout.LayoutParams.WRAP_CONTENT
Variants
Default usage of Spinner and its behavior being primary
in variants.
Attribute
Attribute Name | Xml Attrs | Related method(s) | Description |
---|---|---|---|
Variant | app:variant | variant | To set Variant directly via xml |
Height | android:height | N/A | To set Height directly via xml |
Width | android:width | N/A | To set Width directly via xml |
Do you have feedback?
Please let us know to make it better