Skip to content

Android

Willian Mota Oliveira edited this page Aug 23, 2022 · 2 revisions

If you're using compose, check the Compose wiki page.


Using xml

The following is the base SpinnableView component

<williankl.spinnable.core.SpinnableView
    android:id="@+id/spinnable"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"/>

We have these fields to alter on the xml code:

  • app:state="state": This field can be:

none: This one makes the spinnable static. Unable to move.

manual: Comes with a combo of app:isVerticalEnabled="boolean" and app:isHorizontalEnabled="boolean". The default value for both fields, if not passed, is true.

automatic: Comes with a combo of app:horizontalSpeed="float" and app:verticalSpeed="float". The default speed for both fields, if not passed, is 360F

Clone this wiki locally