Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

Spinner

A.samad Mahmoodi edited this page Apr 20, 2018 · 10 revisions

Spinner

Usage Declare in XML:

<com.rey.material.widget.Spinner
    style="@style/Material.Widget.Spinner"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:rd_style="@style/Material.Drawable.Ripple.Wave"/>

Attributes android:dropDownWidth - The width of popup menu. Can be dimension value or match_parent or wrap_content enum.

android:popupBackground - The background drawable of popup menu.

android:minWidth - The minimum width of this Spinner.

android:minHeight - The minimum height of this Spinner.

spn_labelEnable - Indicate that Spinner should show a label above the selected view.

spn_labelPadding - The padding between label and selected view.

spn_labelTextSize - The size of label's text.

spn_labelTextColor - The color of label's text.

spn_labelTextAppearance - The appearance settings of label's text.

spn_labelEllipsize - The ellipsize setting of label's text.

spn_label - The label's text.

spn_popupItemAnimation - The animation for each item in popup menu.

spn_popupItemAnimOffset - The offset time each item's animation will start.

spn_arrowColor - The color of arrow drawable.

spn_arrowSize - The width of arrow. 0 mean show no arrow.

spn_arrowPadding - The padding left and right of arrow.

spn_arrowSwitchMode - Indicate should show arrow's animation when showing popup menu.

spn_arrowAnimDuration - The duration of arrow's animation when showing popup menu.

spn_arrowInterpolator - The interpolator of arrow's animation.

spn_arrowAnimClockwise - If true, the arrow will rotate clockwise when showing popup menu.

spn_dividerColor - The color of divider. Accept Color value or ColorStateList resource.

spn_dividerHeight - The height of divider.

spn_dividerPadding - The padding of divider with selected view.

spn_dividerAnimDuration - The duration of divider's animation.

Clone this wiki locally