Skip to main content

Components

Spinner

Option for your additional loading indicator

banner-Spinner

Spinner is a component to indicate a loading state or progress state of a page or section.

spinner banner

Usage

The following is code to implement spinner component.

Static in xml

<com.telkom.legion.component.spinner.LgnSpinner
android: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 Layout
LgnSpinner(requiredContext()).apply {
//Your View's customization here
},
LinearLayout.LayoutParams( //For example we use viewgroup LinearLayout
LinearLayout.LayoutParams.WRAP_CONTENT,
LinearLayout.LayoutParams.WRAP_CONTENT

Variants

Default usage of Spinner and its behavior being primary in variants.

spinner android

Attribute

Attribute NameXml AttrsRelated method(s)Description
Variantapp:variantvariantTo set Variant directly via xml
Heightandroid:heightN/ATo set Height directly via xml
Widthandroid:widthN/ATo set Width directly via xml