Skip to content

VerticalApi

谷进杰 edited this page Jun 18, 2019 · 2 revisions

VerticalRangeSeekBar(垂直RangeSeekBar)

VerticalRangeSeekBar is actually a rotation of RangeSeekBar, and the relative position of its attributes is consistent with RangeSeekBar. Except the following attributes are unique, all other attributes are the same.

垂直(VerticalRangeSeekBar)实际上是RangeSeekBar的旋转,其属性的相对位置与RangeSeekBar一致。除了以下属性是唯一的,所有其他属性和RangeSeekBar都是相同的。

 <com.jaygoo.widget.VerticalRangeSeekBar
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            app:rsb_mode="single" />

Orientation

Orientation 方向

  • left The normal RangeSeekBar rotated 90 degrees counterclockwise.

    正常的RangeSeekBar逆时针旋转90度.

  • right The normal RangeSeekBar rotated 90 degrees clockwise.

    正常的RangeSeekBar顺时针旋转90度.

//java
verticalRangeSeekbar.setOrientation(DIRECTION_LEFT|DIRECTION_RIGHT)

//xml
app:rsb_orientation="left|right"


Tick Mark Text Direction 方向

//java
verticalRangeSeekbar.setTickMarkDirection(TEXT_DIRECTION_VERTICAL|TEXT_DIRECTION_HORIZONTAL)

//xml
app:rsb_tick_mark_orientation="vertical|horizontal"


Indicator Text Direction 方向

注意:

If the direction is vertical and the height is wrap_content, please ensure that its width is greater than the height of the indicator, because the height of the indicator cannot be obtained during measurement.**

如果方向是垂直的,高度是“wrap_content”,请确保其宽度大于指示器的高度,因为在测量过程中无法获得指示器的高度。**

//java
verticalRangeSeekbar.leftSeekBar.setIndicatorTextOrientation(TEXT_DIRECTION_VERTICAL|TEXT_DIRECTION_HORIZONTAL)

//xml
app:rsb_indicator_text_orientation="vertical|horizontal"